Process States

3 Months Ago
Andread
Business rules

Summary

Bizagi sets different states to each process instance. Each instance has a different state depending on the route it has taken.
This article seeks to explain the different states.

Applies to

All Bizagi versions

States

The possible states that a process can have during its life cycle are the following:

1. Initiated: a case is in Initiated state when it is created and the first Task has started. However, no further action has been taken on it.

2. Running: a user has interacted with the process, for example, when first task is done or even Save has been clicked. 

3. Suspended: this state has been deprecated. A case could be changed to Suspended by means of a SOA layer method (method also deprecated) or by a CHelper function (deprecate). When a case is suspended it does not appear in anyone's inbox and if the form is directly accessed it is not rendered. The dates for solution are not changed, only the access to the case and the form.

4. Aborted: this state is now called Cancelled. However, the code in Bizagi handles the state as Aborted.  A case can be set as Aborted through three options:

  • Through the administration menu: Admin > Process Management > Cases > Cancel cases. This is the preferred method.
    From this window you can cancel one or more cases at the same time. 
  • Through the SOA WorkflowEngineSOA service, that contains two methods which are available by asmx:
    • abortCases
    • abortCasesAsString
  • Using the CHelper abortProcess method where the following applies:
    OnlyProcess = 1, ProcessAndParentProcess = 2, NotProcessAndParentProcess = 3
    The method receives the following parameters: abortProcess (ICAPIWorkItem Me, int iCaseId, EProcessAbortOptions eAbortOptions)
    Example:  CHelper.abortProcess (Me, Me.Case.Id, 1, "Reason")

5. Completed: A case is Completed when all its tasks have been successfully finished.

6. NotInitiated: A case is NotInitiated when it is created without any process tasks started.

7. CanceledByCompensation and 8. CanceledByException: these two states are set when the case is cancelled using the Compensation Event and the Cancel event.

More about the Suspended state (deprecated) 

To move a case to Suspendedstate, the following were available and are now deprecated.  However, for illustration purposes these are the options:

  • CHelper.suspendProcess, where OnlyProcess =1, ProcessAndParentProcess =2, NotProcessAndParentProcess =3
    The method receives the following minimum parameters:
    suspendProcess (ICAPIWorkItem Me, int iCaseId, EProcessSuspendResumeOptions eSuspendResumeOptions)
    Example: CHelper.abortProcess(Me, Me.Case.Id, 1, "Reason")

  • SOA WorkflowEngineSOA service. This service has been deprecated. 
    • suspendCases, method is only available by asmx
    • suspendCasesAsString, method executed by both asmx and ws-security

To exit the Suspened state was known as Resume the case.
If you want to exit the suspended state, there are two options: 

  • Through the SOA WorkflowEngineSOA service, which contains two methods:
    • resumeCases: This method is only available by asmx
    • resumeCasesAsString: This method can be executed by both asmx and ws-security
  • With the CHelper's resumeProcess method. 
    The following options can be used in executing the me
    thod: OnlyProcess =1, ProcessAndParentProcess =2, NotProcessAndParentProcess =3
    The method receives the following minimum parameters:
    resumeProcess (ICAPIWorkItem Me, int iCaseId, EProcessSuspendResumeOptions eSuspendResumeOptions)
    Example: CHelper.resumeProcess (Me, Me.Case.Id, 1);

The execution of these methods was only be effective if the state of the process was suspended. Once the execution finished, the new state of the case was the previously assigned state.

Rate this Article:

Details

Last Modified:3 Months Ago
Last Modified By: Andread
Type: INFO
Level: Expert
Rated 5 stars based on 1 vote
Article has been viewed 212 times.

Options