Automatic task completion and cancellation

A task can complete or cancel itself when the values of case variables meet the configured conditions. The solver then does not need to confirm anything. This is useful, for example, when another task or a calculation fills in the value, or when the task becomes unnecessary. You set the conditions on the General tab in the Task completion section. The section is available for tasks of the User task and Event types.

Do not confuse it with the Conditions button in the editor toolbar. That button opens the dynamic form conditions, see the article Dynamic conditions: builder.

No.ElementPurpose
1Enable automatic task completion when conditions are metTurns on automatic completion. A condition editor appears below the option.
2The task will be completed automatically ifConditions under which the task is completed. Required when the option is turned on.
3Enable automatic task cancellation when conditions are metTurns on automatic cancellation. An editor with the heading The task will be cancelled automatically if appears below the option.

If you turn the option off and save the task, the conditions are deleted.

Condition editor

No.ElementPurpose
1VariableThe template variable or system value whose value is compared.
2OperatorThe comparison method. The options depend on the variable type.
3Compare with variableSwitches the value field to selecting another variable in the form {nazevPromenne}.
4MoveDrag the icon to move the row, including to another group.
5Add rowAdds another condition to the same group.
6Add conditionAdds a new group of conditions.

The Value field appears according to the operator: as a text field for text, as a number for numbers, as a date picker for dates, and as a selection of list values for lists. For the is empty and is not empty operators, there is no value. Rows within a group and groups among themselves are joined by an AND or OR selector, which appears when there are multiple rows or groups. You remove a row with the trash icon, which appears when a group contains more than one row.

OperatorFor which variables
equals, does not equalAll.
greater than, greater than or equal to, less than, less than or equal toNumbers, dates, lists of numbers and dates.
contains, does not containText and multi-value variables.
starts with, ends withSingle-value text.
is empty, is not emptyAll.

In addition to template variables, the Variable field offers system values: (sys) CaseName, (sys) CaseVisRoleId, (sys) CaseStatus, (sys) TaskName, (sys) TaskComment, (sys) TaskDescription and (sys) TaskUserJS.

When the conditions are evaluated

The system does not evaluate the conditions continuously while the form is being filled in. It evaluates them:

  • when the task starts,
  • every time another task in the case is completed or cancelled, for all active tasks, waiting events and tasks to be picked up.

The cancellation conditions are evaluated first, then the completion conditions. For a multi-instance task, they are evaluated against the instance values.

ResultWhat happens
Automatic completionThe task is completed in the same way as if the solver had completed it: the At the end calculations run and the case continues along the outgoing links. The case history contains a record of the automatic completion. The user whose action triggered the evaluation is recorded as the solver.
Automatic cancellationThe task returns to the inactive state and loses its solver. The case does not continue past it. The case history contains a record of the cancellation.
Saving the form does not trigger the condition
If the solver fills in a value in the form and only saves it, the task does not complete itself. The condition is evaluated only when another task in the case is completed. If the task should end immediately after the value is filled in, the solver must complete it manually.

Example

In the sample template “Travel request”, the Book the trip task has an automatic completion condition: Booking reference is not empty. During a test run, Tomáš Kraus picked up the task, filled in the booking number and only saved the form. When a fellow traveller then completed their task, the system evaluated the conditions and completed the Book the trip task automatically. The case continued with sending the booking.

How to set up automatic completion

  1. Open the task and in the Task completion section select Enable automatic task completion when conditions are met.
  2. Select a variable, an operator and, if needed, a value.
  3. Add another condition to the same group with the + icon at the end of the row, and a new group with the Add condition button. Choose whether all conditions must be met (AND) or whether one is enough (OR).
  4. Click Save.

Related: Planning: start, branching and deadline, Dynamic conditions: builder, Multi-instance.

Task calculations

Email Task and Notifications

Syca (opens in a new tab)

Powered by HelpDocs (opens in a new tab)