[jboss-user] [JBoss jBPM] - question on createTimerAction.java
X490812
do-not-reply at jboss.com
Mon Apr 9 22:17:08 EDT 2007
I have had to implement an actionHandler that replaces the action because I want to be able to dynamically update the dueDate (see
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=85157
and
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=82969
)
So I have done the following in an actionHandler:
jbpmContext = executionContext.getJbpmContext();
| jbpmContext.save(executionContext.getProcessInstance());
| CreateTimerAction cta = new CreateTimerAction();
|
| //Timer and duedate are required fields
| cta.setTimerName(timerName);
| cta.setDueDate(strDueDate);
|
| if (transitionName != null)
| cta.setTransitionName(transitionName);
| if (repeat != null)
| cta.setRepeat(repeat);
| if (timerAction != null)
| //cta.setTimerAction((Action) Class.forName(timerAction).newInstance());
| cta.setTimerAction(new Action(new Delegation(timerAction)));
And done the following in a process:
<action class="com.homeq.payoffdemand.jbpm.actions.CreatePDWTimerActionHandler">
| <timerName>UPES_Wait_for_Expiry</timerName>
| <dueDate>fidelityMaintWait</dueDate>
| <transitionName>UPES_Wait_for_Expiry_Decision</transitionName>
| <timerAction>com.homeq.payoffdemand.jbpm.actions.upes.CalcWaitForExpiryActionHandler</timerAction>
| </action>
Does this seem reasonable? is there a better way? In PaRticular, how do I set the action. The above timerAction is an implementation of actionHandler, and I don't know if this is the correct way to set it into the setTimerAction call - see above.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035844#4035844
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035844
More information about the jboss-user
mailing list