- 22 Aug 2023
- 3 Minutes to read
- Print
- DarkLight
- PDF
Logic Apps (Standard) Connectors
- Updated on 22 Aug 2023
- 3 Minutes to read
- Print
- DarkLight
- PDF
To enable tracking in Logic Apps Standard, Atomic Scope deploys some components in Azure. Those components can be deployed using both PowerShell and the Atomic Scope portal. Next, by creating Logic apps or use the sample logic Apps that come with Atomic Scope, data can be tracked in the portal.
Logic Apps Standard workflows
In case of Logic Apps Standard Workflows, user cannot create their own custom connectors, which results in lack of tracking Atomic Scope business activities, compared to Logic Apps Consumption workflows.
As an alternative method to overcome this limitation, users can make use of the HTTP Actions provided in Azure functions.
Azure functions will deploy automatically while installing the Azure samples.
https://docs.atomicscope.com/v91/docs/installing-azure-samples.
Resource group -> Azure Functions -> Activities -> Get function URL
You can create Logic Apps Standard flows using the same connector function URLs. Be aware, that you should create Logic App in the same Resource Group and Function App deployed through Atomic Scope. Every Logic App standard will have an automatically created service plan, API connection, and storage account.
Configuration and corresponding Header Values
Business Process Name – AS-BusinessProcess
Business Transaction Name - AS-BusinessTransaction
Stage Name - AS-CurrentStage
API Resource ID (for localhost) – AS-ResourceId
Resource Group Name (Azure Function) – x-ms-workflow-resourcegroup-name
Subscription Id (Azure Function) - x-ms-workflow-subscription-id
**StartActivity **
This is the first step in starting an activity that will push the data to Atomic Scope. The Logic Apps should be initiated by using the Start activity function URL.
The request to the start activity should contain the above mandatory headers as well as message body in the below format (Json schema).
{
"MessageBody": "some message...",
"MessageHeader":"headers.."
}
UpdateActivity
The update activity function is used to update the object created in the StartActivity with the parameters provided. Using the Update function URL, you can update the Start stage.
Note:
The activity Ids will be directly available in the output of Logic App consumption. You need to provide input for the same, because Logic Apps Standard does not provide the activity ids separately.
Input for MainActivitiyId and StageActivityId respectively as a function
body('Start_Activity')?['MainActivityId']
body('Start_Activity')?['StageActivityId']
LogExceptionActivity
The Log Exception Activity function is used to log an exception on a specific stage using an exception message and exception code.
ArchiveActivity
The ArchiveActivity connector function helps in storing the data. This function URL can be used to archive the message body for a specific stage. You can also archive the message within the Start / Update Activities by setting the AS-ArchiveMessage header to True.
LogActivity
This is a one-time request in which Atomic Scope will automatically perform a start and update activity. Many of our customers wanted this API to be exposed in the cloud, so that they could avoid exhausting the messaging limit by consuming this API. Mandatory properties work in the same way as other APIs.
However, if you want the activity to continue, for example, if you are processing Stage2, you must send As-PreviousStage and As-MainActivityId from the output of the previous activity.
Usage Guide
To be able to use all functions within a single Logic App, follow the steps as shown below to invoke the Atomic Scope Custom Connector function URLs inside a Logic App.
The picture represents a Logic App Standard workflow and result of the flow in the AtomicScope portal.
• Get the StartActivity Function URL mentioned above to begin the flow and enter the mandatory fields.
• The MainActivityId and StageActivityId values are returned by the StartActivity function. These values will be passed to the UpdateActivity connector function as input and also mandatory fields.
• LogActivity is a single connector function that allows you to perform both the Start and Update events in a single action. The second stage in this flow is LogActivity. To connect to the current stage, you must provide the required fields and the previous stage name.
• Using the LogException function, you can display the exception in the second stage.
• The ArchiveActivity function is being used to archive the second stage, because we are providing specific stage details.
Important
- In a custom connector, the user can dynamically obtain all mandatory fields and URLs. In contrast to the Logic Apps Standard, manually pass the required parameters and URLs (Function).
- MainActivityId and StageActivityId should pass as function(Input) for the required stages.