Azure Logic Apps Jobs: Run Workflows
Azure Logic Apps Run Workflow Jobs allow you to run a workflow and all the activities grouped in the workflow in your Logic Apps workspace from Automic Automation.
To start the workflow the first time, you need to define the connection object and the workflow name. Optionally, you can also define other parameters in JSON format to be passed on to the workflow. You can decide how the JSON is created. For example, it could be created using a custom job or scripts in Automic Automation. Regardless of how the file is created, you have to make sure that it is available on the Agent machine (host).
This page includes the following:
Defining Azure Logic Apps Run Workflow Job Properties
On the Run Workflow Job page, you define the parameters relevant to run a pipeline in Azure Logic Apps.
-
Connection
Select the Azure Logic Apps Connection object containing the relevant information to connect to the application.
To search for a Connection object, start typing its name to limit the list of the objects that match your input.
-
Hosting Plan
Checkbox that allows you to select from two options:
-
Consumption (default)
Consumption-based plan. A Consumption logic app can have only one workflow that runs in multi-tenant Azure Logic Apps.
-
Standard
A Standard logic app can have one or multiple workflows that run in single-tenant Azure Logic Apps. Enter the name of the logic app in Azure in the Logic App Name field if you select this option.
-
-
Workflow Name
Enter the name of the job that should run, or select it from the dropdown list.
-
Trigger Name
Enter the name of the trigger to be pushed, or select it from the dropdown list.
-
Payload
The payload data type.
-
None (default)
Select this option if you do not want to pass any workflow parameters to Azure Logic Apps.
-
JSON
Use the JSON field to enter the JSON payload definition.
Important!There are many options available to define the JSON payload. For more information and examples of the JSON definition, see Defining the JSON.
For details about the Azure Logic Apps documentation, see https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-overview#key-terms
-
File Path
Use the JSON File Path field to define the path to the JSON file containing the attributes that you want to pass to the application. Make sure that the file is available on the Agent machine (host).
Note:The Pre-Process page allows you to define the settings of the Jobs using script statements. These statements are processed before the Pipeline Run Job is executed, see Setting Job Properties Through Scripts.
-
Defining the JSON
This section gives you examples of how you could define the JSON field when defining a Run Workflow Job. You have different options available.
Simple JSON Definition
The first option to define the JSON field is a simple payload definition. To do so, make sure you define the parameters required to define the workflow, such as the name and the default value.
Using Variables
You can also use variables in the payload definition.
Example
In the Payload field, enter the following:
&WORKFLOWPARA#
If the variable is not defined yet, you must define it now. You do it on the Variables page of the Run Workflow Job definition:
(Click to expand)
When you execute the Job, the variables will be replaced with the value you have just defined. This is visible in the Agent log (PLOG), see Monitoring Azure Logic Apps Jobs.
Run Workflow Job in a Workflow
You can also use the JSON field if you want to include a Run Workflow Job in a Workflow and you want to use Automation Engine variables in it.
Example
In the Workflow, a Script object (SCRI) with the variable definition relevant for the Workflow Name and the JSON precedes your Run Workflow Job:
(Click to expand)
In the Run Workflow Job definition, you include those variables:
(Click to expand)
When the Job is executed, the variables will be replaced with the value you have just defined. This is visible in the Agent (PLOG) report, see Monitoring Azure Logic Apps Jobs.
See also: