[jboss-user] [JBoss jBPM] - How to start this process instance?
do-not-reply at jboss.com
Mon Feb 5 16:48:49 EST 2007
Dear JBPM people,
I am wondering what it would be the best way to start process instance of process definition, which have in start-state some system action (it is not executed by human). On node-enter event some action should be triggered.
Please look at the example below:
<?xml version="1.0" encoding="UTF-8"?>
| <process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="simple">
| <swimlane name="admin" />
| <action name="messageActionHandler"
| <start-state name="start">
| <event type="node-enter">
| <action ref-name="messageActionHandler" />
| <transition name="to_first" to="first"/>
| <task-node name="first">
| <task swimlane="admin">
| <variable name="font" />
| <transition name="to_end" to="end"/>
| <end-state name="end"></end-state>
As you can see, here the "start-state" does not contain task and after process instance is created, it cannot be started with:
taskInstance = processInstance.getTaskMgmtInstance().createStartTaskInstance();
like in JBPM example webapp, because exception in createStartTaskInstance() occurs, since startTask is NULL.
If I fetch the rootToken and call signall() on it, my Action on node-enter event is not invoked.
Token rootToken = processInstance.getRootToken();
Just to mention, everything works fine when the start-state is executed by human, and node-enter event with my action is defined in the next state.
Thank you and regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011601#4011601
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011601
More information about the jboss-user