Custom Connectors
  • 12 Feb 2024
  • 7 Minutes to read
  • Dark
    Light
  • PDF

Custom Connectors

  • Dark
    Light
  • PDF

Article summary

Introduction

A Custom Connector allows users to easily plug in their Connector to Azure Logic Apps or Power Automate.

Users can make use of dynamic content by using Open API, which allows them to populate input attributes/parameters as well as leverage outbound attributes in downstream activities.

Deploy a Custom Connector

In Turbo360 Business Activity Monitoring (BAM), a Custom Connector can be deployed in two ways:

  • Users can provide Subscription information and deploy a pre-configured Connector in the specified Resource Group by selecting the Deploy Custom Connector option from the Actions dropdown available when navigated to Configuration.

Custom Connector - 1.png

  • Users can also manually configure the Custom Connector by creating it and importing the Swagger file (download it from Configuration->Actions dropdown->download swagger).

Custom Connector - 2.png

Custom Connector and Logic Apps

  • Users who are familiar with Azure Logic Apps will have created Orchestration flow using the Designer View.

  • It will be created by the user using an Action.

  • Facebook, Outlook, Twitter, and other social media sites are examples of connectors.

  • This connector allows customers to track data from their business logic into Turbo360 Business Activity Monitoring (BAM).

  • When users deploy the connection to a subscription, for example, Test, the connector will be available exclusively within the subscription Test.

  • If users have deployed the connector in a specific region, such as Central America, the Logic Apps that use the connector should be in the same region as well.

Accessing Connectors

  • Once users have created a Business Process in the Turbo360 portal, navigate to Configuration -> Connection details to obtain the Host API KEY, Host URL from there.
    Custom Connector - 3.png

Instrumenting Logic App

Business Activity Monitoring (BAM) connectors in Turbo360 can be used to instrument the business process in Azure Logic Apps.

The steps to be followed are:

  1. Navigate to the Azure portal and create a **Logic app custom connector
  2. Import the downloaded JSON file

The Host URL will be filled in during the import process.

ILA-1.png

Start Transaction Connector

The Start Transaction Connector initiates the transaction in a business process.

This Connector also acts as a starting stage of the transaction.

It is also possible to log the exception, archive the message, and complete the transaction using this connector.
ILA-2.png

The Start Transaction connector returns three fields in its response: TransactionInstanceId, StageInstanceId, and Result.

  • The TransactionInstanceId is a correlation id for the complete transaction. It will be used for the stages further in the flow.

  • StageInstanceId will be used to update the stage in a transaction.

  • As a Result, the message will denote whether the transaction is completed.

Checkpoint Connector

The Checkpoint connector is responsible for updating the status of the Stages and Transactions. This Connector can also archive the message flowing through the stage.

Apart from this, it also collects all the configured Global and tracked properties based on Stage configuration.

Below are the required parameters that are mandatory to provide:

  • BAM-TransactionInstanceId: Correlation ID for the complete Transaction.

  • BAM-Stage: Name of the Stage.

  • BAM-StageStatus: Status of the Stage (Success, InProgress, Failure).

It is also possible to complete the Transaction and archive the message with the parameters BAM-IsTransactionComplete and BAM-ArchiveMessage.

BAM-IsTransactionComplete and BAM-ArchiveMessage

ILA-3.png

  • This connector will also return the TransactionInstanceId, StageInstanceId, and Result as Start Transaction Connector.

Logging Exception

This Checkpoint connector can also be used to log the exception in a stage.

There are two parameters in this connector that can be used to log an Exception:

  • Exception Message: The Actual reason or message for the Exception in the Stage

  • Exception Code: Error code of the Exception

ILA-4.png

Correlation between Logic Apps

In some business cases, there might be ASYNC flows that are going outside the organization. Typically users would like to correlate a functional response to their initial outbound request. When the response is async with the request, users frequently lose the opportunity to retrieve the TransactionInstanceId. To handle this, users are provided with a method to have the correlation based on functional properties. For example: correlate the incoming order response to the outgoing order based on the order reference. This is possible using the Checkpoint with Correlation connector.

To use this, the user must first ensure that the function parameter is tracked as a property in the first flow using standard checkpoint connectors. When the order response is received (without the TransactionInstanceId off course) users can make use of the Checkpoint with Correlation connector.

Here, the user needs to provide the functional correlation property, for example, the order number.

