Creating an Azure Data Factory Plug-in

This procedure describes how to create a plug-in that triggers an existing pipeline in Azure Data Factory.

This plug-in is a simplified version of the Control-M Integration plug-in available from BMC, Control-M for Azure Data Factory.

Begin

  1. Add a new plug-in.

  2. Define attributes in the plug-in.

  3. Define a pre-execution step to obtain a token.

  4. Define an execution step to run a pipeline.

  5. Define an execution step to track the pipeline.

  6. Define the sub-steps of the second execution step.

  7. Define a post-execution step to retrieve pipeline completion details.

  8. Test your plug-in.

  9. Publish and deploy your plug-in.

Adding the New Plug-in

This procedure describes how to create a new plug-in with just a few basic details. This procedure adds the new plug-in to your collection of plug-ins in Application Integrator and prepares it for you to populate it with steps and attributes.

Begin

  1. From the Home tab in Application Integrator, click Add Plug-in.

  2. On the Add Plug-in pane, complete the following basic plug-in definitions:

    • In the Plug-in name field, type Azure Data Factory.

    • In the Plug-in ID field, type ADF.

    • From the Steps Default Interface drop-down list, select REST API.

    • In the Description field, type Azure Data Factory REST plugin.

  3. Click Add.

    The new plug-in opens on a separate tab. It is also added to the list of plug-ins on the Home tab.

Defining Attributes in the Plug-in

This procedure describes how to prepare Connection Profile attributes and Job Property attributes for use in the plug-in steps.

Begin

  1. In the plug-in tab of your new plug-in, click Attribute Management.

  2. On the Attribute Management pane, under Connection Profile Attributes, define attributes, as follows:

    1. Define a header for the subscription attribute, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:

        • From the Field Type drop-down list, select Label.
        • In the Label field, type Subscription.
        • In the Attribute Name field, type subshead.
      3. Click Add.

    2. Define an attribute for the Azure account subscription ID, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Subscription ID.
        • In the Attribute Name field, type Subscription_ID.
      3. On the Validation tab, toggle on Mandatory field (non empty).

      4. Click Add.

    3. Define an attribute for the authentication method for the connection to Azure (either Service Principal or Managed Identity), as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Label.
        • In the Label field, type Identity.
        • In the Attribute Name field, type identit.
      3. Click Add.

    4. Define an attribute for the Azure Tenant ID, where the Azure Data Factory was created, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Tenant ID.
        • In the Attribute Name field, type tenant_id.
        • In the Default Value field, type default.
      3. Click Add.

    5. Define an attribute for the ID of the Azure-registered application associated with the service principal, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Application ID.
        • In the Attribute Name field, type app_id.
        • In the Default Value field, type default.
      3. Click Add.

    6. Define an attribute for the client secret associated with the service principal, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Password.
        • In the Label field, type Client Secret.
        • In the Attribute Name field, type client_secret.
      3. Click Add.

    7. Define a header for several URL attributes, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Label.
        • In the Label field, type URL Information.
        • In the Attribute Name field, type urlinfo.
      3. Click Add.

    8. Define an attribute for the Azure AD authentication endpoint base URL, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type REST Login url.
        • In the Attribute Name field, type RESTHost.
        • In the Default Value field, type login.microsoftonline.com.
      3. Click Add.

    9. Define an attribute for the Azure Management URL, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Management url.
        • In the Attribute Name field, type main_url.
        • In the Default Value field, type management.azure.com.
      3. Click Add.

    10. Define an attribute for a timeout for the trigger call made by Control-M to the Azure Data Factory, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Connection Timeout.
        • In the Attribute Name field, type timeout.
        • In the Default Value field, type 50.
      3. Click Add.

  3. Click Job Properties Attributes and define attributes, as follows:

    1. Define an attribute for the name of the Azure Resource Group that is associated with the relevant data factory, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Resource Group Name.
        • In the Attribute Name field, type ResourceGroupName.
      3. On the Validation tab, toggle on Mandatory field (non empty).

      4. Click Add.

    2. Define an attribute for the name of the Azure Data Factory that contains the pipeline that you want to run, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Data Factory Name.
        • In the Attribute Name field, type FactoryName.
      3. Click Add.

    3. Define an attribute for the name of the pipeline that you want to run, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Pipeline Name.
        • In the Attribute Name field, type PipelineName.
      3. Click Add.

    4. Define a header for job parameters, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Label.
        • In the Label field, type Parameters: JSON format. Enter {} for no parameters..
        • In the Attribute Name field, type parmdetails.
      3. Click Add.

    5. Define an attribute for the JSON-format parameters to pass to the data pipeline at runtime, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text area.
        • In the Label field, type Parameters.
        • In the Attribute Name field, type Parameters.
      3. On the Validation tab, toggle on Mandatory field (non empty).

      4. Click Add.

    6. Define an attribute for an interval (in seconds) between job status checks, as follows:

      1. Click Add.

        The Add Attribute pane appears.

      2. Define values in the following fields:
        • From the Field Type drop-down list, select Text box.
        • In the Label field, type Status Polling Frequency.
        • In the Attribute Name field, type Poll_Interval.
        • In the Default Value field, type 15.
      3. Click Add.

  4. Click Close and then click Save.

