Start a variable sub-process
Question

Hi All,


I have a challenge with processes. 

I would like to start a sub-process based on the input of the end-user during the performance of a task. The user selects the sub-process from a dorp-down list within the task screen and can start the select (sub-)process. 

If it is possible to start a (sub-)process based on a parameter instead of selecting the Launch<Process Name> from process extended action it would work, but I cannot find how.

Thanks for any help.

Hi Jeroen,

if in the main process you are able to check the parameter, you can use a Decision activity to point to the right SubProcess.

Regards

Thanks Jose, but the sub-process is selected from a large set of possible sub-processes (about 50+) that are limited for the user based on a set of conditions for that specific case and can in time also be increased with others based on the conditions so making this is a manageable solution I would like to use a parameter. 

Do you know if this is possible?

Thanks,

Jeroen

Ah I misunderstood.

But if it is a process already running, why do you want to run it again?

Hi Jose, the sub-process is not running yet. The user is working on a task in the main processflow and wants to select the correct process (or processes) to be done as a next set of steps. For this the user will be presented with a sub-set of the available (sub) processes to start based on the condition of the objects in the main-process. This is the base of an adaptive case management solution.

Hi Jeroen,

I'm not sure about how it could work with sub processes, but if you would be looking for starting one of many available processes based on conditions and/or user choice, you could have all processes triggered by the same entity creation, and then have each process decide based on information in the triggering entity if they need to start up or not.

Dorine

Thanks Dorine,

I tried to set this up, but with 50 processes starting it has a large impact on the performance and when doing this with multiple users it will have a big hit on the server.

Jeroen

yes,

absolutely agree that this is not scalable to large amounts of requests.

I see your current plan is to do some sort of dynamic call with a .Net extension.  If that doesn't work, another thing you could look at, is to have for each process an unscheduled timer doing nothing more than starting the process, and use the cyclic_job entities to kick off the desired timer.  

Only complexity (to solve just once) is allowing multiple processes started simultaneous, as each timer can only run one instance.

You can present the user with a list of available timers (restricted of course in some way to your 50) and you can force a timer to run once by updating its Next_Run attribute.  All this can be done with generic code, so every time you add a new process + its timer to your bpt module, it becomes available to the user to kick off, no switches needed.

Dorine

Hi Dorine, thanks for this idea. something to look in to!

Jeroen

Hi Jeroen,

You can use the table Process join with Process_Definition, using the Process_Definition.Name (this table is your BPT process name) to feed the dropdown, then on your logic add a switch to launch the right process based on the dropdown choices.

Hope I could help you.

Cheers

Carlos Lessa

Thanks Carlos, this is the way the conditions work already, but the problem is that the processes are 50+. So it will be a switch with 50+ options and it will increase over time (more processes will be made). I was hoping for a solution to use a parameter and state somehow  Launch<ParameterValue>.

I'm now looking to see if I can do this in C#. Start a Actionflow in C#.

Jeroen

I don't think you can start a variable process. you would have to explicitly run it in your code.

But i also would like to state that it would be best to keep your process logic and user/business logic separated. 

So it would be best to define your dropdown list with your subprocesses and link them with the processes you have designed for them.


the idea is to have a main process You would start with a parameter from your dropdown tablesource. then in that mainprocess you will create a Decision and start the designated process from that main process.

Hi Stefano, I totally agree and that is exactly what I'm trying to do. There will be a rules engine that defines the business logic and defines what processes are available for the user to select within the case-processing. 

In the theory of adaptive case management it is the user who can decide what the next step(s) will be, but it will be based on the conditions defined by the business logic for that specific case. As this demands a flexibility in the options a user has in the potential continuation of the process. All (adaptive) case management systems have these options available out of the box and I was hoping we could also do this in OutSystems. 

Jeroen

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.