How to run TSO/BAO workflow from DWP

Version 2
    Share This:

    This is a working document that aims to provide a walkthrough to create a DWP workflow that will invoke a TSO/BAO workflow.



    1) DWP installed. The following is based on DWP 18.11

    2) TSO/BAO installed. The following is based on BAO

    3) Integration module "BMC-SA-MyIT_Service_Broker_Integration" installed and activated on TSO/BAO*




    On TSO:

    1) Create a TSO workflow with some input parameters.

    2) Add the created workflow as an entry to the "BMC-SA-MyIT_Service_Broker_Integration / ServiceBrokerIntegration / ServiceMapping"


    On DWP:

    1)    Go to Catalog / Import

    2)    Select “BMC Orchestrator”

    3)    Click “Catalog Import Options”

    4)    Select the workflow you created

    5)    Click “Configure”

    6)    Select a template (a template must exist. Involve a DWP expert if this is not present)

    7)    Select “Profile Details”

    8)    Map “excerpt” and “description”

    9)    Click “Preview item” (optional)

    10)    Close “Preview item” (optional)

    11)    Click “Save”

    12)    Click “Queue for Import”

    13)    Click “Import Item”


    Once you performed the above steps, you will see your service under "Services".

    Select your service and click "Open", then edit Workflow.

    Now you need to create a Workflow and a Questionnaire.

    Let's create a workflow first.


    1) Under Workflow, click Add.

    2) Enter “Name”

    3) Drag and drop “SERVICE BROKER / Build Input Set” activity

    4) Drag and drop “BAO / Invoke BAO Service” or “BAO / Invoke BAO Service Sync” activity**

    5) Link the activities so they look as follows:

    6) Add the variables to DWP workflow (please note: those are workflow-wide variables, not related to a specific activity). Example:


    7)    In Build Input Set, define input parameters (key = string, value = one of the above defined variables)

    8)    In Invoke BAO Service, define INPUT MAP as follows:

         a.    Define “Connection ID” by selecting “BMC Orchestrator”

         b.    Define “Service ID” as the actual BAO workflow name as exposed by BAO MyIT Integration module as a string (for instance “Reset VM Password”)

         c.    Define “Input Parameters” by passing the INPUT from Build Input Set (it’s hidden under Output. Expand Output to see it)


    You should end up with something like this:



    9) Associate workflow to service

    Create Catalog Profile
    1)    Open Service and click on “Catalog Profile”
    2)    Provide icon and text description
    3)    Save


    Create Questionnaire
    1)    Actions – Create Single User Request
    2)    Select Process Questions from the left panel and add some info


    Enable and publish
    1)    Once workflow is completed and saved, make sure it is enabled:


    2)    Go to “Services / Pending” and click “Approve & Publish”



    Now you should be able to see your Service from DWP and you should be able to request the service.


    Limitations: TSO workflow output is still not parsed. I am figuring out how to get this value back.


    * I faced some issues with "BMC-SA-MyIT_Service_Broker_Integration" module. Namely:

    1) some versions of the module will return JSON code rather than XML

    2) some versions of the module will not handle multi-value variables from DWP (e.g. check boxes)


    ** the difference is only a parameter “mode” passed to the workflow. It’s up to you whether DWP should wait until BAO WF completes or not. Mode can be “sync” or “async”.

    I noticed DWP timeout is really low, so using "async" mode makes more sense.


    a.    Sample Async Output (returns Job ID):

    {"bao-response":{"metadata":{"request-type":"Invoke Service","service":"Run Patch Analysis Job","status":"success"},"data":{"invoke-service-async-response":{"ProcessName":":TEST:Run Patch Analysis Job","JobId":"68d0b876bef882b3:5d69a3a5:166c56ac94b:-7ff71-1540984722482"}}}}

    b.    Sample Sync Output (returns workflow actual output):

    {"bao-response":{"metadata":{"request-type":"Invoke Service","service":"Run Patch Analysis Job","status":"success"},"data":{"invoke-service-sync-response":{"Parameter":[{"Value":{"type":"xs:anyType","XmlDoc":{"value":"0000"}},"Name":"Exit Code"},{"Value":{"type":"xs:anyType","XmlDoc":{"value":"Patching Job completed successfully"}},"Name":"Exit Message"},{"Value":{"type":"xs:anyType","XmlDoc":{"value":"OK"}},"Name":"Exit Status"}]}}}}