Ruediger Herrmann [http://community.jboss.org/people/ruediger.herrmann%40gmx.de] created the discussion
"jBPM 3.2: Trouble understanding RuntimeActions and fork/join" To view the discussion, visit: http://community.jboss.org/message/553746#553746 -------------------------------------------------------------- I am having trouble in understanding the amount and order of runtimeActions being triggered in a process definition that contains a fork node. The process definition is rather simple, a fork node has two leaving transitions, each pointing to a plain node (called lane1 and lane2). Each of the two nodes has one leaving transition to one common join node. Apart from a start and end node, that's all. At runtime I want to be informed whenever a node is entered or left. Therefor I attached runtimeActions for Event.EVENTTYPE_NODE_ENTER and Event.EVENTTYPE_NODE_LEAVE to each node. The output is printed below: node-leave: StartState(start) node-enter: Fork(fork) node-leave: Fork(fork) node-enter: Node(lane1) node-leave: Fork(fork) node-enter: Node(lane2) node-leave: Node(lane1) node-enter: Join(join) node-leave: Node(lane2) node-enter: Join(join) node-leave: Join(join) node-enter: EndState(end) What puzzles me is that leave-Fork and enter-Join occur twice. The process instance is executed with the following code: void signalToken( Token token ) { Map children = token.getChildren(); if( children != null ) { Collection childTokens = children.values(); for( Token childToken : childTokens ) { signalToken( childToken ); } } if( !token.hasEnded() ) { token.signal(); } signalToken is initially called with processInstance.getRootToken() as the argument. Attached is a standalone snippet to reproduce what I described. Can anyone explain what is going on or what I am doing wrong? TIA Rüdiger -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/553746#553746] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user