Overide UserTask with default complete status programmatical

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2011 11:39 AM
I am required to implement user task in an activiti workflow programmatically. Is it possible to implement the user task with default success status and go ahead with execution of further tasks? For instance: there are 2 tasks: START ->USERTASK->SERVICE->END
I want the usertask should not block the execution, instead it should return a default complete status and go ahead with the execution of service task.
I want the usertask should not block the execution, instead it should return a default complete status and go ahead with the execution of service task.
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2011 02:13 PM
Look at the examples and testcases. Especially the testcases/examples for the usertasks. Most will be 'completed' programatically.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2011 06:42 PM
If you have a reference to the taskId and the TaskService, you can simply mark the task complete:
TaskService taskService= processEngine.getTaskService();
Task task = taskService.createTaskQuery().processVariableValueEquals("taskId", taskId).singleResult();
taskService.complete(task.getId());
