[jboss-user] [jBPM Users] - Re: How to suspend Join Execution

pradeep.gulla do-not-reply at jboss.com
Wed Dec 2 13:21:28 EST 2009


Hi Santanu,


The code: taskService.deleteTask(task.getId()); throwing exception

tasks related to an execution must be completed. they cannot just be deleted

My Implementation:

Process XML:


  | <process name="test_workflow" version="4" xmlns="http://jbpm.org/4.0/jpdl">
  | <start g="15,390,80,40">
  |  <transition to="validate approval sequence"/>
  | </start>
  | <decision name="validate approval sequence" expr="${approvalSequence}">
  |  <transition name="parallel"  to="assign parallel tasks"/>
  |  <transition name="seqential" to="first sequential Task"/>
  | </decision>
  | <fork name="assign parallel tasks">
  |  <transition to="first parallel task"/>
  |  <transition to="second parallel task"/>
  |  <transition to="third parallel task"/>
  | </fork>
  | <task name="first parallel task">
  |  <transition to="wait"/>
  | <transition name="rework" to="disable all active tasks"/>
  | </task>
  | <task name="second parallel task">
  |  <transition to="wait"/>
  | <transition name="rework" to="disable all active tasks"/>
  | </task>
  | <task name="third parallel task">
  |  <transition to="wait"/>
  | <transition name="rework" to="disable all active tasks"/>
  | </task>
  | <join name="wait">
  |  <transition to="first sequential task"/>
  | </join>
  | <task name="first sequential Task">
  |  <transition name="approve" to="second sequential Task"/>
  | </task>
  | <task name="second sequential Task">
  |  <transition name="approve" to="stop"/>
  | </task>
  | <!-- Should disable all active parallel tasks -->
  | <custom name="disable all active tasks" class="ReworkHandler">
  |  <transition to="rework task"/>
  | </custom>
  | <task name="rework task">
  |  <transition name="restart" to="validate approval sequence"/>
  | </task>
  | <end name="stop"/>
  | 

Handler class:

  | public class ReworkHandler implements ExternalActivityBehaviour{
  |     public void execute(ActivityExecution execution) {
  |              ..................
  |             taskService.deleteTask(task.getId());
  |     }
  | }

Am I' missing anything ??
.

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

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



More information about the jboss-user mailing list