Below are the parameters that need to be provided:

  • Property Name: Name of the Correlation property.

  • Property Value: Value of the Correlation property - Unique value.

The runtime will perform a lookup before processing this event:
"Look for TransactionInstanceId where the specified property name has a value equal to the specified property value."

There are 3 possible outcomes for this query:

  • 0 results found - runtime will create a new Transaction Instance.

  • 1 result found - runtime will update this transaction with the new stage as configured

  • Multiple results found - runtime will take the most recent one and update that one with a new stage

BAM-IgnoreNotFound

  • Enabling this parameter causes a checkpoint to look for the previous stage's flag. If it cannot locate the previous stage with the flag, it will ignore the transaction after several retries.

ILA-5.png

Custom Connector and Power Automate

  • Users who are familiar with Power Automate will have created Orchestration flow using the Designer View.

  • It will be created by the user using an Action.

  • Facebook, Outlook, Twitter, and other social media sites are examples of connectors.

  • This connector allows customers to track data from their business logic into Turbo360 Business Activity Monitoring (BAM).

Instrumenting Power Automate

Business Activity Monitoring (BAM) connectors in Turbo360 can be used to instrument the business process in Azure Power Automate.

The steps to be followed are as below:

  1. Navigate to the Microsoft Flow portal
  2. Create a Custom Connector under the Data section
  3. Import the downloaded JSON file

The Host URL will be filled in during the import process.

ILA-6.png

ILA-7.png

Start Transaction Connector

The Start Transaction Connector initiates the transaction in a business process.

This Connector also acts as a starting stage of the transaction.

It is also possible to log the exception, archive the message and complete the transaction using this connector.

ILA-8.png

The Start Transaction connector returns three fields in its response: TransactionInstanceId, StageInstanceId and Result.

  • The TransactionInstanceId is a correlation id for the complete transaction. It will be used for the stages further in the flow.

  • StageInstanceId will be used to update the stage in a transaction.

  • As a Result, the message will denote whether the transaction is completed.

Checkpoint Connector

The Checkpoint connector is responsible for updating the status of the Stages and Transactions. This Connector can also archive the message flowing through the stage.

Apart from this, it also collects all the configured Global and tracked properties based on stage configuration. Below are the required parameters that are mandatory to provide:

  • BAM-TransactionInstanceId: Correlation ID for the complete Transaction.

  • BAM-Stage: Name of the Stage.

  • BAM-StageStatus: Status of the Stage (Success, InProgress, Failure).

It is also possible to complete the Transaction and archive the message with the parameters,

BAM-IsTransactionComplete and BAM-ArchiveMessage

This connector will also return the TransactionInstanceId, StageInstanceId, and Result as Start Transaction Connector.

Logging Exception

This Checkpoint connector can also be used to log the exception in a stage.

There are two parameters in this connector that can be used to log an Exception.

  • Exception Message: The Actual reason or message for the Exception in the stage.

  • Exception Code: Error code of the Exception.

Correlation between Power Automate

In some business cases, there might be ASYNC flows that are going outside the organization. Typically users would like to correlate a functional response to their initial outbound request. When the response is async with the request, users frequently lose the opportunity to retrieve the TransactionInstanceId. To handle this, users are provided with a method to have the correlation based on functional properties. For example: correlate the incoming order response to the outgoing order based on the order reference. This is possible using the Checkpoint with Correlation connector.

To use this, the user must first ensure that the function parameter is tracked as a property in the first flow using standard checkpoint connectors. When the order response is received (without the TransactionInstanceId off course) users can make use of the Checkpoint with Correlation connector.

Here the user needs to provide the functional correlation property, for example, the order number.

Below are the parameters that need to be provided:

  • Property Name: Name of the Correlation property.

  • Property Value: Value of the Correlation property - Unique value.

The runtime will perform a lookup before processing this event:
"Look for TransactionInstanceId where the specified property name has a value equal to the specified property value."

There are 3 possible outcomes for this query:

  • 0 results found - runtime will create a new Transaction Instance.

  • 1 result found - runtime will update this transaction with the new stage as configured

  • Multiple results found - runtime will take the most recent one and update that one with a new stage

BAM-IgnoreNotFound

  • Enabling this parameter causes a checkpoint to look for the previous stage's flag. If it cannot locate the previous stage with the flag, it will ignore the transaction after several retries.

ILA-9.png


Was this article helpful?

What's Next