-
1. Re: Action fires more times in a processinstance
kukeltje Jan 18, 2007 8:07 AM (in response to knra)uhhmm...
- 1 process instance
- 3 nodes
- each node has an action on the node-enter
- you run the complete process
- the action is called 3 times
I do not see the problem -
2. Re: Action fires more times in a processinstance
nib Jan 18, 2007 8:16 AM (in response to knra)Actions within events can't propagate execution via leaveNode()
Only Actions defined directly on the node. -
3. Re: Action fires more times in a processinstance
knra Jan 18, 2007 10:03 AM (in response to knra)need to clarify: every node has a different action attach to it on the node-enter event. When the processinstance is on the way every action is called more times. In my opinion it should not be like that. If I change the node from type Node to state Node than the behaviour is correct-->every action is called only once
-
4. Re: Action fires more times in a processinstance
kukeltje Jan 18, 2007 8:25 PM (in response to knra)Please, please, please real clarfication is done by posting the (minimal) processdefinition, the (minimal) actionhandlers etc..etc...etc.. like version used, jdk, etc..etc..etc
-
5. Re: Action fires more times in a processinstance
knra Jan 19, 2007 2:46 AM (in response to knra)i didn't write jdk, etc, etc etc because in this case these information are just useless. Write any processdefinition (with jbpm3.1.2+java5 if you want) and attach action on the nodes, they are called more times like described
-
6. Re: Action fires more times in a processinstance
kukeltje Jan 19, 2007 5:14 AM (in response to knra)Sorry, but whether something is useless is for us to decide. You ask us for help with a problem you cannot figure out.
-
7. Re: Action fires more times in a processinstance
knra Jan 19, 2007 11:44 AM (in response to knra)This works, but if you change node of type State to node than I have the described behaviour:
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="AskitBatchII">
<start-state name="Start">
</start-state>
<end-state name="End"></end-state>
</process-definition> -
8. Re: Action fires more times in a processinstance
kukeltje Jan 19, 2007 12:35 PM (in response to knra)please post the process within code tags (use preview to see how it looks like before posting)
-
9. Re: Action fires more times in a processinstance
knra Jan 23, 2007 3:56 AM (in response to knra)<?xml version="1.0" encoding="UTF-8"?> <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="AskitBatchII"> <start-state name="Start"> <transition name="to_FileMoved" to="FileMoved"></transition> </start-state> <end-state name="End"></end-state> <state name="FileMoved"> <event type="node-enter"> <action name="move_file" class="cof.bpm.action.MoveFileAction"></action> </event> <transition name="to_FilePrepared" to="FilePrepared"></transition> </state> <state name="FilePrepared"> <event type="node-enter"> <action name="rename_file" class="cof.bpm.action.RenameFileAction"> </action> </event> <transition name="to_AskitLaunched" to="AskitLaunched"></transition> </state> <state name="AskitLaunched"> <event type="node-enter"> <action name="launch_external_program" class="cof.bpm.action.OSInvokerAction"> </action> </event> <transition name="to_End" to="End"></transition> </state> <node name="node1"></node> </process-definition>
-
10. Re: Action fires more times in a processinstance
kukeltje Jan 24, 2007 12:52 PM (in response to knra)ok no strange things. What does the code look like you use tho trigger the process/states?
-
11. Re: Action fires more times in a processinstance
knra Jan 25, 2007 2:49 AM (in response to knra)Inside an Action I have following code:
if (fileMoved==true){ executionContext.leaveNode(); }
-
12. Re: Action fires more times in a processinstance
kukeltje Jan 25, 2007 6:15 AM (in response to knra)This is not allowed in an event action on nodes. Only 'implementation' classes on a generic node and decision are allowed to call the 'leave'
-
13. Re: Action fires more times in a processinstance
knra Jan 26, 2007 3:03 AM (in response to knra)Thanks for your time & support
-
14. Re: Action fires more times in a processinstance
kukeltje Jan 26, 2007 5:53 AM (in response to knra)no problem, but did it help? Did you solve the problem?