Launch activities dynamically


Our need : do specific actions on all activities according to new arguments
(of course we don’t want to code this for each call of the activities)

We would like to create an activity (kind of launcher) which goal is to do the actions and then launch / call dynamically another activity (arguments should be at least the activity name to launch and its own needed arguments)
Would it be possible ? If so, how to do that ?

A simple example (but we have other ones) :

  • if debug argument is true, write some specific logs for all activities

Thanks and Regards

Struggling to understand your exact requirement but wouldn’t creating separate workflows achieve this? For example, if value is true then launch this workflow with these arguments otherwise launch a different workflow, or the same workflow but with different arguments??

The Nicolas need is very simple : in case of failure of the process, he wants to restart the same workflow from the beginning but avoid to launch some activities (for instance to avoid the resend of a mail which has been sent during the first launch and before the failure), whereas the process needs to reload some input data. The idea is to disable “external” activities previously done, whereas we need to reload input data. One solution can be to encapsulate each activity in a IF statement but it will be very painful and unreadable ;o)
Thank for your help !

Hi Olivier,

If you use a State Machine you can create sub processes and use variables to drive the steps that are undertaken. The conditions for where you next resume can be in the Transitions which keeps things nice and neat.

Alternatively, rather than use multiple IF statements use a flowchart with decisions in it so for example if boolEmailSent = True then skip activity but do this using a decision rather than an If statement.

Hope that helps. There are quite a few options, the key thing it so mark the stage you have reached somehow to determine the next set of actions when retrying.


1 Like

Thanks a lot Richard for these good ideas : I’ll try and keep you inform. New hope : I appreciate ;o)

Hi Richard,

I tried your ideas and it is exactly what I need. Thanks a lot !