GroundControl includes a powerful system to automatically select and deploy Workflows to devices based on pre-defined criteria. It works like this:
- You plug a mobile device into a GroundControl Launchpad.
- The Launchpad reads basic device information, including serial number, UDID, and model, and sends this information to the GroundControl server.
- The server uses the Automation Rules to determine which workflow(s) to deploy, if any.
- The server tells the Launchpad to deploy the specified workflow(s) sequentially.
For example, you can set up one workflow to deploy when an iPod is connected, and a different workflow for iPad.
When at least one automation rule is enabled, the navigation bar will display a check next to the Automation tab. This means a workflow may begin automatically when you connect a device.
It’s helpful to understand several terms:
- Rule: A set of one or more conditions to check, plus a set of one or more workflows to run. There’s a control so you can enable or disable each rule. You can give your rules names, like “Erase patient iPads.”
- Trigger: Determines what triggers the rule to run, for example a rule can run when a device is attached, or it can run if a device is disconnected from the Launchpad.
- Condition: A single comparison that evaluates to true or false. For example, Device Name starts with “Nursing iPad”.
- Built-in Attribute: Details for a device or launchpad that are maintained by GroundControl. For example, Device Serial, Device Erase State, Launchpad Name.
- Custom Attribute: These are attributes you may create and maintain yourself. See Attributes.
- Comparison: A way of comparing one value to another, for example Is, Is Not, Starts With, Contains.
Creating A Rule
1. Click the Automation tab, then New Rule.
2. Enter a name for the rule in the Rule Name box.
3. Select a trigger from the dropdown to determine when the rule should run.
Click Add an optional condition to select from the built-in attributes and custom attributes.
4. Add a Comparison to the attribute and fill in the right-hand side of the comparison when needed.
5. If desired, add additional conditions. IMPORTANT: When you add multiple conditions, all must be true for the workflows to run.
6. Click Choose Workflow… and select a workflow to run when all conditions are true. NOTE: Each rule must have at least one workflow.
7. Add additional workflows if you like. Unlike conditions, the order of workflows are important. You may arrange the workflows to execute in the desired order by dragging on the three-lined “ hamburger” icon.
To remove conditions and workflows, click Remove.
8. Click Save.
Enabling and Disabling Rules
Rules are disabled by default. You can enable them by switching the Enabled setting to ON. This works in both the rule list and the rule editor.
Multiple Rules, Conditions, and Workflows
There are well-defined behaviors for handling multiple rules, conditions and workflows. GroundControl administrators should be familiar with the following.
- Rules are grouped based on triggers.
- Rules are examined one at a time, from top bottom based on the trigger. In other words, rules at the top of the list have a higher priority than rules at the bottom of the list.
- If a rule does not match, GroundControl looks at the next rule down the list.
- GroundControl never executes more than one rule for a single device. If a rule at the top of the list matches all conditions, then GroundControl stops evaluating.
- The special rule All Other Devices is executed only if no other rules match.
- If All Other Devices is disabled, and no rules match a device, GroundControl performs no action.
- Since the order of rules is important, you can rearrange rules by dragging the “ hamburger” icon within each group of triggers.
- When a rule has multiple conditions all conditions must evaluate true for the rule to match. There is an implicit AND between each rule.
- New GroundControl users often long for a way to specify OR. For example, you may want both the Launchpad “Unit 1234” and the Launchpad “Unit 3456” as conditions. Here’s the wrong way to do that:
This will never work because there’s no such thing as OR. GroundControl adds the word AND to these conditions. In other words, GroundControl interprets this as “Launchpad name is Unit 1234 AND Unit 3456″ Of course Launchpads can’t have two names.
As an alternative, you can create two rules. Better yet, use a custom attribute to “tag” these Launchpads, and begin unlocking the true power of GroundControl.
- In general, multiple workflows are not necessary. Keep all the actions in a single workflow, and GroundControl will execute them in the best order for dependable device operation.
- Multiple workflows may be required when you wish to override GroundControl’s default behavior.
- If you do use multiple workflows, the order of workflows are important. GroundControl will execute the listed workflows in order. You may arrange the workflows to execute in the desired order by dragging on the three-lined “ hamburger” icon.
- If the first workflow fails, GroundControl will halt and not execute other workflows in the rule.
When are Rules Evaluated?
Based on triggers you select! But there are a few exceptions to this.
|Launchpad is running, and device is plugged in||Rules are evaluated|
|Launchpad starts with devices attached, and Launchpad Monitoring is enabled||Rules are evaluated|
|Launchpad starts with Recovery devices attached||Rules are evaluated|
|Launchpad starts with devices attached||Rules are NOT evaluated|
|Launchpad restarts due to an update||Rules are NOT evaluated|
|Device Battery Level||Any whole number from 1 to 100|
|Device Erased State||Erased / Not Erased|
|Device Recovery Mode||On / Off|
|Device iOS||9.3.5 / 10.3.1 / etc.|
|Device MAC Address||00:00:00:00:00:00|
|Device Model||iPad / iPhone / iPod|
|Device Model (Detailed)||iPad4,1 / etc.|
|Device Name||Any text|
|Device Serial||AAAA11A1A1AA / etc.|
|Device UDID||111a1a111a11a1111111aa11a1aa111111a111aa / etc.|
|Launchpad Name||Any text|
|Device DEP Status||Enrolled|
|Device Self Heal||Normal|
|Device Last Connected|
|Device Platform||iOS / Android|
Most conditions accept free text in the right-hand side of the comparison. For advanced applications, it is also possible to use an attribute in that field. This is similar to how attributes can be used in workflows.
This technique is useful when tracking devices that may wander from one Launchpad to another, for example.
Keep some limits in mind when using attributes in this way:
- Only Launchpad attributes may be used on the right side.
- Enclose the attribute name within [square brackets].
- The names are case sensitive.
And one more thing! You can also Schedule Automation Rules