the outgoingTransition of serviceTask

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2012 02:24 AM
If I define a service task,and I assign a class to this service task, this class implements the interface of ActivityBehavior,
Whether I need to assign the outgoingtransition of serviceTask in this class,it can be taken to the next task?
Whether I need to assign the outgoingtransition of serviceTask in this class,it can be taken to the next task?
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2012 06:28 AM
You can use a "JavaDelegate" instead, this hides some internal flow-logic and allows you tu just execute some code as part of the process, leaving the rest in the hands of activiti. Unless, off course, you want finer-grained control, in that case:
- Can you re-phraze this part of your question, I don't really get what you're asking:
- Can you re-phraze this part of your question, I don't really get what you're asking:
Whether I need to assign the outgoingtransition of serviceTask in this class,it can be taken to the next task?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2012 10:07 PM
I mean that If i want a finer-grained control, I must assign the outgoingtransition in this class, it can be taken to the right task from assigned outgoingtransition?
the codes are as follows:
PvmTransition pvmTransition=execution.getActivity().getOutgoingTransitions().get(0);
execution.take(pvmTransition);
the codes are as follows:
PvmTransition pvmTransition=execution.getActivity().getOutgoingTransitions().get(0);
execution.take(pvmTransition);
You can use a "JavaDelegate" instead, this hides some internal flow-logic and allows you tu just execute some code as part of the process, leaving the rest in the hands of activiti. Unless, off course, you want finer-grained control, in that case:
- Can you re-phraze this part of your question, I don't really get what you're asking:Whether I need to assign the outgoingtransition of serviceTask in this class,it can be taken to the next task?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2012 01:54 AM
Best approach for this is to put a exclusive gateway right after the (service)task that makes the decision where the execution should go next. This can be done setting a variable in the service task and evaluating it using conditionExpressions on the outgoing sequence flows on the gateway.
