This documentation supports the 19.05 version of BMC Digital Workplace Advanced.

To view an earlier version, select the version from the Product Version menu.

Workflow to request approval

Catalog administrators can create workflows that use approval processes defined in the Remedy System Approval Server.

At any point in a workflow, you can insert a Call Activity that calls for an approval process that is linked to the SB:ServiceRequestStub form, and direct the sequence flow based on the response from the Approval  Server. You can call for the default SB Request Manager Approval process, or a custom approval process. For more details about custom approval services, see Calling external workflows.


Related topics

Calling external workflows

Integrating BMC Digital Workplace Catalog with Remedy applications

From the BMC Remedy Action Request System documentation: Setting up the approval process

Before you begin

Create the following process variables:

  • Process context variable (for information about process context variable, see Capturing process context information)

  • Create the following process input variables (for information about input variables, see Adding process input variables to a workflow):
    • Text variables (maximum 10 variables)

    • Integer variables (maximum two variables)

    • Decimal variables (maximum two variables)

    • Date variables (maximum two variables)

    • Date/time variables (maximum two variables)

To insert a request for approval

A request for approval action requires a Call Activity element to call an external process named Request Approval. The called Request Approval process is hidden from the list on the Workflows page to prevent unintentional edits.

  1. From the palette, drag a Call Activity element onto the canvas.

    Warning

    Do not use the Create Request Approval Stub Entry element to generate approval requests. Create Request Approval Stub Entry is used inside the Request Approval process that is called by the workflow.

  2. Enter a descriptive name for the Label.
    The name must be unique from all the other elements in the same workflow, for example, Call Request Approval.
  3. In the Properties panel, expand Called Process.
  4. Search for the built-in process named Request Approval, and verify that All Processes > MyITSB-Approval > Request Approval appears, as shown in the following illustration:
  5. Click Request Approval to select the process.
  6. Click Call Activity, and submit all required input parameters for the Request Approval called process.

    1. Open the expression builder for any of the available parameters by clicking the link Click to build an expression link. 

    2. Expand the process context process variable (identified as requestInfo) to insert the specified variables into each parameter, as shown in the following table.

      ParameterRequiredExampleComments
      Requesting For User IDOptional

      LOGIN NAME

      Use the following parameter from the process context variable: requestInfo > Requested For User > Login Name
      Approval SummaryRequired

      "Request for "+SERVICE NAME+ "by "+FULL NAME

      The Approval Summary field appears in the request for approval notification in BMC Digital Workplace. Create a descriptive summary by adding helpful parameters and text in this field.

      Example:

      To send text that includes the service name and the requestor's full name, use the following parameters from the process context variable:

        • requestInfo > Service > Service Name

        • requestInfo > Requested For User > Full Name

      Concatenate the text to complete the following expression: "Request for "+SERVICE NAME+ "by "+FULL NAME

      Service NameRequired

      SERVICE NAME

      Use the following parameter from the process context variable: requestInfo > Service > Service Name
      SB Service Request IDRequired

      SERVICE REQUEST ID

      Use the following parameter from the process context variable: requestInfo > Service Request > Service Request ID
      Requesting By User IDOptional

      LOGIN NAME

      Use the following parameter from the process context variable: requestInfo > Requested By User > Login Name
      Service IDOptionalSERVICE IDUse the following parameter from the process context variable: requestInfo > Service > Service ID
      Approval Process NameOptional"SB Request Self Approve"

      If the Approval Process Name is blank, the action will call the default SB Request Manager Approval process in the Approval Server.

      If the Approval Process Name is specified, the action will attempt to call a process of the same name in the Approval Server. For information about calling a custom request for approval, see Calling a custom approval process.

      Process NameOptionalNoneLeave blank.
      Process Instance IDOptionalNoneLeave blank.
      Order IDOptional

      ORDER ID

      Use the following parameter from the process context variable: requestInfo > Service > OrderID
      Order Description Optional

      ORDER DESCRIPTION

      Use the following parameter from the process context variable: requestInfo > Service > Order Description
    3. (Optional) To send user input to the called custom approval process, populate one or more of the following flexible input fields with your process input variables:

      Input parameter name Input variable data type
      Flex_Char_01Text
      Flex_Char_02Text
      Flex_Char_03Text
      Flex_Char_04Text
      Flex_Char_05Text
      Flex_Char_06Text
      Flex_Char_07Text
      Flex_Char_08Text
      Flex_Char_09Text
      Flex_Char_10Text
      Flex_Int_01Integer
      Flex_Int_02Integer
      Flex_Dec_01Decimal
      Flex_Dec_02Decimal
      Flex_DateTime_01Date/Time
      Flex_DateTime_02Date/Time
      Flex_Date_01Date
      Flex_Date_02Date
      Flex_Time_01Time
      Flex_Time_02Time

      Tip

      To populate the Flex fields with the user input, create required process variables. For more details about process variables, see Data handling in workflow activities.

      To pass text input from the service requester, create text process input variable. For more details about process input variables, see Adding process input variables to a workflow.

      To pass date and time information, you can create date and time process input variables. To pass the current UTC time of the server, you can use one of the available general variables: the Current DateCurrent TimeCurrent Date and Time.

      When you have created a workflow, create a questionnaire, and map the process input variables that you have used to populate the Flex fields with the process questions. For more details about process questions, see Exploring the workflow designer.

       Click here to view the JSON of the example workflow
      {
        "version": null,
        "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
        "lastChangedBy": "hannah_admin",
        "owner": "hannah_admin",
        "name": "myit-sb:Approval process",
        "tags": null,
        "description": "",
        "overlayGroupId": "TNGADG1AAP0ICAOYEEMROXHSO2X4VB",
        "developerId": null,
        "scope": "BUNDLE",
        "guid": "rx-1b83d0f2-8147-41a3-9ff1-3ebf8ff6cc39",
        "flowElements": [
          {
            "resourceType": "com.bmc.arsys.rx.services.process.domain.SequenceFlowDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "Sequence Flow",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "guid": "rx-a742c925-9303-4954-ad81-c21b66b076dd",
            "sourceNode": "rx-f4a6551c-72b9-4a92-88e0-b0f4295070ad",
            "targetNode": "rx-a27dd165-9afb-44c9-b911-9bc33fece642",
            "condition": ""
          },
          {
            "resourceType": "com.bmc.arsys.rx.services.process.domain.SequenceFlowDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "Sequence Flow",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "guid": "rx-e0a397b4-3a81-47e2-bf3f-9ab098830701",
            "sourceNode": "rx-8bc00a6d-f688-435b-b784-dea4e85db620",
            "targetNode": "rx-f4a6551c-72b9-4a92-88e0-b0f4295070ad",
            "condition": ""
          },
          {
            "resourceType": "com.bmc.arsys.rx.services.process.domain.StartEventDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "Start",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "guid": "rx-8bc00a6d-f688-435b-b784-dea4e85db620",
            "label": ""
          },
          {
            "resourceType": "com.bmc.arsys.rx.services.process.domain.EndEventDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "End",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "guid": "rx-a27dd165-9afb-44c9-b911-9bc33fece642",
            "event": null,
            "label": ""
          },
          {
            "resourceType": "com.bmc.arsys.rx.services.process.domain.CallActivityDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "Call Activity",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "guid": "rx-f4a6551c-72b9-4a92-88e0-b0f4295070ad",
            "multiInstanceLoopDefinition": null,
            "calledProcessDefinitionName": "com.bmc.arsys.myitsb.myitsb-approval:Request Approval",
            "sampleProcessDefinitionName": null,
            "inputMap": [
              {
                "assignTarget": "Requesting For User Id",
                "expression": "${processContext.requestInfo.requestedFor.loginName}"
              },
              {
                "assignTarget": "Approval Summary",
                "expression": "(((\"Request for\" + \"${processContext.requestInfo.service.name} \") + \"by\") + ${processContext.requestInfo.requestedBy.loginName})"
              },
              {
                "assignTarget": "Requesting User ID",
                "expression": "${processContext.requestInfo.requestedBy.fullName}"
              },
              {
                "assignTarget": "Service ID",
                "expression": "${processContext.requestInfo.service.id}"
              },
              {
                "assignTarget": "Service Name",
                "expression": "${processContext.requestInfo.service.name}"
              },
              {
                "assignTarget": "Order ID",
                "expression": "${processContext.requestInfo.orderId}"
              },
              {
                "assignTarget": "SB Service Request ID",
                "expression": "${processContext.requestInfo.serviceRequest.id}"
              },
              {
                "assignTarget": "Flex Char 01",
                "expression": "${processContext.TaskName}"
              },
              {
                "assignTarget": "Flex Char 02",
                "expression": "${processContext.TaskDescription}"
              },
              {
                "assignTarget": "Order Description",
                "expression": "${processContext.requestInfo.orderDescription}"
              },
              {
                "assignTarget": "Flex DateTime 01",
                "expression": "${processContext.DateRequired}"
              }
            ],
            "outputMap": [],
            "label": "Call Activity"
          }
        ],
        "inputParams": [
          {
            "resourceType": "com.bmc.arsys.rx.standardlib.record.CharacterFieldDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "TaskDescription",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "id": 536870912,
            "fieldOption": "REQUIRED",
            "permissions": null,
            "fieldTypeName": "com.bmc.arsys.rx.services.record.domain.DefaultFieldType",
            "isInherited": false,
            "explicitPermissions": null,
            "overlayDescriptor": null,
            "fieldMapping": null,
            "allowPermissionsOverlay": true,
            "allowOtherPropertiesOverlay": true,
            "auditOption": null,
            "maxLength": 0,
            "defaultValue": null,
            "searchDefinition": null,
            "namedListDefinition": null,
            "shouldPersistEncrypted": false,
            "anyUserAllowedToSubmit": false
          },
          {
            "resourceType": "com.bmc.arsys.rx.standardlib.record.CharacterFieldDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "TaskName",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "id": 536870913,
            "fieldOption": "REQUIRED",
            "permissions": null,
            "fieldTypeName": "com.bmc.arsys.rx.services.record.domain.DefaultFieldType",
            "isInherited": false,
            "explicitPermissions": null,
            "overlayDescriptor": null,
            "fieldMapping": null,
            "allowPermissionsOverlay": true,
            "allowOtherPropertiesOverlay": true,
            "auditOption": null,
            "maxLength": 0,
            "defaultValue": null,
            "searchDefinition": null,
            "namedListDefinition": null,
            "shouldPersistEncrypted": false,
            "anyUserAllowedToSubmit": false
          },
          {
            "resourceType": "com.bmc.arsys.rx.standardlib.record.DateTimeFieldDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "DateRequired",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "id": 536870914,
            "fieldOption": "REQUIRED",
            "permissions": null,
            "fieldTypeName": "com.bmc.arsys.rx.services.record.domain.DefaultFieldType",
            "isInherited": false,
            "explicitPermissions": null,
            "overlayDescriptor": null,
            "fieldMapping": null,
            "allowPermissionsOverlay": true,
            "allowOtherPropertiesOverlay": true,
            "auditOption": null,
            "defaultValue": null,
            "anyUserAllowedToSubmit": false
          },
          {
            "resourceType": "com.bmc.myservice.servicerequest.process.ServiceBrokerContextFieldDefinition",
            "version": null,
            "lastUpdateTime": "2018-02-21T13:21:08.433+0000",
            "lastChangedBy": "hannah_admin",
            "owner": "hannah_admin",
            "name": "requestInfo",
            "tags": null,
            "description": "",
            "overlayGroupId": null,
            "developerId": null,
            "scope": null,
            "id": 536870915,
            "fieldOption": "OPTIONAL",
            "permissions": null,
            "fieldTypeName": "com.bmc.myservice.servicerequest.process.ServiceBrokerContextFieldType",
            "isInherited": false,
            "explicitPermissions": null,
            "overlayDescriptor": null,
            "fieldMapping": null,
            "allowPermissionsOverlay": true,
            "allowOtherPropertiesOverlay": true,
            "auditOption": null,
            "anyUserAllowedToSubmit": false
          }
        ],
        "outputParams": [],
        "localVariables": [],
        "contextKeyParam": "TaskName",
        "isEnabled": true,
        "permissions": [
          {
            "ownerId": {
              "value": 1000011,
              "type": "GROUP",
              "name": "sbe-public-computed"
            },
            "type": "EXECUTE"
          }
        ],
        "layout": "{\"cells\":[{\"type\":\"rx.EndEvent\",\"size\":{\"width\":30,\"height\":30},\"eventType\":\"end\",\"position\":{\"x\":900,\"y\":375},\"angle\":0,\"id\":\"a27dd165-9afb-44c9-b911-9bc33fece642\",\"z\":2,\"attrs\":{\".label\":{\"text\":\"\"},\".outer\":{\"stroke-width\":5},\".inner\":{\"visibility\":\"hidden\"}}},{\"type\":\"rx.StartEvent\",\"size\":{\"width\":30,\"height\":30},\"eventType\":\"start\",\"position\":{\"x\":50,\"y\":375},\"angle\":0,\"id\":\"8bc00a6d-f688-435b-b784-dea4e85db620\",\"z\":7,\"attrs\":{\".label\":{\"text\":\"\"},\".inner\":{\"visibility\":\"hidden\"}}},{\"type\":\"rx.CallActivity\",\"activityType\":\"call-activity\",\"content\":\"Call Activity\",\"subProcess\":true,\"expanded\":false,\"collapsedSize\":{\"width\":90,\"height\":60},\"size\":{\"width\":90,\"height\":60},\"position\":{\"x\":440,\"y\":360},\"angle\":0,\"id\":\"f4a6551c-72b9-4a92-88e0-b0f4295070ad\",\"z\":20,\"attrs\":{\".inner\":{\"visibility\":\"hidden\"},\"text\":{\"ref-y\":25},\".content\":{\"html\":\"Call Activity\",\"title\":\"\"},\".fobj\":{\"width\":90,\"height\":60},\"div\":{\"style\":{\"width\":90,\"height\":60}},\".fobj div\":{\"style\":{\"verticalAlign\":\"baseline\",\"paddingTop\":10}},\".outer\":{\"stroke-width\":4,\"stroke-dasharray\":\"none\"},\".sub-process\":{\"d\":\"M 0 0 L 30 0 30 30 0 30 z M 15 4 L 15 26 M 4 15 L 26 15\",\"stroke\":\"#000000\",\"fill\":\"transparent\",\"transform\":\"scale(0.3, 0.3) translate(0, 6)\",\"display\":\"\",\"visibility\":\"visible\",\"data-sub-process\":true},\".icon-multi-instance-sequential\":{\"width\":10,\"height\":10,\"y\":1,\"xlink:href\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACtJREFUeNpilJOTYaAEsADxf0oMYGKgEFBsAMgLjEPfC6OxMBoLFBsAEGAAje8DgZ8/t18AAAAASUVORK5CYII=\",\"display\":\"none\"},\".icon-multi-instance-parallel\":{\"width\":10,\"height\":10,\"y\":1,\"xlink:href\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACxJREFUeNpilJOT+c+AAIwPHz5mkJeXBbGJEmdioBCMGjBqwKgBg8UAgAADADERCXj6SL6VAAAAAElFTkSuQmCC\",\"display\":\"none\"},\".rx-icon-container\":{\"ref\":\".body\",\"x-alignment\":\"middle\",\"ref-x\":0.5,\"ref-dy\":-15}}},{\"type\":\"rx.SequenceFlow\",\"router\":{\"name\":\"manhattan\"},\"labels\":[{\"attrs\":{\"text\":{\"text\":\"\"}},\"position\":\"0.5\"}],\"flowType\":\"normal\",\"id\":\"e0a397b4-3a81-47e2-bf3f-9ab098830701\",\"source\":{\"id\":\"8bc00a6d-f688-435b-b784-dea4e85db620\"},\"target\":{\"id\":\"f4a6551c-72b9-4a92-88e0-b0f4295070ad\"},\"z\":21,\"attrs\":{}},{\"type\":\"rx.SequenceFlow\",\"router\":{\"name\":\"manhattan\"},\"labels\":[{\"attrs\":{\"text\":{\"text\":\"\"}},\"position\":\"0.5\"}],\"flowType\":\"normal\",\"id\":\"a742c925-9303-4954-ad81-c21b66b076dd\",\"source\":{\"id\":\"f4a6551c-72b9-4a92-88e0-b0f4295070ad\"},\"target\":{\"id\":\"a27dd165-9afb-44c9-b911-9bc33fece642\"},\"z\":21,\"attrs\":{}}]}",
        "artifacts": [],
        "runAsUser": false,
        "synchronous": false,
        "overlayDescriptor": null,
        "allowOverlay": false,
        "localizableStrings": {}
      }

      By populating any of the flexible fields, you send the information from BMC Digital Workplace Catalog to the fields that are available on the Flexible Fields tab of the SB:ServiceRequestStub form:


      The information that you send to the SB:ServiceRequestStub form, is saved on the Flexible Fields tab, and can be used for creation of approval rules. 

  7. Click Save to close the expression builder.

    When fulfilling a service, the inserted Call Request Approval activity send a requests to run a process on the Approval Server.


