AnsweredAssumed Answered

Clarification regarding different statuses of a process instance

Question asked by mittalabhi86 on Nov 28, 2013
Latest reply on Dec 6, 2013 by mittalabhi86
Hi,

In one of my project, I am using activiti 5.13.
I want to have some clarifications regarding various possible statuses a process instance can be in.

1. From where do ProcessInstance.isSuspended flag's value is picked up by activiti engine? Asking this because, it's always shown as false, even when SUSPENSION_STATE_ in ACT_RU_EXECUTION is '1'.
2. From where do ProcessInstance.isEnded flag's value is picked up by activiti engine? Is it negation of IS_ACTIVE_ in ACT_RU_EXECUTION?

My understanding on these flags is following. Please correct me if I am wrong:
1. Active - Process is running. Record is there in ACT_RU_EXECUTION & ACT_HI_PROCINST. SUSPENSION_STATE_ = false, & IS_ACTIVE_ = true.
2. Suspended - Process is presently/permanently halted. Record is there in ACT_RU_EXECUTION & ACT_HI_PROCINST. SUSPENSION_STATE_ = true.
3. Completed - Process has ended. Record is there in ACT_HI_PROCINST only. SUSPENSION_STATE_ = true.

If all of these statements are correct, then I do not understand the signification of records where both IS_ACTIVE_ & SUSPENSION_STATE_ are true :(

Beside these, if there are any other possible status for a process instance, please let me know about them as well. I would really appreciate.

Also, I know a bit offtrack, but is there any specific reason for not extending HistoricProcessInstance from ProcessInstance, since basically HistoricProcessInstance = ProcessInstance + (some audit/log fields)

Regards
Abhishek

Outcomes