The Workflow designer allows you to design and deploy automation workflows for your tenant. Luma Automation provides various OOTB events and connectors. You can drag and drop the connectors on the Workflow Designer, link them in sequence based on the business process and create a workflow. Following functions can be created using these events:
Table of Contents |
---|
Configure Workflow Parameters
Usually, a business process requires a trigger or input information to execute a task. These Workflow parameters are populated based on user inputs and can be used at any step in the workflow. Once your Workflow is created, you can define the information required as input for the workflow.
Define Workflow Input Parameters
Workflow Input parameters are the values or information required to execute the workflow. When the workflow is triggered, the source sysy end-user is prompted to provide the create a Workflow Input parameter, follow the below steps:
On the Workflow section, select the new workflow.
On the workflow screen, open the Properties Panel → Workflow Inputs tab.
In the Input Parameters section, add the input parameters required for the business workflow.
Click on + to add the Input Parameter
Add the Parameter name and Data type.
Mark Required if the parameter is required to execute the process.
Add Required Field Validation Message.
Select the Validation Type if applicable.
Similarly, add other parameters as required.
Define Workflow Variables
Additionally, you can also define Workflow variables with default values that can be used throughout the workflow. Scope of Workflow Variables is Global and can hold a default value or can be assigned values during an execution step.
...
|
Creating New Workflow
To create a new Workflow, follow the below steps:
Navigate to the Workflow Builder screen and click on Create Workflow.
On Create Workflow screen, add the new workflow details. Following are the details available on the screen:
Add ‘Name’ represents the name of the Automation Workflow.
‘Identifier’ represents the unique identifier of the workflow.
Add 'Description' for the workflow.
Add ‘Retry Configuration’. The configuration enables the system to retry executing the operation in case of an error.
Add the number of ‘Total Attempts’ for retries in case the operation fails.
Configure the ‘Retry Interval’ to define the time interval between each Attempt.
Backoff Factor
Maximum Retry Interval
Click on Create to create the Workflow.
The Workflow Designer is now open. You can now drag and drop the controls to design the workflow.
Configure Workflow Parameters
Usually, a business process requires a trigger or input information to execute a task. These Workflow parameters are populated based on user inputs and can be used at any step in the workflow. Once your Workflow is created, you can define the information required as input for the workflow.
Define Workflow Input Parameters
Workflow Input parameters are the values or information required to execute the workflow. When the workflow is triggered, the source system passes the required information to the workflow. To create a Workflow Input parameter, follow the below steps:
Navigate to On the Workflow Variables tabsection, select the new workflow.
On the Workflow Variables section, click workflow screen, open the Properties Panel → Workflow Inputs tab.
In the Input Parameters section, add the input parameters required for the business workflow.
Click on + to add the
Add the Service Task Name and any Documentation detail.
In the Connected App, select your Target system.
Select the Instance that connects to your target environment. Refer to Create Integration Operations for more information on integration App and Instance creation.
...
Alternatively, you can also drag and drop the Connected App from the left pan on the designer. This automatically creates a Service Task for the selected Connected App. Add the Service Task details and required Instance for your target environment.
...
Configure Input Variables
To add Input variables for the operation, follow the below steps:
Select the Service Task and navigate to the Properties Panel → Input tab. Configure the Input parameters for the operations.
In the Input Parameter section, add the input parameters required to execute the task on the target system.
Click on + to add to create a new Input Parameter.
Add Parameter name.
Select Data type.
Select Required if the attribute is required for the operation.
Add Required Field Validation Message.
Select the Validations as required. The applicable validations are populated based on the Data Type selected.
.Next, add Mapping to define the way the parameter should accept the value. The parameter can accept values from the user’s input, existing parameters from earlier steps, or from the Workflow.
Define the Direct Mapping to represent the Mapping type. You may use:
Step Output Parameter to use output parameter from the previous steps.
Step Meta Parameter to use metadata parameters from another Service Task in the Workflow as input.
Workflow Input Parameter to accept information from user’s input. You may use the User-defined or System Defined attributes created as the Workflow Input parameters (created in Point 3).
Workflow Variable to use the system-defined or user-defined Workflow Variables such as workflow ID, and Tenant ID.
Set Constant Value to assign a default constant value to the parameter.
Constant Transform Function uses a transformation function to assign a value to the parameter. You can use the out-of-the-box Random UUID function to generate random universally unique identifier.
Expression is used when you want to apply a Mathematical operation or method to process an expression.
For a Required field, add Default Value.
You can also use a Transformation function to update the value before using the same in the workflow. Select Apply Transformation and pick the required out-of-the-box Transform Function.
Follow the above steps to add as many input parameters as required.
Configure Operation
On the Operations tab, follow the below steps to create an Operation to execute the task on the target system.
Navigate to the Operations tab on Properties Panel.
Enter the URI (Uniform Resource Identifier). It refers to the operation in the target system to be executed.
Select the operation Method. It uses an API request chaining framework for bots to push or request data from your websites, systems, and web applications using Webservices.
The following operation methods are available:Get: To retrieve data
Post: To create data
Put: To edit the data
Delete: To delete the data
Patch: To make partial updates to the resource
The system automatically displays the Supported Operation as invoke REST API.
Specify the operation Timeout (in milliseconds), the amount of time to wait for a web service response when invoking an outbound request.
Next, add the Path Parameter. This is part of a path segment that occurs after its name. Path parameters offer a unique opportunity to dynamically replace the values and pass them in the URL. Path parameters are used to identify a specific resource. Example, http://myserver.com/some-path/{parameter1}/path-continued/{parameter2}.
You may overwrite the configuration defined at the instance level or continue using the same. To ignore instance-level configuration, select Ignore Global Path Parameters.
Click on + to add the operation-specific variable and values.- Query Parameters: The query parameters are sometimes referred to as optional parameters. The query parameters are separated from the hierarchical parameters by the question mark. Query parameters appear in the URL after the question mark (
?
) after the resource name. For example, https://myserver.com/resource-name?param1=value1¶m2=value2.
You may overwrite the configuration defined at the instance level with an operation-specific Query ParameterInput Parameter
Add the Parameter name and Data type.
To assign a default value to the parameter, add Default Value.
...
Once created, these variables can be used at any step of the workflow using Direct Mapping → Workflow Variable mapping mode.
Execute an Action- Configure a Service Task
Service Task events are used to execute an action on a third-party system. It is used to add an action in the workflow. You can configure an integration operation to connect to the target system and execute a task. One or more service tasks can be added in sequence along with other events to design a workflow.
To configure a Service Task for your workflow, follow the below steps:
Add Service Task Details
...
On the Workflow Designer screen, drag and drop the Create ServiceTask control. Here we can configure the task or action to be executed in the Target system.
...
Select the Service Task and open the Properties Panel. On the Properties panel, configure the operation to be executed in the Target system. Add the following details:
...
Mark Required if the parameter is required to execute the process.
Add Required Field Validation Message.
Select the Validation Type if applicable.
Similarly, add other parameters as required.
Define Workflow Variables
Additionally, you can also define Workflow variables with default values that can be used throughout the workflow. Scope of Workflow Variables is Global and can hold a default value or can be assigned values during an execution step.
To create a Workflow variable, follow the below steps:
Navigate to the Workflow Variables tab.
On the Workflow Variables section, click on + to add the variable
Add the Parameter name and Data type.
To assign a default value to the parameter, add Default Value.
...
Once created, these variables can be used at any step of the workflow using Direct Mapping → Workflow Variable mapping mode.
Execute an Action- Configure a Service Task
Service Task events are used to execute an action on a third-party system. It is used to add an action in the workflow. You can configure an integration operation to connect to the target system and execute a task. One or more service tasks can be added in sequence along with other events to design a workflow.
To configure a Service Task for your workflow, follow the below steps:
Add Service Task Details
On the Workflow Designer screen, drag and drop the Create ServiceTask control. Here we can configure the task or action to be executed in the Target system.
Select the Service Task and open the Properties Panel. On the Properties panel, configure the operation to be executed in the Target system. Add the following details:
On theProperties panel → General tab, add the general Service Task information:
Add the Service Task Name and any Documentation detail.
In the Connected App, select your Target system.
Select the Instance that connects to your target environment. Refer to Create Integration Operations for more information on integration App and Instance creation.
Alternatively, you can also drag and drop the Connected App from the left pan on the designer. This automatically creates a Service Task for the selected Connected App. Add the Service Task details and required Instance for your target environment.
Configure Input Parameters
Input Parameters refer to the information required to execute the task configured as part of the Service Task. The value is used as input to the step. There are multiple ways to assign value to the Input parameter such as using a Workflow Variable, Workflow Input parameter, a static value, etc.
Info |
---|
The Workflow Variables and Workflow Input Parameters cannot be directly used in a Service Task configuration. Create Input parameters for the Service Task and assign the required value. |
To add Input variables for the operation, follow the below steps:
Select the Service Task and navigate to the Properties Panel → Input tab. Configure the Input parameters for the operations.
In the Input Parameter section, add the input parameters required to execute the task on the target system.
Click on + to add to create a new Input Parameter.
Add Parameter name.
Select Data type.
Select Required if the attribute is required for the operation.
Add Required Field Validation Message.
Select the Validations as required. The applicable validations are populated based on the Data Type selected.
.Next, add Mapping to define the way the parameter should accept the value. The parameter can accept values from the user’s input, existing parameters from earlier steps, or from the Workflow.
Define the Direct Mapping to represent the Mapping type. You may use:
Step Output Parameter to use output parameter from the previous steps.
Step Meta Parameter to use metadata parameters from another Service Task in the Workflow as input.
Workflow Input Parameter to accept information from user’s input. You may use the User-defined or System Defined attributes created as the Workflow Input parameters (created in Point 3).
Workflow Variable to use the system-defined or user-defined Workflow Variables such as workflow ID, and Tenant ID.
Set Constant Value to assign a default constant value to the parameter.
Constant Transform Function uses a transformation function to assign a value to the parameter. You can use the out-of-the-box Random UUID function to generate random universally unique identifier.
Expression is used when you want to apply a Mathematical operation or method to process an expression.
For a Required field, add Default Value.
You can also use a Transformation function to update the value before using the same in the workflow. Select Apply Transformation and pick the required out-of-the-box Transform Function.
Follow the above steps to add as many input parameters as required.
Configure Operation
The ‘Operations’ tab is used to define the task to be executed as part of the Service Task. Here we can configure the Web Service details and the Request sent to the target system.
Follow the below steps to create an Operation to execute the task on the target system.
Navigate to the Operations tab on Properties Panel.
Enter the URI (Uniform Resource Identifier). It refers to the operation in the target system to be executed.
Select the operation Method. It uses an API request chaining framework for bots to push or request data from your websites, systems, and web applications using Webservices.
The following operation methods are available:Get: To retrieve data
Post: To create data
Put: To edit the data
Delete: To delete the data
Patch: To make partial updates to the resource
The system automatically displays the Supported Operation as invoke REST API.
Specify the operation Timeout (in milliseconds), the amount of time to wait for a web service response when invoking an outbound request.
Next, add the Path Parameter. This is part of a path segment that occurs after its name. Path parameters offer a unique opportunity to dynamically replace the values and pass them in the URL. Path parameters are used to identify a specific resource. Example, http://myserver.com/some-path/{parameter1}/path-continued/{parameter2}.
You may overwrite the configuration defined at the instance level or continue using the same. To ignore instance-level configuration, select Ignore Global Query Path Parameters.
Click on + to add the operation-specific field and valuevariable and values.Headers: Headers are mostly classified as request headers. You will have to set the request headers when you are sending the request. You may overwrite the configuration defined at the instance level with operation-specific Headers Query Parameters: The query parameters are sometimes referred to as optional parameters. The query parameters are separated from the hierarchical parameters by the question mark. Query parameters appear in the URL after the question mark (
?
) after the resource name. For example, https://myserver.com/resource-name?param1=value1¶m2=value2.
You may overwrite the configuration defined at the instance level with an operation-specific Query Parameter or continue using the same. To ignore instance-level configuration, select Ignore HeadersGlobal Query Parameters.
Click on + to add the operation-specific variable and valuesfield and value.
The following sample headers are encountered the most.Authorization: Includes credentials containing the authentication information of the client for the resource being requested.
Headers: Headers are mostly classified as request headers. You will have to set the request headers when you are sending the request. You may overwrite the configuration defined at the instance level with operation-specific Headers or continue using the same. To ignore instance-level configuration, select Ignore Headers.
Click on + to add the operation-specific variable and values.
The following sample headers are encountered the most.Authorization: Includes credentials containing the authentication information of the client for the resource being requested.
Accept-Charset: This is a header that is set with the request and tells the server which character sets are acceptable by the client.
Content-Type: Indicates the media type (text/HTML, text/JSON, XML/custom, or multipart/form-data) of the response sent to the client by the server, this will help the client in processing the response body correctly.
Note: Use multipart/form-data as Content-Type to send an attachment file to the client-server.
You Operation is configured.
Configure Output Variables
Create Output Variables to hold the information received as output from the web operation. To do so, follow the below steps:
Navigate to the ‘On Success’ tab.
In the Response Output Parameters section, create the parameters or attributes to hold information received as a response for the target system.
Request Payload: This is the information to be passed to complete the request. Add the information in the format supported by the Web service operation.
You Operation is configured.
Info |
---|
In addition to the Service Task parameters, Workflow parameters and out parameters of other steps in the workflow can be used in Operation configuration. For more details, refer to Using parameters in Workflows. |
Configure Output Variables
Create Output Variables to hold the information received as output from the web operation. To do so, follow the below steps:
Navigate to the ‘On Success’ tab.
In the Response Output Parameters section, create the parameters or attributes to hold information received as a response for the target system.
Click on + to add to create a new Output Parameter.
Add a Parameter name.
Select Text asData type.
Add a Default value if required.
Select Extractor type to represent the type of expression to extract information. For example, select JSON web service response is a JSON path.
Add Expression to represent the response path of the value to be assigned to the attribute.
...
Similarly, you can add Post Step Execution actionon the ‘On Success’ tab
Handle Errors - On Failure
Create a Script Task
Script Task events are used to execute a script as part of the workflow. You can use Groovy Script to seamlessly integrate with various systems and execute tasks. Groovy is an object-oriented and Java syntax compatible programming language built for the Java platform. For more information, refer to https://groovy-lang.org/ ,.
The script tasks can be added in sequence with the other Script and Service Tasks to create a workflow. When the workflow process arrives at the Script Task, the configured script is executed.
...
On the Workflow Designer screen, drag and drop the Create ScriptTask control. Here we can the script to be executed as part of the workflow.
Select the Script Task and open the Properties Panel. On the Properties panel, configure the script details to be executed. Add the following details:
On the Properties panel → General tab, add the general Service Task information:
Add the Service Script Task Nameand any Documentation detail.
In the Connected App, select your Target system.
Select the Instance that connects to your target environment. Refer to Create Integration Operations for more information on integration App and Instance creation.
The script task accepts groovy script. Add the script to be executed.
The variables used in the script are automatically identified as Input and Output parameters. On the Input/Output tab, the ‘getvariables’ are identified as ‘Input Parameters’ and ‘setvariables’ are identified as ‘Output Parameters’.
Create an XOR Gateway
The XOR Gateway or Exclusive Gateway is used to create alternative paths within a Process flow. On an XOR gateway, all outgoing sequence flows are evaluated in the order in which they are defined. The workflow path that evaluates to true, is executed.
...
On the Workflow Designer screen, drag and drop the XOR Gateway. Use the connect tool to create a link between the link and the gateway.
Use the Connect tool in the left pan to connect the gateway to existing elements.
Alternatively, you can also select the existing element and add the gateway as the next step.
Once added, on the Properties panel → General tab, add Name and Documentation information.
...
Select XOR gateway and use the Sequence Message Flow or Association tool to create a link with the next element.
Now select the link to add the associated rule.
On the SequenceFlow properties panel, add the rule to be evaluated.
Add rule Name and Documentation details
In the Details section, add the Condition Expression field, add the rulerule to be evaluated. In the Condition Type, You can either add an expression or a script to evaluate the rule.
For Expression:
Select Expression as Condition Type.
Add the rule in the Condition Expression field. Here you can refer to a parameter from the previous step and create the rule.
To refer a parameter from a previous step, use $.out_<Activityname>_<paramtername>. For example, ${out_Activity_17mx2d1_default_status == 'SUCCESS'}.
Note: Select the element and copy the element ID from the properties panel.
For Script:
Select Expression as Script.
Add the script.
Follow the above steps to create as many rules as required.
Info |
---|
When using an XOR Gateway, the following rules are applied:
|
Error Handling - Create Error Boundary Event
Error Boundary Event is used to handle the errors that may occur during the execution of a task or at a certain point in the workflow. Create Error codes and define the path and activities to be executed when the defined error occurs. You can handle Technical errors such as Service Unavailable as well as Business Validations with Error Boundaries. For more information on how to handle errors during workflow execution refer to Error Handling in Automation Workflows.
Other Actions on Workflow Designer
...