[jboss-user] [jBPM] New message: "Re: Terminate the task"

Santanu Saraswati do-not-reply at jboss.com
Tue Jan 12 22:16:59 EST 2010


User development,

A new message was posted in the thread "Terminate the task":

http://community.jboss.org/message/519725#519725

Author  : Santanu Saraswati
Profile : http://community.jboss.org/people/saraswati.santanu

Message:
--------------------------------------------------------------
If you have already arrived at the task then it does not really make sense to cancel the job.
 
You can do the first approach you have mentioned in your post. However the code snippet looks complex and I could not make out what are you trying to achieve. This, I thought, can be implemented easily. Let us have a sample flow like this:
 
+*<process name="ForumFlow" xmlns="http://jbpm.org/4.0/jpdl">
   <start name="start1" g="189,20,48,48">
      <transition name="to state1" to="state1" g="-49,-18"/>
   </start>
   <state name="state1" g="176,116,92,52">
      <transition name="to task1" to="task1" g="305,205:-44,-18"/>
   </state>
   <task name="task1" g="182,252,92,52">
      <transition name="success" to="end1" g="-42,-18"/>
      <transition name="cancel" to="state1" g="131,216:-49,-18"/>
   </task>
   <end name="end1" g="215,361,48,48"/>
</process>*+
 
At the task if you execute when you want to cancel the task you will land you want on cancellation
 
+*taskService.completeTask(taskId, "cancel")*+
 
However, you can provide your usecase as Ronald suggested. Then we can give more relevent code samples.
 
Two comments on the flow you uploaded:
1. I dont think Fork without join make much sense.
2. Java method name follow camel case convention with the first letter in small. Method names like "SysActivityMet" looks a bit odd.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/519725#519725




More information about the jboss-user mailing list