Creating a Conditional Compound Action
Updated on Aug 06, 2019
As you’ve likely learned in other tutorials, a big part of Onit App building revolves around Actions. Most Actions are designed to accomplish one (and only one) task. For example, a Send Notification Action sends an email; an Add Participant Action adds a participant to a Record.
Many times, running a single Action won’t solve your larger business problem. Instead, you’ll need to string a series of individual Actions together to accomplish your goal. For instance, let’s say that when a user clicks a Button, your App should do the following:
- Generate a document
- Edit a field value
- Add a participant to the Record
Since each of these things are handled via different Actions, you’ll need to configure Onit to run these Actions as a sequence in a specific order, one immediately after the other. How can you do this?
That’s where Conditional Compound Actions come into play. This special Action contains other sub-Actions, and runs them in a specific order. As a result, if you have a list of Actions that all need to run when a user clicks a Button (or a Business Rule fires), you can add those Actions into a Conditional Compound Action. When the Conditional Compound Action runs, it will run its contained sub-Actions.
Packaging Actions together like this reduces the redundancy of elements and keeps your Actions organized around business problems. Additionally, this is the only way to configure a Button or Business Rule to fire more than one Action.
In this tutorial, we’ll explain how to create and configure Conditional Compound Actions.