Defining a Pre-Execution Step to Obtain a Token

This procedure describes how to define the pre-execution step, which obtains a token for the connection to Azure Data Factory.

Begin

  1. From the Azure Data Factory tab, under Execution Steps, select the Pre-execution step and click.

  2. On the Edit Pre-Execution Step pane, in the Description field, type Token for loading pipeline information and click Save.

  3. In the REST API tab on the right, complete the following technical details of the pre-execution step:

    • In the REST API URL field, type https://{{RESTHost}}.

    • In the URL Request Path field, type /{{tenant_id}}/oauth2/token.

    • From the Method drop-down list, select POST.

    • In Headers, in Editor View, type Content-Type=application/x-www-form-urlencoded.

    • In Body, in Editor View, type the following:

      grant_type=client_credentials&client_id={{app_id}}&client_secret={{client_secret}}&resource=https://management.azure.com/.

  4. In the Output Handling tab, create an output handling rule to save the access token as a runtime parameter, as follows:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type access_token.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value in Runtime Parameter.

      2. In the Parameter Name field, type TOKEN.

      3. Select the Encrypt the runtime parameter value check box.

  5. Click Save.

Defining an Execution Step to Run a Pipeline

This procedure describes how to define the first Execution step, which runs a Data Factory pipeline.

Begin

  1. In the plug-in tab, under Execution Steps, select the unnamed Execution step and click.

  2. On the Edit Execution Step pane, type values in the following fields and then click Save:

    • In the Step Name field, type Run Data Factory Pipeline.

    • In the Description field, type Trigger ADF pipeline.

  3. In the REST API tab on the right, complete the following technical details of the Execution step:

    • In the REST API URL field, type https://{{main_url}}.

    • In the URL Request Path field, type the following:

      //subscriptions/{{Subscription_ID}}/resourceGroups/{{ResourceGroupName}}/providers/Microsoft.DataFactory/factories/{{FactoryName}}/pipelines/{{PipelineName}}/createRun?api-version=2018-06-01.

    • From the Method drop-down list, select POST.

    • In Headers, in Editor View, type the following:

      Content-Type=application/json&Content-Length=0&Authorization=Bearer {{TOKEN}}.

    • In Body, in Editor View, type {{parameters}}

    • Under Advanced Settings, select the Override connection timeout check box and type {{timeout}} in the field.

  4. In the Output Handling tab, create an output handling rule to save the job run ID as a runtime parameter, as follows:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.runId.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value in Runtime Parameter.

      2. In the Parameter Name field, type RUNID.

  5. Click Save.

Defining an Execution Step to Track the Pipeline

This procedure describes how to define the second Execution step, which tracks the running Data Factory pipeline.

Begin

  1. In the plug-in tab, above the steps, click Add.

  2. On the Add Execution Step pane, complete the following settings and then click Add:

    • In the Step Name field, type Track the Pipeline.

    • In the Description field, type Track the ADF pipeline.

    • Toggle on the Manual abort operation check box.

    • Toggle on the Verify operation completion check box.

  3. In the REST API tab on the right, complete the following technical details of the Execution step:

    • In the REST API URL field, type https://{{main_url}}.

    • In the URL Request Path field, type the following:

      /subscriptions/{{Subscription_ID}}/resourceGroups/{{ResourceGroupName}}/providers/Microsoft.DataFactory/factories/{{FactoryName}}/pipelineruns/{{RUNID}}?api-version=2018-06-01.

    • From the Method drop-down list, select GET.

    • Under the method selection, select the Authentication required check box.

    • Under Authentication Settings, complete the following authentication details:

      1. From the Authentication Type drop-down list, select OAuth2.

      2. In the OAuth2 API URL field, type https://{{RESTHost}}/{{tenant_id}}/oauth2/token.

      3. In the Token Parameter field, type REFRESHTOKEN.

      4. From the Grant Type drop-down list, select Resource owner password credentials.

      5. Select the Apply client ID check box and type {{app_id}} in the field.

      6. Select the Use client secret check box and type {{client_secret}} in the field.

      7. Select the Specify content type check box and type application/x-www-form-urlencoded in the field.

      8. Select the Apply body check box and, in Editor View, type resource=https://management.azure.com/.

    • In Headers, in Editor View, type the following:

      Content-Type=application/json&Authorization=Bearer {{REFRESHTOKEN}}.

  4. In the Output Handling tab, create an output handling rule to save the activity name from the output, as follows:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type value.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type value[*].activityName.

      3. In the Parameter Name field, type ACTIVITIES.

  5. Click Add to create a second rule to save the start time as a parameter, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type value.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type value[*].activityRunStart.

      3. In the Parameter Name field, type ACTIVITY_RUN_START.

  6. Click Add to create a third rule to save the run ID as a parameter, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type value.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type value[*].activityRunId.

      3. In the Parameter Name field, type ACTIVITY_RUNID.

  7. Click Save.

