Job - createApproval
Job - createApproval
Description :
This command creates an approval request. You can add this request to a job that requires approval.
This command returns an approval ID.
Set approvalType to one of the following integers:
- 0=NoApproval
- 1=Remedy Manual Approval
- 2=Remedy Automatic Approval
- 3=Remedy Emergency Approval
- 5=Existing Approval
Set changeType to one of the following integers:
- 0=Optional, not required
- 1=Project
- 2=Change
- 3=Asset Configuration
- 4=Asset Management
- 5=Asset Lease
- 6=Purchase Requisition
- 7=Asset Maintenance
Set impactId to one of the following integers:
- 0=Optional, not required
- 1=Extensive/Widespread
- 2=Significant/Large
- 3=Moderate/Limited
- 4=Minor/Localized
Set riskLevel to one of the following integers:
- 0=Optional, not required
- 1=Risk Level 1
- 2=Risk Level 2
- 3=Risk Level 3
- 4=Risk Level 4
- 5=Risk Level 5
Return type : Integer
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
approvalType | Integer | The approval type. See list above. |
changeType | Integer | The change type. See list above. |
comments | String | A string that appears in the change summary. If you set approvalType to 5 (Existing Approval), then the comments argument is optional - you can leave it blank "". |
impactId | Integer | The impact ID. See list above |
riskLevel | Integer | The risk level. See list above. |
changeId | String | The change ID that you got from the change management system. Required only if you set approvalType to 5 (Existing Approval). |
taskId | String | The task ID that you got from the change management system. Required only if you set approvalType to 5 (Existing Approval). |
Example
The following example shows how to create an approval request.
Script
JOB_APPROVAL_ID=`blcli Job createApproval 2 2 "My change" 2 3 "" ""`