Can we pause the workflow within activity

func activity1() {
// N lines of Code …
PAUSE HERE
//Continue based on some signal/timer expiry
}

Something like this

Currently there is no system level “pause”. We plan to add one in the future.

So the pausing should be part of your workflow logic. You can use a signal or update to ask workflow to pause/unpause.

Here is a discussion similar to this: Pausing workflow execution - #2 by maxim

Can you please provide a use case example?

What does system level “pause” mean ?

I’m just exploring pausing the flow within activity instead of between activities.
For example, We can pause after a activity using GetSignalChannel and Resume the next activity using SignalWorkflow. Can we pause within activity ?

Activity code is just your code so you could i believe use time.Sleep, problem is setting the right StartToClose timeout for this activity as it could time out.
Activity code cannot react to receiving signals, so if you your pause/resume events come in as signals to your execution you need to do this in workflow code.