To verify the request for approval process

A quick way to verify that the approval system is configured correctly is to route an output from a Call Request Approval process into an in-app notification, as shown in the following illustration:

The in-app notification appears on the dashboard of the administrative user you specify as the receiver.

To connect an in-app notification

  1. From the palette, drag a Send In App Notification element onto the canvas.
  2. Open the expression builder, complete a field, and click Next > to advance to the next field.

    ParameterExample with comments
    Receiver

    "hannah_admin"

    Manually enter the user name (without the @domain extension) of the administrator who should receive the notification.

    Title

    requestInfo > Service > Service Name + "approval process testing"

    Expand and click to insert the process variable Service Name, and then manually concatenate the additional text.

    Content

    Activities > Call Request Approval > Status + " " + Activities > Call Request Approval > Reason

    Expand and click to insert the signal parameters Status and Reason, and then manually concatenate the space between the parameters.

  3. Click Save to close the expression builder.
    The workflow is defined to send the Status and Reason returned from the approval process to the administrator's dashboard upon completion.

    Tip

    You can also insert a Send In App Notification element before Call Request Approval - to test that the workflow itself is being called.

    For example:


To verify this workflow in a service

  1. Attach this workflow to a service in the service options panel.
  2. Complete the rest of the service publishing and entitlement process to view the service in BMC Digital Workplace.
  3. Open BMC Digital Workplace as a user and request the service.
    The service should appear in your requests.
  4. In a separate browser session, open BMC Digital Workplace and log in as the user's manager.
    The service request should appear in the manager's updates list.
  5. Approve the service request, or reject it, and provide a reason.
  6. Open the BMC Digital Workplace Catalog dashboard while logged in as the user specified in Send In App Notification.

