States
During process execution, the corresponding case and tasks have various states. Typically, cases start non-persistently, i.e., they are stored in memory only. At this time, their state is CREATED. As soon as a case hits a task switch, Axon Ivy persists the case and its tasks by storing them in the system database. You can retrieve persisted cases and tasks only with the query APIs. Non-persisted cases and tasks are not retrievable by API.
Process without Task switch
Process start |
Process end |
|
---|---|---|
Case state |
CREATED |
DONE |
Task state |
CREATED |
DONE |
Persistent |
NO |
NO |
Process with session timeout
Process start |
User Dialog |
|
---|---|---|
Case state |
CREATED |
DESTROYED |
Task state |
CREATED |
DESTROYED |
Persistent |
NO |
NO |
Process with Task switch
Process start |
Task switch |
Process end |
|
---|---|---|---|
Case state |
CREATED |
RUNNING |
DONE |
Task state (Task 1) |
CREATED |
DONE |
|
Task state (Task 2) |
SUSPENDED |
DONE |
|
Persistent |
NO |
YES |
YES |
Task switch states in detail
In detail, the tasks are going to more technical task states inside a task switch element. After a task reaches a task switch, its state is READY_FOR_JOIN. As soon as all input tasks have arrived at the task switch, Axon Ivy sets the states of these input tasks to JOINING and joins their process data sets into one process data set forwarded to all output tasks. Then, Axon Ivy marks input tasks as DONE. It then creates the output tasks in state SUSPENDED.
Before Task switch |
Task switch (reached) |
Task switch (entry) |
Task switch (done/out put) |
After Task switch |
|
---|---|---|---|---|---|
Case state |
CREATED/ RUNNING |
RUNNING |
|||
Task state (Task 1) |
CREATED/ RESUMED |
READY_FOR _JOIN |
JOINING |
DONE |
|
Task state (Task 2) |
SUSPENDED |
RESUMED |
|||
Persisten t |
NO/YES |
YES |
Task with session timeout
If a user resumes a task with a user dialog and the session of the user times out, Axon Ivy sets the task state back to SUSPENDED and resets the associated case to the task switch element.
Task switch |
User Dialog |
Task switch (after session timeout) |
|
---|---|---|---|
Case state |
RUNNING |
RUNNING |
RUNNING |
Task state (Task 1) |
SUSPENDED |
RESUMED |
SUSPENDED |
Persistent |
YES |
YES |
YES |
User Task
A User Task combines a Task Switch Event and a User Dialog. If the user starts to work on an ordinary HTML User Dialog, Axon Ivy changes the task state to RESUMED. If this is an ‘Offline Dialog’, Axon Ivy does not change the task state before the user submits the task form. Once submitted, Axon Ivy changes the state from SUSPENDED to RESUMED. Axon Ivy then executes subsequent steps until the task is finally DONE. See also Offline Tasks.
Signal Boundary Event
A User Task with an attached Signal Boundary Event listens for a signal while its task is in SUSPENDED state. After receiving the signal, Axon Ivy destroys the task. Execution continues with a newly created follow-up task.
Case Map with session timeout
When a task is created by Case Maps, its initial state is SUSPENDED. Axon Ivy immediately persists the task in the database. If the user session expires while working on this initial task, Axon Ivy will delete it, along with the associated Case and Business Case.
Process start |
User Dialog |
|
---|---|---|
Case state |
CREATED |
|
Task state |
CREATED |
|
Business Case state |
CREATED |
|
Persistent |
YES |
Other task states
There are more task states, mainly for task synchronisation, error handing,
intermediate events, or user aborts. To learn more about task states, refer to
the enumeration ch.ivyteam.ivy.workflow.TaskState
in public API.