cancel
Showing results for 
Search instead for 
Did you mean: 

Relationship between process instance and activityId

vickysirwani
Champ in-the-making
Champ in-the-making
Is there any relationship between a process instance and an activityId?
Can a process instance have multiple activityIds?
If yes, how would it reflect in REST results while fetching process instances?
1 REPLY 1

sahusunil
Champ in-the-making
Champ in-the-making
Yes, there is relationship between process instance and activiti id. The process instance is just one running instance of process definition, activiti id is individual elements under particular process instance. For example, if your process definition has UserTask1, CallActivity1 and UserTask2. Once you start the process instance for this definition, you will see one entry for this process instance in ACT_RU_EXECUTION table with activiti id for UserTask1. Once you finish this task, it will take you to the CallActivity and you will have three entry in database, one for parent process, second for CallActivity and 3rd for first user task under CallActivity so at given time, you will have all running instance under that process instance in this database table which clearly means that one process instances can have multiple activiti id.

As far as, fetching the process instance data is concerned, you can use REST API call as mentioned below but as per user guide this method is deprecated with Activiti 5.15.1. You can use this API call and verify. It's a question for Activiti core team regarding the new method if they have given in REST API call with version 5.15.1.

http://localhost:8080/activiti-rest/service/process-instance/{processInstanceId}

Any Idea jbarrez/Martin/Tijs??

Thanks
Sunil