Note

When the approval process is completed, this workflow will always generate a dashboard notification, even in the event of system errors. If an error occurs, the most common error is that the user who requested the service has not been assigned a manager.

To incorporate a request for approval in a workflow

When you have confirmed that the approval configuration is correct, and it sends the appropriate notifications, you can incorporate the element into a workflow by using exclusive gateways.


Responses returned from the request for approval

You can expand the called Request Approval process to view its steps. As a service catalog administrator or internal service supplier, you need to consider only the following steps:

  • The Create Approval Stub Entry (form SB:ServiceRequestStub) is created.
  • The Receive Task element returns a Work Status.


ActionDescription
Create Approval Stub Entry

Creates a record through the SB:ServiceRequestStub form on the AR System server that triggers an Approval Server process

If the process fails to create a record, the workflow exits with a failure message .

Receive TaskWaits for the response and then exits with the following message variables, called Signal Parameters:
  • Request Status
  • Reject Reason

Values returned when running the default approval process

The approval rules and messages returned upon the receipt of signatures is configured in the process named SB Request Manager Approval in the Approval Server.

The Request Status signal parameter will return one of the following values:

ResponseDescription
ApprovedThe manager approved the request.
RejectedThe manager rejected the request. The manager may or may not have supplied a Reject Reason.
ErrorThe request approval process failed. The system error message is supplied as the Reject Reason.

You can test for these returned values, and insert exclusive gateways to direct the sequence flow based on conditions.

To troubleshoot issues

If the workflow triggers a Fault error in BMC Digital Workplace, check the configuration. Most common configuration issues include:

Where to go from here

Calling a custom approval process

Was this page helpful? Yes No Submitting... Thank you

Comments