Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Callouts

A callout is a special kind of domain object that enables you to alter the flow of an operation by executing a remote procedure before or after the operation. The remote procedure can be a script, a BMC Atrium Orchestrator workflow, or a web service call. A callout can be a precallout, which is executed before the requested operation, or a postcallout, which is executed after the requested operation. Callouts are executed by the task management system.

Precallouts are prefixed to the list of callouts in the ProvidedOperation, and postcallouts are appended to the list of callouts in the ProvidedOperation. The callouts are sequenced according to the weight assigned to each callout.

You can use the following types of callouts based on the desired execution:

  • Regular callouts — Failure of a precallout causes the entire task to fail.
  • Notification-style callouts — Notification-style callouts follow the fire-and-forget principle. They do not require a response and should be dispatched outside the flow itself because the software does not wait for them to finish. Notification-style callouts have no impact on the actual operations from which they are generated.

Example of creating a notification-style callout

The following steps and example HTTP requests show how to create a notification-style callout.

  1. Create a CalloutType object with access attributes for HTTP requests.
    The following example sets up these access attributes:
    • CustomHeader — for custom HTTP headers such as authentication
    • URL— for the URL of the HTTP server

      POST /csm/callouttype
      Host: apiserver.calbro.com:8080
      Authentication-token: yourToken
      
      {
        "timeout":-1,
        "preCallout":"",
        "postCallout":"",
        "operationParams":[
          {
            "name":"callouttype",
            "type":"com.bmc.cloud.model.beans.CalloutType",
            "multiplicity":"1",
            "value":{
              "cloudClass":"com.bmc.cloud.model.beans.CalloutType",
              "accessAttributes":[
                {
                  "cloudClass":"com.bmc.cloud.model.beans.AccessAttribute",
                  "datatype":"STRING",
                  "description":"Mime headers",
                  "isOptional":false,
                  "isPassword":false,
                  "modifiableWithoutRestart":false,
                  "name":"CustomHeader"
                },
                {
                  "cloudClass":"com.bmc.cloud.model.beans.AccessAttribute",
                  "datatype":"STRING",
                  "description":"FMQA_Attr",
                  "isOptional":false,
                  "isPassword":false,
                  "modifiableWithoutRestart":false,
                  "name":"URL"
                }
              ],
              "name":"HTTP"
            }
          }
        ]
      }
      
  2. Create a Callout object.
    In the following example, you can see that:
    • The isNotification object is set to true to indicate that this is a notification-style callout.
    • The accessValues object contains access attribute values for CustomHeader and URL, which were set up in the previous CalloutType request.
    • The postOperation object associates the callout with several ProvidedOperationobjects.

      POST /csm/callout
      Host: apiserver.calbro.com:8080
      Authentication-token: yourToken
      
      {
        "timeout":-1,
        "preCallout":"",
        "postCallout":"",
        "operationParams":[
          {
            "name":"callout",
            "type":"com.bmc.cloud.model.beans.Callout",
            "multiplicity":"1",
            "value":{
              "cloudClass":"com.bmc.cloud.model.beans.Callout",
              "name":"HTTP",
              "accessValues":[
                {
                  "cloudClass":"com.bmc.cloud.model.beans.AccessAttributeValue",
                  "accessAttribute":{
                    "cloudClass":"com.bmc.cloud.model.beans.AccessAttribute",
                    "datatype":"STRING",
                    "description":"FMQA_Attr",
                    "guid":"cf61ee47-2c26-49fc-bc69-70a6166c6196",
                    "isPassword":false,
                    "modifiableWithoutRestart":false,
                    "name":"URL",
                    "calloutType":"0761b275-5d61-4762-8664-18657ba39b27"
                  },
                  "attributeValue":"http://10.128.244.231:9091",
                  "name":"URL"
                },
                {
                  "cloudClass":"com.bmc.cloud.model.beans.AccessAttributeValue",
                  "accessAttribute":{
                    "cloudClass":"com.bmc.cloud.model.beans.AccessAttribute",
                    "datatype":"STRING",
                    "description":"Mime headers",
                    "guid":"1a300939-0c81-434c-9af2-870f393f0bb1",
                    "isOptional":false,
                    "isPassword":false,
                    "modifiableWithoutRestart":false,
                    "name":"CustomHeader",
                    "calloutType":"0761b275-5d61-4762-8664-18657ba39b27"
                  },
                  "attributeValue":"Authorization:Basic YnBwbXdzX2ludGVybmFsOjVOc1Npc2wrcXMwRWdyWDJMbUlsclE9PQ==,passwordEncrypted:true",
                  "name":"CustomHeader"
                }
              ],
              "calloutType":"0761b275-5d61-4762-8664-18657ba39b27",
              "description":"Http Callout",
              "isNotification":true,
              "postOperation":[
                "/providedOperation/93fc931c-93d6-414d-868c-af83d4a89179",
                "/providedOperation/21a32c45-9c89-41c4-95f0-2de799522771",
                "/providedOperation/3e7aea36-d804-480c-9238-e71f9d7c297a",
                "/providedOperation/1df775f8-bc90-4640-b03e-7fd9244198cf",
                "/providedOperation/b1123f21-1df2-4595-9c18-3a28e99aceee"
              ]
            }
          }
        ]
      }
      

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments