cancel
Showing results for 
Search instead for 
Did you mean: 

Specifying intermediate rules among activities

ddweerasiri
Champ in-the-making
Champ in-the-making
Hi,
This is a question related to modelling. Suppose I have two activities (Service-Task1 and Service-Task2) in a sequence. And there is a process variable (Var1). Suppose the value of Var1 is modified by another repetitive ServiceTask which runs concurrently to the Service-Task1 and Service-Task2. Screenshot attached [img]http://s28.postimg.org/47cv9lrrh/Screen_Shot_2014_02_10_at_12_47_43_PM.png[/img]
What I need to do is to block execution of Service-Task2, until Var1 equal to a particular value. Is it possible to model in BPMN2.0?
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
Hmm that is indeed a good use case… However I don't think we have out of the box support for it like you describe.

A workaround could be to have a looping mechanism in the process before service-task-2, that checks the var, and if not correct goes into an intermediary timer for xx seconds/minutes/whatever/… effectively looping/blocking until the var is set.

Ah now that I think of it! Forget that last sentence. Too hacky.

Two solutions:
- Use a receive task before the service task 2. have a sequence flow listener that signals the execution waiting in the receive task
- Use a signal throw after the repetitive task and a catch on the boundary of a receive task before service task 2. Set the signal scope to process instance scope.

ddweerasiri
Champ in-the-making
Champ in-the-making
Thanks Joram for two solutions. Could you please explain what you meant by "sequence flow listener". In the BPMN editor in Activiti explorer, I couldn't find such element.

Thanks,
Denis
http://ddweerasiri.blogspot.com

trademak
Star Contributor
Star Contributor
With sequence flow listener an execution listener on a sequence flow is meant.

Best regards,