How to identify task type

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2013 01:30 AM
Hi,
I am having a scenario, where i have to execute bpmn flow programaticaly. For this i am fetching task from process, perform some operations and complete that task. Now i want to perform operations on the basis of task type. For example if current task is User task than i will operation A and if task type is service task i want to perform operation B.
But till now i am not able to find any class/method which will help to find type of task. Is there class or method available for this?
Thanks and Regards
Masarrat Siddiqui
I am having a scenario, where i have to execute bpmn flow programaticaly. For this i am fetching task from process, perform some operations and complete that task. Now i want to perform operations on the basis of task type. For example if current task is User task than i will operation A and if task type is service task i want to perform operation B.
But till now i am not able to find any class/method which will help to find type of task. Is there class or method available for this?
Thanks and Regards
Masarrat Siddiqui
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2013 03:23 AM
You can use RepositoryServiceImpl for this:
OR even better, use the BPMN2.0 model for this, this has explicit ally typed objects for each type of task/activity. See https://github.com/Activiti/Activiti/tree/master/modules/activiti-bpmn-model and https://github.com/Activiti/Activiti/tree/master/modules/activiti-bpmn-converter
public ReadOnlyProcessDefinition getDeployedProcessDefinition(String processDefinitionId) {
Use the PVMActivities (cast to ActivityImpl) and check the type to the getActivityBehaviour() return value.OR even better, use the BPMN2.0 model for this, this has explicit ally typed objects for each type of task/activity. See https://github.com/Activiti/Activiti/tree/master/modules/activiti-bpmn-model and https://github.com/Activiti/Activiti/tree/master/modules/activiti-bpmn-converter
