Use this functionality to query an existing ServiceNow change request for approval.
The user must provide:
-
Valid credentials (Basic authentication or OAuth authentication) and the ServiceNow host URL are required.
-
The cr-number auto-generated during change request creation.
-
At least one of the following options to poll for these fields until they reach the specified values:
-
The current state of the change request (specified by
state-field-value
). -
The value of the approval field in ServiceNow (specified by
approval-field-value-approved
andapproval-field-value-rejected
).
-
All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Inputs
Inputs for querying a change request for approval are listed below.
Change request model field | Data type | Required | Description |
---|---|---|---|
|
String |
Yes |
The ServiceNow host URL. |
|
String |
Yes |
The username used for authentication. |
|
String |
Yes |
The password used for authentication. |
|
String |
Required only for OAuth-based authentication. |
The unique identification number of the client. |
|
String |
Required only for OAuth-based authentication. |
The client secret used for authentication. |
|
String |
Yes |
The unique number auto-generated during change request creation. |
|
String |
No |
The polling interval, in minutes, for the action to periodically check the approval status in ServiceNow.
Default is |
|
String |
No |
The maximum time duration, in minutes, for the action to continue polling for approval status in ServiceNow.
Default is |
|
String |
Required if |
The value of the state field in ServiceNow.
The action continues to poll until the state field in ServiceNow matches |
|
String |
Required if |
The value of the approval field in ServiceNow that indicates the change request is approved. The action continues to poll until the approval field in ServiceNow is either "approved" or "rejected". |
|
String |
Required if |
The value of the approval field in ServiceNow which indicates that the change request is rejected. The action continues to poll until the approval field in ServiceNow is either "approved" or "rejected". |
Outputs
Outputs for the poll for approval request functionality are listed below.
Change request model field | Data type | Description |
---|---|---|
|
String |
The unique change request number auto-generated during change request creation. |
|
String |
The identifier auto-generated during change request creation. |
|
String |
The value of the approval field in ServiceNow. |
|
String |
The current status of the change request. |
Usage example: Both state and approval values
The following is an example payload for querying a change request for approval using OAuth-based authentication and both state and approval values:
Usage example: State value
The following is an example payload for querying a change request for approval using basic authentication and the state value:
Usage example: Approval value
The following is an example payload for querying a change request for approval using OAuth-based authentication and approval values:
Usage example: Refer to creation step output
The following is an example referring to the output parameter number
from the change request creation step as input in the poll for approval step: