In your action flow you might want to stop and the action and raise an error to inform the user, this step has you covered.
After reading this article you'll learn how to:
-
Install the raise error step from the block store
-
Configure the raise error step
-
Use the step in practice
Starting off
The raise error step is created by Betty Blocks, but it's not readily available in the standard set of steps within the action builder. But that doesn't matter, you can find it and install it from the block store. To do this navigate to the block store and search for 'raise error' it will pop up as the first hit.
Click on view details
to check out what the block is about. In our case, the step will raise an error and abort the action. This tab also lets you install the block into one of your applications. Simply hit the Install block
button and select your organization followed by your application.
After installing the 'raise error' step, it can be found in your action builder of the application that was selected. You'll find it in the flow section of the action steps.
Configuring the step
The configuration of the raise error step is one of the most straightforward configurations out there. There are two ways to configure the step. The first one is by displaying the contents of a variable. The second one is by providing a message that you write yourself.
You can use the step as an actual error - in, for example, a form. In this example, I have a form that simply creates a new product with a name. It'll check if I'm allowed to perform this action; if not it raises an error if it does it'll create the product and generate a document.
So how does that work if I'm not allowed to perform the action, thus triggering the raise error step? Well, this is what will happen in this use case:
Voila, there is the message from our raise error step. This also means that the action has been aborted thus the 'Apple' is not created.