Initiating process in several activities using api

  • 4 February 2015
  • 1 reply
  • 1 view

Badge +2

Hi, I am writing program that must starts processes automatically at specific activity.
Sometimes it have to be several activities at a time, but "gotoactivity" api command expires all active activities except one the passed to the command. Is it some solution for this task?
Thank you in advance for your answers


1 reply

Userlevel 1
Badge +8

Hi Raanana

 

I suggest you look at your workflow design rather than try and use the api to move process instances to a specific activity. As you have discovered the goto activity command will expire any current activity.

 

You can use the line rules and the activity outcome succeeding rules to determine which activity/activities each process should proceed to. These rules can act on smartobject data or process data fields that are provided when you start the process. If it gets too complex then perhaps you need to break your process up into multiple workflows. 

 

As an example, if you have 4 different activities that the process could start at, then you can have a line going to each from your start event (i.e. 4 lines coming out of start) . Then use the line rules (right click line -> properties -> line rule) to configure the logic to determine if this line is followed or not. In this logic you can use smartobject data or process data fields to make the evaluation. You can have any combination of the 4 line rules evaluate to true. The workflow will move to each activity where the line rule is true (and the workflow will complete if none evaluate to true).

Reply