I can get what I need by associating an action with a node-enter event on the
process-state and then having that action copy properties into context
variables, i.e.
"<process-definition name='super'>" +
| " <start-state>" +
| " <transition to='p' />" +
| " </start-state>" +
| " <process-state name='p'>" +
| " <event type='node-enter'>" +
| " <action name='copy'
class='org.jbpm.tutorial.action.CopyActionHandler'>" +
| " <backup>JBOSS_HOME/lib/jboss-${timestamp}.jar</backup>"+
| " </action>" +
| " </event>" +
| " <sub-process name='sub' />" +
| " <variable name='backup'/>" +
| " <transition to='end' />" +
| " </process-state>" +
| " <end-state name='end' />" +
| "</process-definition>"
and in CopyActionHolder
executionContext.getContextInstance().setVariable("backup", getBackup());
and
"<process-definition name='sub'>" +
| " <start-state>" +
| " <transition to='end' />" +
| " <event type='node-leave'>" +
| " <action class='org.jbpm.tutorial.action.MyActionHandler'>" +
| " <source>JBOSSboo</source>"+
| " </action>" +
| " </event>" +
| " </start-state>" +
| " <end-state name='end' />" +
| "</process-definition>"
then in MyActionHandler I can do
Object object = executionContext.getContextInstance().getVariable("backup");
This approach works, but seems like a bit of a hack.
Thanks
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3952220#3952220
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3952220
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user