Skip to main content

Action Sets PRO

Key name: ActionSets
Element type: Array (Dictionary)
Status: Optional

Specify here the action sets you want Octory to run. Each action set can have multiple actions and triggers.
It has an Actions array key which holds the actions you want to execute. They will be executed depending on the triggers and the condition you specify. Triggers are specified in the Triggers array key.

When the set is triggered, it will evaluate its condition to know whether it should execute its actions or not. If no condition is specified, the set will execute its actions.

For a detailed explanation on Actions and Triggers, refer to the link in the table.

Keys

NameTypePossible valuesRequired
TypeStringChained, ParallelRequired
ConditionString-
TriggersArray (String)-Required
ActionsArray (Dictionary)-Required
ContinueAfterFailureBoolean-

Detail

Type Required

Type: String
Possible values: Parallel, Chained
Explanation: With Parallel, all the actions of the set will be executed without waiting for the previous one to be executed. With Chained, you specify that you want to wait for each action to be executed before executing the next one.

tip

Use Chained when your actions depend on one another. By specifying Chained, you can wait for an action to populate a variable and then execute an other action which needs this variable.

Condition

Type: String
Explanation: Conditionally execute the actions in the set. More information on conditions.

Triggers Required

Type: Array (String)
Explanation: Let Octory know when to execute the actions in the set. Whenever a trigger in the array is met, the application will try to execute the set, accordingly to its condition if present.

Actions Required

Type: Array (Dictionary)
Explanation: The actions that the set will execute when triggered, and if the condition is verified (if present).

ContinueAfterFailure

Type: Boolean
Explanation: If set to true, within a Chained set, the subsequent action will proceed even if the preceding one encounters an error or does not conclude successfully. Default is false.

info

When applying a condition to a chained action, if the condition evaluates to false, it will be treated as a failure of the action.

Example

  • First set: Triggered at launch. Send a request to the Jamf API to retrieve the variable ComputerName. When the request has returned, send a request to get the UserName.
  • Second set: Triggered when the app terminates. Send the TerminationSuccess request.
  • Third set: Triggered when the variable ComputerName is updated. Executed only if the variable ComputerName is not empty. Execute the script WriteComputerName.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<key>ActionSets</key>
<array>
<dict>
<key>Type</key>
<string>Chained</string>

<key>Triggers</key>
<array>
<string>Launch</string>
</array>

<key>Actions</key>
<array>
<dict>
<key>Type</key>
<string>SendRequest</string>
<key>Request</key>
<string>ComputerName</string>
</dict>
<dict>
<key>Type</key>
<string>SendRequest</string>
<key>Request</key>
<string>UserName</string>
</dict>
</array>
</dict>

<dict>
<key>Type</key>
<string>Parallel</string>

<key>Triggers</key>
<array>
<string>Termination</string>
</array>

<key>Actions</key>
<array>
<dict>
<key>Type</key>
<string>SendRequest</string>
<key>Request</key>
<string>TerminationSuccess</string>
</dict>
</array>
</dict>

<dict>
<key>Type</key>
<string>Chained</string>

<key>Triggers</key>
<array>
<string>Update(ComputerName)</string>
</array>

<key>Condition</key>
<string>ComputerName != ""</string>

<key>Actions</key>
<array>
<dict>
<key>Type</key>
<string>ExecuteScript</string>
<key>Script</key>
<string>WriteComputerName</string>
</dict>
</array>
</dict>
</array>
<!-- ... -->
</dict>
</plist>