Workflow to request approval
Before you begin
Create the following process variables:
- A process context variable (see Capturing process context information)
- The following process input variables (see Adding-process-input-variables-to-a-workflow):
- Text variables (maximum of 10 variables)
- Integer variables (maximum of 2 variables)
- Decimal variables (maximum of 2 variables)
- Date variables (maximum of 2 variables)
- Date/time variables (maximum of 2 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.
From the palette, drag a Call Activity element onto the canvas.
- 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. - In the Properties panel, expand Called Process.
- 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:
- Click Request Approval to select the process.
- Click Call Activity, and submit all required input parameters for the Request Approval called process.
- Click Click to build an expression to open the expression builder for any of the available parameters.
Expand the process context process variable (identified as requestInfo) to insert the specified variables into each parameter, as shown in the following table.
Parameter
Required
Example
Comments
Requesting For User ID
Required
LOGIN NAMEUse the following parameter from the process context variable: Process Variables > context > Requested For User > Login Name
Approval Summary
Required
"Request for "+SERVICE NAME+ "by "+FULL NAMEThe Approval Summary field appears in the request for approval notification in BMC Helix 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:
- Process Variables > context > Service > Service Name
- Process Variables > context > Requested For User > Full Name
Concatenate the text to complete the following expression: "Request for "+SERVICE NAME+ "by "+FULL NAME
Service Name
Required
SERVICE NAMEUse the following parameter from the process context variable: Process Variables > context > Service > Service Name
SB Service Request ID
Required
SERVICE REQUEST IDUse the following parameter from the process context variable: Process Variables > context > Service Request > Service Request ID
Requesting User ID
Optional
LOGIN NAMEUse the following parameter from the process context variable: Process Variables > context > Requested By User > Login Name
Service ID
Optional
SERVICE IDUse the following parameter from the process context variable: Process Variables > context > Service > Service ID
Approval Process Name
Optional
"SB Request Manager Approval"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 Name
Optional
None
Leave blank.
Process Instance ID
Optional
None
Leave blank.
Order ID
Optional
ORDER IDUse the following parameter from the process context variable: Process Variables > context > Service > Order ID
Reject Reason
Optional
None
Use the Receive Task element to suspend the workflow until the external system sends a response back to BMC Helix Digital Workplace Catalog. The Receive Task element waits for the response in the form of a Signal Parameter. For more information, see Responses returned from the request for approvalbelow.
Approval Status
Optional
None
(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_01
Text
Flex_Char_02
Text
Flex_Char_03
Text
Flex_Char_04
Text
Flex_Char_05
Text
Flex_Char_06
Text
Flex_Char_07
Text
Flex_Char_08
Text
Flex_Char_09
Text
Flex_Char_10
Text
Flex_Int_01
Integer
Flex_Int_02
Integer
Flex_Dec_01
Decimal
Flex_Dec_02
Decimal
Flex_DateTime_01
Date/Time
Flex_DateTime_02
Date/Time
Flex_Date_01
Date
Flex_Date_02
Date
Flex_Time_01
Time
Flex_Time_02
Time
By populating any of the flexible fields, you send the information from BMC Helix 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 creating approval rules.
Click Save to close the expression builder.
When fulfilling a service, the inserted Call Request Approval activity send a request to run a process on the Approval Server.
To verify the request for the 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
- From the palette, drag a Send In App Notification element onto the canvas.
Open the expression builder, complete a field, and click Next > to advance to the next field.
Parameter
Example 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 Status and Reason signal parameters, and then manually concatenate the space between the parameters.
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.
To verify this workflow in a service
- Attach this workflow to a service in the Service Options panel.
- Complete the rest of the service publishing and entitlement process to view the service in BMC Helix Digital Workplace.
- Open BMC Helix Digital Workplace as a user and request the service.
The service should appear in your requests. - In a separate browser session, open BMC Helix Digital Workplace and log in as the user's manager.
The service request should appear in the manager's updates list. - Approve the service request, or reject it, and provide a reason.
- Open the BMC Helix Digital Workplace Catalog dashboard while logged in as the user specified in Send In App Notification.
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, consider the following steps:
- The Create Approval Stub Entry (form SB:ServiceRequestStub) is created.
- The Receive Task element returns a Work Status.
Action | Description |
---|---|
Create Approval Stub Entry | Creates a record through the SB:ServiceRequestStub form on the Action Request System (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 Task | Waits for the response and then exits with the following message variables, called Signal Parameters:
|
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 returns one of the following values:
Response | Description |
---|---|
Approved | The manager approved the request. |
Rejected | The manager rejected the request. The manager may or may not have supplied a Reject Reason. |
Error | The request approval process failed. The system error message is supplied as the Reject Reason. |
Failed | The request approval process timed out because two months elapsed since the request date. |
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 Helix Digital Workplace, check the configuration. Most common configuration issues include:
- BMC Helix Digital Workplace Catalog and BMC Helix Digital Workplace are not configured to connect with each other. See Enabling-and-configuring-the-enhanced-catalog-for-BMC-Helix-Digital-Workplace.
- The Request Approval workflow has not been deployed.
- The BMC Helix Digital Workplace Catalog server needs to be restarted.
Required licensing
SaaS subscribers who use BMC Helix ITSM or BMC-Helix-Virtual-Agent-Basic-service are entitled to this feature.
Where to go from here