Skip to main content

How actions work

Actions are the side effects of a workflow. You define them once in the definition’s Actions tab, then reference them from a node’s On Enter chain or from a transition’s action chain. Chains run in order; if an action fails, the instance’s variables roll back to their node-entry state and the instance routes to the error node (or is marked Failed). A few conventions apply across the catalog:
  • Value parameters accept expressions. Anything marked expr below can be a literal, contain {{ references }}, or be switched to expression mode and computed with a formula like $instance.retries + 1.
  • Actions target the anchor by default. Document and WorkView actions accept an optional DocumentId / ObjectId parameter; leave it empty to act on the workflow’s own document or object, or supply an expression (for example an ID read from a keyword) to act on a related document or object. The accompanying TargetDocumentTypeId / TargetClassId setting tells the designer which type the related target is, so its pickers offer the right keywords or attributes — it has no runtime effect.
  • Some actions capture output. Actions with an IntoVariable parameter store their result as an instance variable for later steps to read as instance.<name>.

Keyword actions (document workflows)

ActionParametersWhat it does
Keyword.AddKeywordTypeId, Value (expr), DocumentId?Appends a value to a multi-value keyword
Keyword.UpdateKeywordTypeId, Value (expr), DocumentId?Sets a single-value keyword; skipped if the value resolves empty
Keyword.RemoveKeywordTypeId, Value (expr), DocumentId?Removes one specific value from a keyword
Keyword.RemoveByTypeKeywordTypeId, DocumentId?Clears all values of a keyword type
Keyword.SetGroupGroupId, Keywords (list of KeywordTypeId + Value), DocumentId?Replaces a single-instance keyword group
Keyword.SetMultiGroupGroupId, Instances (list of keyword lists), DocumentId?Replaces all instances of a multi-instance keyword group
Keyword.AddGroupInstanceGroupId, Keywords (list), DocumentId?Appends one instance to a multi-instance keyword group

Document actions (document workflows)

ActionParametersWhat it does
Document.AddNoteText (expr), NoteTypeId?, DocumentId?Attaches a note to the document; uses the default note type when none is given
Document.DeleteDocumentId?Soft-deletes the document to the trashcan
Document.ReindexTargetDocumentTypeId, DocumentId?Changes the document’s type

WorkView actions (WorkView workflows)

ActionParametersWhat it does
Workview.SetAttributeAttributeId, Value? (expr), ObjectId?Sets one attribute; omit the value to clear it
Workview.SetMultipleAttributesAttributes (list of AttributeId + Value), ObjectId?Sets several attributes in one call
Workview.CreateObjectClassId, Attributes (list), IntoVariableCreates a new object and stores its ID in an instance variable
Workview.DeleteObjectObjectId?Soft-deletes the object

Variable actions

ActionParametersWhat it does
Property.SetName, Value? (expr)Sets an instance variable; omit the value to clear it
Property.GetFrom, IntoCopies one instance variable to another
Property.IncrementName, By (default 1)Increments a numeric variable; a missing variable starts at 0

Email

ActionParametersWhat it does
Email.SendHost, Port (default 587), UseTls (default true), Username?, Password?, From, To, Cc?, Bcc?, Subject (expr), Body (expr), IsHtml (default false)Sends an email over SMTP. To accepts a comma-separated list.
Never hardcode SMTP credentials in the definition. Reference configuration instead: {{ env.smtp_host }} for the host and user, and {{ secrets.smtp_password }} for the password. Secrets are encrypted at rest and never written to instance history.
The email Body field uses the template editor with {{ }} autocomplete, so you can mix prose with references:
Invoice {{document.kw.InvoiceNumber}} was approved by {{identity.username}}.

Workflow control

ActionParametersWhat it does
Workflow.StartDefinitionId, Version? (omit for latest published), SetVars?, AnchorDocumentId?, AnchorWorkviewId?, IntoVariable?Starts a child workflow and continues immediately (fire-and-forget). The child inherits the parent’s anchor unless an anchor parameter overrides it; SetVars seeds its variables; IntoVariable captures the child instance’s ID. Spawn cycles and duplicate active instances are rejected.
Workflow.EndReason?Completes the instance immediately; the optional reason lands in the history

Scripts

ActionParametersWhat it does
Script.RunScriptSlug, EntityId? (defaults to the anchor), Input? (expr), TriggerEvent?, IntoVariable?Runs a script in the script engine and optionally captures its output as an instance variable. Workflow scripts run under the engine’s service account with a 10-second timeout.
To pass a structured input, write an object literal in the formula editor:
{ invoiceId: $document.kw.InvoiceNumber.Value, amount: 1000 }
See Extensibility for how scripts themselves are written and managed.

References & expressions

How to write the values, conditions, and templates these parameters accept.