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

image1

Process without Task switch

Process start

Process end

Case state

CREATED

DONE

Task state

CREATED

DONE

Persistent

NO

NO

Process with session timeout

image19

Process with User Dialog that reaches a session timeout

Process start

User Dialog

Case state

CREATED

DESTROYED

Task state

CREATED

DESTROYED

Persistent

NO

NO

Process with Task switch

image2

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

image20

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.

Process with Task switch

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

image3

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 with session timeout

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

image4

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

image5

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

image22

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.

Case Map with User Dialog that reaches a session timeout

Process start

User Dialog

Case state

CREATED

  • (deleted)

Task state

CREATED

  • (deleted)

Business Case state

CREATED

  • (deleted)

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.