null


Skip to end of banner
Go to start of banner

initial condition

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

One or more conditions can be set for a trigger for a named event in the workflow.Adding the "initial":true condition to a trigger listens for the trigger event that occurs when the document is the initial change to the state for a workflow applied to a document.

This trigger will only listen for the first transition into a state. The condition is boolean with a value of true or false and can be constrained to a single named state in the workflow by using together with the "state" condition.

When the named workflow event occurs the trigger will check that any required condition is met, and if met set one or more actions.

If "initial" condition is added together with the "final" condition to an event, the condition is evaluated as an OR function.


JSON Condition

JSON Code

Note

"initial":(boolean true/false)

"conditions":
[
	{"initial":true}
],


The trigger action will occur if the current state is the initial change to a state.

The initial condition can be constrained to a named state by including the json trigger state condition

  • "conditions":[{"initial":true},{"state":"Review"}],

The initial parameter value is boolean

  • "initial":true

  • "initial":false

Example on-change-state event

"triggers":
[
    {"event": "on-change-state",
    "conditions":
    [
        {"final":true}
    ],
    "actions":
    [
        {"action": "clean-messages"}
    ]}
]

If adding the JSON trigger using workflow builder visual builder there is no need to include the opening "triggers": JSON markup notation, it is added automatically by workflow builder.

The trigger action clears any existing messages on the content

  • "actions":[{ "action":"clean-messages"}],

The messages are only cleared on the change of state to the final state in the workflow

  • "conditions": [{"final": true}],


  • No labels