Defining the Sub-steps of the Second Execution Step

This procedure describes how to define the two sub-steps under the Execution step for tracking the running Data Factory pipeline. One sub-step enables the user to manually abort the job in Control-M and the other sub-step enables Control-M to verify the completion of the job.

Begin

  1. In the plug-in tab, expand the Execution - Tracking Pipeline Execution step.

  2. Select the Manual abort operation sub-step and complete its REST API details, as follows:

    • In the REST API URL field, type https://{{main_url}}.

    • In the URL Request Path field, type the following:

      /subscriptions/{{Subscription_ID}}/resourceGroups/{{ResourceGroupName}}/providers/Microsoft.DataFactory/factories/{{FactoryName}}/pipelineruns/{{RUNID}}/cancel?api-version=2018-06-01

    • From the Method drop-down list, select POST.

    • Under the method selection, select the Authentication required check box.

    • Under Authentication Settings, complete the following authentication details:

      1. From the Authentication Type drop-down list, select Basic.

      2. From the User Name Attribute drop-down list, select CON_PRO.

      3. From the Password Attribute drop-down list, select client_secret.

    • In Headers, in Editor View, type the following:

      Content-Type=application/json&Authorization=Bearer {{REFRESHTOKEN}}.

    • Select the Apend REST API response to job output check box.

  3. Select the Verify operation completion sub-step and click.

  4. On the Edit Verify Operation Completion pane, complete the following settings and then click Save:

    • In the Rerun Interval (In Seconds) field, type {{Poll_Interval}}.

    • Under Tolerance, toggle on Retry in case of failure and in the Retries field, type 1.

  5. Complete the REST API details of the Verify operation completion sub-step, as follows:

    • In the REST API URL field, type https://{{main_url}}.

    • In the URL Request Path field, type the following:

      /subscriptions/{{Subscription_ID}}/resourceGroups/{{ResourceGroupName}}/providers/Microsoft.DataFactory/factories/{{FactoryName}}/pipelineruns/{{RUNID}}?api-version=2018-06-01

    • From the Method drop-down list, select GET.

    • Under the method selection, select the Authentication required check box.

    • Under Authentication Settings, complete the following authentication details:

      1. From the Authentication Type drop-down list, select OAuth2.

      2. In the OAuth2 API URL field, type https://{{RESTHost}}/{{tenant_id}}/oauth2/token.

      3. In the Token Parameter field, type REFRESHTOKEN.

      4. From the Grant Type drop-down list, select Resource owner password credentials.

      5. Select the Apply client ID check box and type {{app_id}} in the field.

      6. Select the Use client secret check box and type {{client_secret}} in the field.

      7. Select the Specify content type check box and type application/x-www-form-urlencoded in the field.

      8. Select the Apply body check box and, in Editor View, type resource=https://management.azure.com/.

    • In Headers, in Editor View, type the following:

      Content-Type=application/json&Authorization=Bearer {{REFRESHTOKEN}}.

  6. In the Output Handling tab of the Verify operation completion sub-step, create an output handling rule to save the reason for failure if the job fails, as follows:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.status.

      2. From the drop-down list, select Equals to (=).

      3. In the next field, type Failed.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type $.message.

      3. In the Parameter Name field, type REASON_FOR_FAILURE.

  7. Click Add to create a second rule for failing the job if the pipeline run failed, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.status.

      2. From the drop-down list, select Equals to (=).

      3. In the next field, type Failed.

    • In the Do action section, from the Do drop-down list, select Complete and fail.

  8. Click Add to create a third rule for failing the job when canceling a pipeline, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.status.

      2. From the drop-down list, select Equals to (=).

      3. In the next field, type Canceling.

    • In the Do action section, from the Do drop-down list, select Complete and fail.

  9. Click Add to create a fourth rule to save the status as a runtime parameter, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.status.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value in Runtime Parameter.

      2. In the Parameter Name field, type RUNSTATUS.

      3. Select the second check box and select Fail in the drop-down list beside it.

        Then, in the drop-down list after the job if extracted data, select Equals to (=), and type Failed in the last field.

  10. Click Add to create a fifth rule to save runtime parameters, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.parameters.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value in Runtime Parameter.

      2. In the Parameter Name field, type PARAMETERS.

  11. Click Add to create a sixth rule to save the entity that started the pipeline run, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.invokedBy.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value in Runtime Parameter.

      2. In the Parameter Name field, type INVOKEID.

  12. Click Add to create a seventh rule for how to proceed when the pipeline run is successful, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.status.

      2. From the drop-down list, select Equals to (=).

      3. In the next field, type Succeeded.

    • In the Do action section, from the Do drop-down list, select Complete & Proceed.

  13. Click Add to create an eighth rule for failing the job when a pipeline is cancelled, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type $.status.

      2. From the drop-down list, select Equals to (=).

      3. In the next field, type Cancelled.

    • In the Do action section, from the Do drop-down list, select Complete and fail.

  14. Click Save.

