Activities in Python

Pausing/resuming activity on the go. Is there a way to do this or we cant?

Restarting just that activity which fails (instead of entire workflow).
Can we skip an activity which is failing and move onto next activity and restart just this failed activity some other time?

Rolling back if the workflow fails (Does Temporal offers something convenient?) Or we need to add our own custom logic to undo changes (like SAGA) ?

1 Like

Hi @Pratyay_Singh

Pausing/resuming activity on the go. Is there a way to do this or we cant?

We have an example in java that does something similar.(samples-java/core/src/main/java/io/temporal/samples/retryonsignalinterceptor at main · temporalio/samples-java · GitHub). I would need to check but probably you can do the same in python.

Restarting just that activity which fails (instead of the entire workflow).
Can we skip an activity which is failing and move onto next activity and restart just this failed activity some other time?

Can you share the use-case? I have a couple of ideas but I would like to understand why you need to do this first.

Rolling back if the workflow fails (Does Temporal offers something convenient?) Or we need to add our own custom logic to undo changes (like SAGA) ?

SAGA is something you can implement in workflow code itself, maybe this video can help https://www.youtube.com/watch?v=EUAXkqQIPXY
If you want to provide more details about your use-case maybe we can offer some guidance with the implementation,

Thanks,
Antonio

Yeah. here’s the use case:

We are working on a overhauling the show setup process at DNEG (https://www.dneg.com/)

One of the workflows requires creating certain folder across different locations (mumbai, montreal etc) and certain other tasks across different servers. Right now, I am considering each task as different activities. So one for creating folder at mumbai, another for creating folder at montreal. For some reason, the folder creation activity (for Mumbai) fails, can we continue with the workflow which completes rest of the steps. And then we can complete failed activity at a later time.
Or maybe pausing the failing activity that can be resumed later on.

I will not be able to move to next activity if previous ones are not completed. Right?

Now I am thinking, can we have something like running parallel activities. I dont know if temporal offers such functionality. And if it does, what to do if one activity fails?

Using SAGA to undo the changes, is cumbersome. Because If one activity fails towards end, the going back to start requires undoing lot of changes to get back to the state before workflow started executing. (Assuming activities are running in sequential manner)

Any update on this?