How to close task within create task listener

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2014 07:46 AM
I have a requirement to implement skip OR execute human activities in process flow. I have configured a task listener on create task event.
Should I am able to close this task with in lsitener itself using task object.
Basically I am expecting features as below.
public class CommonTaskListener implements TaskListener{
private static final long serialVersionUID = 1L;
@Override
public void notify(DelegateTask task) {
if(based on some condition) tasl.close()///Is there any method like this.
else { run other business logic}
}
}
Anybody let me know if is there any feature avaiable to implement one of the critical business requirement.
Should I am able to close this task with in lsitener itself using task object.
Basically I am expecting features as below.
public class CommonTaskListener implements TaskListener{
private static final long serialVersionUID = 1L;
@Override
public void notify(DelegateTask task) {
if(based on some condition) tasl.close()///Is there any method like this.
else { run other business logic}
}
}
Anybody let me know if is there any feature avaiable to implement one of the critical business requirement.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2014 02:26 AM
Hi,
There are several options. I pick only two of them:
Regards
Martin
There are several options. I pick only two of them:
- "Your" option - I used something similar for simulation purposes (another case could be debug and replay/playback). Task create event scheduled new event to complete the task in the event calendar (taskService.complete(taskId)).
- More straight forward way is to describe such a case in process definition (e.g. exclusive gateway - do not create userTasks, which are not needed).
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2014 12:38 AM
HI Martin,
Perfectly agree with you that option 2 is ideal way to implementing this requirement. We have a process with 10 activities and these activities executes based on some business conditions means upfront we never know which one executes and which one not. So I have to keep a decision gateway to bypass the flow. Our customer does't want decision gateway's to be put in between all the activities. I am wondering why activiti has no property to skip/run the activiti. I can see this feature in most of the BPM suits.
Perfectly agree with you that option 2 is ideal way to implementing this requirement. We have a process with 10 activities and these activities executes based on some business conditions means upfront we never know which one executes and which one not. So I have to keep a decision gateway to bypass the flow. Our customer does't want decision gateway's to be put in between all the activities. I am wondering why activiti has no property to skip/run the activiti. I can see this feature in most of the BPM suits.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2014 06:20 AM
> I am wondering why activiti has no property to skip/run the activiti. I can see this feature in most of the BPM suits.
We implement the BPMN 2.0 spec. The spec doesn't have this, thats the reason why we dont have it.
We implement the BPMN 2.0 spec. The spec doesn't have this, thats the reason why we dont have it.