Defining a Post-Execution Step to Retrieve Pipeline Completion Details

This procedure describes how to define a post-execution step, which retrieves pipeline completion details.

Begin

  1. In the plug-in tab, under Execution Steps, select the Post-execution step and click.

  2. On the Edit Post-Execution Step pane, in the Description field, type Retrieve pipeline completion details and click Save.

  3. In the REST API tab on the right, complete the following technical details of the Execution step:

    • In the REST API URL field, type https://{{main_url}}.

    • In the URL Request Path field, type the following:

      /subscriptions/{{Subscription_ID}}/resourceGroups/{{ResourceGroupName}}/providers/Microsoft.DataFactory/factories/{{FactoryName}}/pipelineruns/{{RUNID}}/queryActivityruns?api-version=2018-06-01&startTime="+(Get-Date).ToString('yyyy-MM-dd')+"&endTime="+(Get-Date).AddDays(1).ToString('yyyy-MM-dd')+"&pipelineName={{PipelineName}}".

    • From the Method drop-down list, select POST.

    • In Headers, in Editor View, type the following:

      Content-Type=application/json&Authorization=Bearer {{REFRESHTOKEN}}.

    • In Body, in Editor View, type the following:

      {"orderBy":[{"orderBy":"ActivityName","order":"DESC"}],"lastUpdatedBefore":"2040-12-31T23:59:59.999"}

  4. In the Output Handling tab, create an output handling rule to save the activity name from the output, as follows:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type value.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type value[*].activityName.

      3. In the Parameter Name field, type ACTIVITIES.

  5. Click Add to create a second rule to save the start time as a parameter, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type value.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type value[*].activityRunStart.

      3. In the Parameter Name field, type ACTIVITY_RUN_START.

  6. Click Add to create a third rule to save the end time as a parameter, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type value.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type value[*].activityRunEnd.

      3. In the Parameter Name field, type ACTIVITY_RUN_END.

  7. Click Add to create a fourth rule to save the run ID as a parameter, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type value.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type value[*].activityRunId.

      3. In the Parameter Name field, type ACTIVITY_RUNID.

  8. Click Add to create a fifth rule to save execution details, and then perform the following actions:

    • Define the following filters for output extraction:

      1. From the When the Response Is drop-down list, select Any Response.
      2. From the Extract from drop-down list, select Body.
      3. From the Content Type drop-down list, select JSON.
    • Define the following If condition:

      1. In the If Output field, type value.

      2. From the drop-down list, select Any.

    • Define the following Do action:

      1. From the Do drop-down list, select Keep value of related element.

      2. In the Element Name field, type value[*].output.executionDetails.

      3. In the Parameter Name field, type EXECUTIONDETAILS.

  9. Click Save.

Testing Your Plug-in

This procedure describes how to run a test execution of the plug-in, to ensure that plug-in jobs can complete successfully.

Begin

  1. Click Test.

    Plug-in steps and attributes are first validated. You can continue with the test even if validation issues are found.

  2. On the Test tab, select an Agent for the test, and optionally enter values in the Connection Profile fields and Job Properties fields.

  3. Click Run Test.

    The test runs and results are displayed on-screen.

Publishing and Deploying Your Plug-in

This procedure describes how to publish your plug-in to Control-M/EM and deploy it to an Agent, so that it is available in Control-M.

Begin

  1. Click Publish & Deploy.

    Plug-in steps and attributes are first validated. You can continue to publish even if warnings are found.

  2. In the Publish & Deploy pane, from the Deploy plug-in to selected agents drop-down list, select the Agents where you want to deploy the plug-in.
  3. Click Apply.