[JBoss jBPM] - implications of a node
by WalterTaus
Hallo,
I am using jBPM in a database environment. I have the following process definition
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="" name="TestFork">
| <start-state name="StartState1219404587924">
| <transition to="StartDecision1219404587924/StartDecision1219404587924"></transition>
| </start-state>
| <super-state name="StartDecision1219404587924">
| <decision name="StartDecision1219404587924">
| <transition name="To_R9v0MGIXEd2c76EEAkhdWA" to="../Fork1/Fork1">
| </transition>
| </decision>
| </super-state>
| <super-state name="Fork1">
| <fork name="Fork1">
| <transition name="To_1k7IQHAeEd2zyONQHdQlYg" to="../State1/State1">
| </transition>
| <transition name="To_atT-cGReEd2afZhBo4aBRw" to="../State2/State2">
| </transition>
| </fork>
| <join name="Join1">
| <event type="node-enter">
| <script><expression>
| executionContext.setDiscriminator(true);
| </expression></script></event>
| <transition name="End" to="../End/End"></transition>
| </join>
| </super-state>
| <super-state name="State1">
| <state name="State1">
| <transition name="To_QPWKwGReEd2afZhBo4aBRwJoin" to="../Fork1/Join1">
| </transition>
| </state>
| </super-state>
| <super-state name="State2">
| <state name="State2">
| <transition name="To_QPWKwGReEd2afZhBo4aBRwJoin" to="../Fork1/Join1">
| </transition>
| </state>
| </super-state>
| <super-state name="End">
| <end-state name="End">
| </end-state>
| </super-state>
| </process-definition>
|
When I run this process past the fork, I correctly have two child tokens, one for State1 and one for State2.
Now I add a node in front of the fork. My process definition now looks as follows.
| <?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="" name="TestFork">
| <start-state name="StartState1219404587924">
| <transition to="StartDecision1219404587924/StartDecision1219404587924"></transition>
| </start-state>
| <super-state name="StartDecision1219404587924">
| <decision name="StartDecision1219404587924">
| <transition name="To_R9v0MGIXEd2c76EEAkhdWA" to="../Node1/Node1">
| </transition>
| </decision>
| </super-state>
| <super-state name="Node1">
| <node name="Node1">
| <event type="node-enter">
| <script><expression>
| System.out.println("Node1 entered");
| executionContext.leaveNode();
| </expression></script></event>
| <transition name="To_QPWKwGReEd2afZhBo4aBRw" to="../Fork1/Fork1">
| </transition>
| </node>
| </super-state>
| <super-state name="Fork1">
| <fork name="Fork1">
| <transition name="To_1k7IQHAeEd2zyONQHdQlYg" to="../State1/State1">
| </transition>
| <transition name="To_atT-cGReEd2afZhBo4aBRw" to="../State2/State2">
| </transition>
| </fork>
| <join name="Join1">
| <event type="node-enter">
| <script><expression>
| executionContext.setDiscriminator(true);
| </expression></script></event>
| <transition name="End" to="../End/End"></transition>
| </join>
| </super-state>
| <super-state name="State1">
| <state name="State1">
| <transition name="To_QPWKwGReEd2afZhBo4aBRwJoin" to="../Fork1/Join1">
| </transition>
| </state>
| </super-state>
| <super-state name="State2">
| <state name="State2">
| <transition name="To_QPWKwGReEd2afZhBo4aBRwJoin" to="../Fork1/Join1">
| </transition>
| </state>
| </super-state>
| <super-state name="End">
| <end-state name="End">
| </end-state>
| </super-state>
| </process-definition>
|
When I now run this process past the fork, I have four child tokens in JBPM_TOKEN table, two for State1 and two for State2.
Can somebody explain why this happens and how to avoid this behaviour.
Thanks in advance
Walter
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172024#4172024
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172024
16 years, 3 months
[JBoss jBPM] - pooled actors ?
by memius
I am reading in 'open source soa' and came across 'finding all pooled tasks for an actor' (we need smt like that)
Wat I understand from there is that the field 'pooled actors' should be filled with one or more actor ids (which match an individual user )
I think this is conceptually wrong.
Wouldn't it be wiser to have a set of 'roles' there ?
Otherwise ... you would have to change your process definition every time a person leaves your company or when someone is hired (who can perform the task of course).
Anyway ... at this time we will use the pooled actors as 'roles', the actor id as a user id ( username).
When searching for a task list, we will pass the user id and its roles (which will be fetched in the application.
Any ideas or remarks ?
Is there a better way ?
Sincerely,
Dieter D'haeyere
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171997#4171997
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171997
16 years, 3 months