cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a dynamic step while the instance is in flight

dilipl1
Champ in-the-making
Champ in-the-making
I have been evaluating Activitii to see if it helps us achieve what we are trying to accomplish.

Essentially we want the ability to add a dynamic step (available to be picked up from a list of steps) at any point in the process thereby affecting the instance in flight. The step can be added anywhere in the flow, obviously where the instance hasn't been to yet. So for example if I am at step 2 below, I should be able to add a step anywhere after step 2.

step 1 –> step 2 –> step 3 –> step 4

The original process should not be modified, just the one affecting the current instance.

I did see, that I can dynamically pick a subprocess (at runtime), however we want to be able to add a step anywhere. Any feedback is appreciated…thanks
12 REPLIES 12

meyerd
Champ on-the-rise
Champ on-the-rise
Hi Guys,

some of what's discussed here closely resembles the concept of the "ad-hoc subprocess" as specified by bpmn. While supporting the ad-hoc subprocess is not the most prominent item on the roadmap (at least not with us at camunda), there is of course always the possibility of sponsored development http://www.camunda.com/consulting/activiti/sponsored-development/.

nemesis1
Champ in-the-making
Champ in-the-making
Hi meyerd;

Apologize for my blurry question. Essentially we are trying to understand the limit of activitybehaviour.
my main question is;
Is it possible to jump to another task in a process.



How can I obtain detailed information about sponsored development? We can need this if we decide to have an adhoc sub process.

Thanks.

ankhara33
Champ in-the-making
Champ in-the-making
nemesis, yes of course it's possible…. We use logic to skip all the tasks we don't want at executing time by variable values, and target the correct one. A process instance variable is used in the runtime execution to determine if we should create an activiti task or not… and access it through a CDATA tag.. like below… of course I can't post all the pieces here, but should give you an idea … Smiley Happy

Here's what a snippet of what our process looks like at any of the 'determine' if we should skip or goto the next task …
<code>
<sequenceFlow id="checkCustodianApproval_checkAssetAllowed" name="approved" sourceRef="isCustodianApproved" targetRef="isCustodianAllowedToHaveAsset">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approved == true}]]></conditionExpression>
</sequenceFlow>
</code>
Approved is set in the process runtime by a Java TaskListener that sets it with something like this:
delegateTask.getExecution().setVariable("approved", "true");

Ankhara