Workflow to request approval
As a catalog administrator, you can create workflows that use approval processes defined in Action Request System (AR 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.
Integrating BMC applications with BMC Helix Digital Workplace Catalog
From the AR System documentation
Setting up the approval process
Before you begin
Open an existing workflow or create a new workflow, as described in Exploring the workflow designer.
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.
Warning
Do not use the Create Request Approval Stub Entry element to generate approval requests. This element is used inside the Request Approval process that the workflow calls.
- 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 NAME
Use 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 NAME
The 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 NAME
Use the following parameter from the process context variable: Process Variables > context > Service > Service Name SB Service Request ID Required SERVICE REQUEST ID
Use the following parameter from the process context variable: Process Variables > context > Service Request > Service Request ID Requesting User ID Optional LOGIN NAME
Use the following parameter from the process context variable: Process Variables > context > Requested By User > Login Name Service ID Optional SERVICE ID
Use 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 ID
Use 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 approval below.
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 Tip
To populate the Flex fields with user input, create the required process variables. For more details about process variables, see Data handling in workflow activities.
To pass text input from the service requester, create a 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, 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 Date, Current Time, Current 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.
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.
Important
The Request Approval process times out after two months if no action is taken on the process at runtime.
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.Tip
To test that the workflow itself is being called, you can also insert a Send In App Notification element before Call Request Approval, for example:
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.
- OpenBMC Helix Digital Workplaceas 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.
Note
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 catalog administrator or internal 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 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.
- The Request Approval workflow has not been deployed.
- The BMC Helix Digital Workplace Catalog server needs to be restarted.
Comments
Log in or register to comment.