[jboss-user] [JBoss jBPM] - How to get TaskInstance in a ActionHandler

freak182 do-not-reply at jboss.com
Wed Jun 3 06:08:13 EDT 2009


Hello,

How can i get TaskInstance in a executioncontext..here is the scenario:


  | ..........................
  | 
  | <task-node name="approver A">
  | 		
  | 		<timer duedate="1 minute" name="timertest" transition="to approver B">
  | 			<action class="com.ccti.workflow.WorkflowTimer"></action>
  | 		</timer>
  | 		
  | 		<transition to="approver B" name="to approver B"></transition>
  | 	</task-node>
  | 

and here the WorkflowTimer code:


  | public class WorkflowTimer implements ActionHandler {
  | 
  | 	private static final Log log = LogFactory.getLog(WorkflowTimer.class);
  | 	
  | 	/* (non-Javadoc)
  | 	 * @see org.jbpm.graph.def.ActionHandler#execute(org.jbpm.graph.exe.ExecutionContext)
  | 	 */
  | 	public void execute(ExecutionContext context) throws Exception {
  | 		
  | 		TaskIntance instance = context. ?
  | 		
  | 		
  | 	}
  | }
  | 

I already tried context.getTaskInstance() but it give me NPE.

Thanks a lot.
Cheers.


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4234916#4234916

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4234916



More information about the jboss-user mailing list