Skip to content

Task completion expressions

A Task Outcome can require a Boolean expression to pass before completion. The rule is checked against current saved data when the completion command runs. A successful authoring validation only establishes that the expression is valid; it does not establish that a Task satisfies it.

Root or pathMeaning
WorkingData.<FieldKey>Admitted fields of the Definition’s Working Data Part.
Task.OutcomeCommentThe completion comment.
Evidence.HasAttachmentAttachment evidence supplied by the completion context.
Task.OutcomeComment IS NOT EMPTY
Evidence.HasAttachment = TRUE
WorkingData.EvidenceFile IS NOT EMPTY
WorkingData.Note IS NOT EMPTY AND Task.OutcomeComment IS NOT EMPTY

The Working Data examples require fields with those exact keys. Use the authoring metadata to discover supported fields and their operators. File fields support only IS EMPTY and IS NOT EMPTY, not file-id equality. A Cancel outcome cannot depend on Working Data; use a comment or attachment requirement for that outcome.

Working Data operands include Bool, Integer, Decimal, String/Text, dates and times, User/Role/Reference ids, single Select keys and Classifier ids. Money, Address, multi-Select and Table/InverseReference fields are not admitted. Read the returned field support and operator metadata before using a path.

The profile supports AND/OR/NOT, compatible comparisons, IN/NOT IN, BETWEEN, text tests and null/empty checks where the operand family allows them. Only a valid TRUE passes; missing values in ordinary comparisons produce unknown.

Numeric addition and subtraction are admitted; multiplication and division are not. Text comparisons are case-sensitive, while text matching operators are case-insensitive. Use IS NULL, not equality with a NULL literal.

Date and instant arithmetic follows the shared temporal rules. The available functions need no ambient clock, actor or workspace time zone:

  • START_OF_MONTH, END_OF_MONTH;
  • ADD_DAYS, ADD_MONTHS, ADD_YEARS;
  • ADD_HOURS, ADD_MINUTES, ADD_SECONDS.

For example, ADD_DAYS('2024-02-28', 1) = '2024-02-29' is valid. The profile rejects @today, @now, @currentUserId, and the component/extraction functions YEAR, MONTH, HOUR, DATE, TIME and their siblings, even where a particular argument looks timezone-free.

It declares no collections: EXISTS, ANY, ALL and collection COUNT are unavailable. It also does not admit arbitrary Context traversal, Reference traversal, calculated-field aggregate/value functions, regex MATCHES or Security functions. A scalar Reference field, when offered, provides its id, not an object graph.

Current limits are 16 KiB of UTF-8 source, 1,024 tokens, 256 nodes, depth 32, 128 literal list members and 16 function arguments. The installed authoring description supplies the limits applied during validation.

Use the Outcome’s completion-requirement editor under Task Definitions. Supported C# automation uses the Definition query service’s authoring and validation operations, then the command service’s completion-requirement operations; see Tasks configuration automation. Read the installed developer surface for exact service signatures.

The installed Configuration OpenAPI also documents Tasks completion authoring and validation HTTP operations. Use its request/response schemas or the supported C# services. Saved rules retain bound field dependencies; renaming a field does not rebind the rule to an unrelated field reusing its old key, and a missing dependency fails closed. Update the rule before removing its inputs.