null
null


Skip to end of banner
Go to start of banner

JSON Trigger actions

Skip to end of metadata
Go to start of metadata

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

Compare with Current View Version History

Version 1 Next »

Overview

One or more trigger actions can be set for a named event in the workflow.When the workflow event occurs the trigger will check that any required condition is met, and if met the action(s) will occur.

Actions

A list of actions to perform once the event has occurred and the conditions are fulfilled. A single trigger may include one or more actions.


Triggers can be added to a workflow using workflow builder.

workflow builder visual editor - edit workflow panel with trigger added
"triggers:"
[
	{"event": "on-change-state",
		"conditions":
		[
			{"state": "Rejected"} ],
		"actions":
		[
			{"action":"set-message", "type":"info", "title":"Hey My Wonderful design and Tech Team", "body":"We have some work to do ... it was rejected!!!"}
		]
	}
]

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

If the action includes a "user" parameter, the users can only be added using the userId. The "group" parameter value can be added as either groupId or groupName. Both the "user" and the "group" parameters accept workflow parameters.

"change-state"

You can use the change-state action in a trigger to change the workflow state automatically on a workflow event.cdmc_visualeditor_workflowtrigger_changestateaction_named_state_condition.png

"publish-page"

cdmc_visualeditor_addtriggeraction_publishpage.png

"approve"

You can use this action in a workflow trigger to approve a workflow approval. This action completes the approval, even if there are pending assigned reviewer decisions or a reviewer rejection decision.cdmc_visualeditor_workflowtrigger_action_approve_useradded_optiontochooseapprovaldisplayed.png

The approve action requires that you specify a user. This user is logged in the document activity report as the approving reviewer.

By default, the approval action applies to the first named approval in the workflow state specified by the trigger event. Optionally, you can configure the approve action to target a different approval within the workflow.

"reject"

You can use this action in a workflow trigger to reject a workflow approval. This action completes the approval (as a rejection) even if there are pending assigned reviewer decisions or a reviewer approval decision.cdmc_visualeditor_addworkflowtrigger_action_reject_useradded_optionalapprovaldropdown_displayed.png

The reject action requires that you specify a user. This user is logged in the document activity report as the rejecting reviewer.

By default, the approval action applies to the first named approval in the workflow state specified by the trigger event. Optionally, you can configure the reject action to target a different approval within the workflow.

"assign" and "unassign"

The trigger action "assign" assigns a user to a named approval.

  • action (assign

    • approval - the name of the approval to assign. If not specified, the default approval is used

    • assigner - Atlassian  userID for the assigner (if no value is added, the app add-on user is the assigner for the action)

    • user ❗️ Atlassian userID for the assignee (accepts one value only)

    • group❗️ Atlassian groupID or groupName for assignees (accepts one value only)

    • comment - comment for the assignation operation

Only one user and one group can be assigned in a single "assign" action. You cannot add multiple values for the user or group parameters.


❗️ Mandatory parameters

user and group parameters for assignees

At least one value must be added for an assignee (using either user or group). The user parameter value must be specified unless a group is specified using the group parameter instead.


† Default approval

If no approval name is specified in the trigger action, the default approval is the approval in the state named in the trigger event condition.

If the state has multiple approvals, the default approval is the first approval listed in the state's JSON markup.


"set-expiration"

cdmc_visualeditor_workflowtrigger_action_setexpiration_withduedatedropdown_period_iso.png

"clear-expiration"

cdmc_visualeditor_addtriggeraction_clearexpiration.png

"set-message"

cdmc_visualeditor_addtriggeraction_setmessage_infotype.png

"clean-messages"

The "clean-messages" action removes all messages (set by a “set-message" trigger action) on the content.

  • action (clean-messages

There are no parameters for this trigger action.


"remove-restrictions"

cdmc_visualeditor_addtraiggeraction_removerestrictions_nocontentid_added.png

"send-email"

cdmc_visualeditor_addtriggeraction_sendemail_withrecipents.png

Related Pages

  • No labels