Change request
The Change Request process ensures all modifications are reviewed and approved before implementation
Step 1: Validation
General
Name: Validation
Script
- Format: JavaScript
- Type: Inline script
- Script:
JSON.parse(execution.getVariable("users"))["owner"] !== undefined &&
JSON.parse(execution.getVariable("users"))["expert"] !== undefined &&
JSON.parse(execution.getVariable("users"))["analyst"] !== undefined &&
JSON.parse(execution.getVariable("users"))["tech_steward"] !== undefined
- Result variable:
check
Asynchronous continuations
- Before and Exclusive
Job execution
- Retry time cycle:
R5/PT5M
Flow conditions
- If
Validation successful: proceed to Step 2. - If
Validation failed: proceed to Step 1.1.
Step 1.1: Status Updated: Verification failed
General
Name: Status Updated: Verification failed
Implementation
- Type: Connector
- Connector ID: http-connector
Asynchronous continuations
- Before and Exclusive
Job execution
- Retry time cycle: R5/PT5M
Connector inputs
Headers
- Local variable name:
headers - Assignment type: Map
- Map entries:
- Key: Content-Type
- Value: application/json
Method
- Local variable name:
method - Assignment type: String or expression
- Value: POST
Payload
- Local variable name:
payload - Assignment type: Script
- Format: JavaScript
- Type: Inline script
- Script:
JSON.stringify({
execution_id: execution.getId(),
stage: "Validation failed",
payload: [
{role: "others", status: "validation_failed"}
]
});
Step 1.2: Send Notification to Business user
General
Name: Send notification to Business user
Implementation
- Type: Connector
- Connector ID: http-connector
Asynchronous continuations
- Before and Exclusive
Job execution
- Retry time cycle: R5/PT5M
Connector inputs
Headers
- Local variable name:
headers - Assignment type: Map
- Map entries:
- Key: Content-Type
- Value: application/json
Method
- Local variable name:
method - Assignment type: String or expression
- Value: POST
Payload
- Local variable name:
payload - Assignment type: Script
- Format: JavaScript
- Type: Inline script
- Script:
JSON.stringify({
execution_id:execution.getId(),
stage:"Validation failed",
is_completed:true,
payload: {
to: [execution.getVariable("invoker_id")],
message: "Dear user, no responsible roles have been assigned. Please contact the Admin.",
need: {
mass_approve: false,
response: false,
assign: false
},
ui: {
caption: "",
assign: "",
buttons: {}
}
}
});
End event
Step 2: Status updated: Draft
General
Name: Status updated: Draft
Implementation
- Type: Connector
- Connector ID: http-connector
Asynchronous continuations
- Before and Exclusive
Job execution
- Retry time cycle: R5/PT5M
Connector inputs
Headers
- Local variable name:
headers - Assignment type: Map
- Map entries:
- Key: Content-Type
- Value: application/json
Method
- Local variable name:
method - Assignment type: String or expression
- Value: POST
Payload
- Local variable name:
payload - Assignment type: Script
- Format: JavaScript
- Type: Inline script
- Script:
JSON.stringify({
execution_id:execution.getId(),
stage:"Defining the сhanges",
payload:[
{role:"others",status:"draft"}
]
});
Step 3: Send notification to Business user
General
Name: Send notification to Business user
Implementation
- Type: Connector
- Connector ID: http-connector
Asynchronous continuations
- Before and Exclusive
Job execution
- Retry time cycle: R5/PT5M
Connector inputs
Headers
- Local variable name:
headers - Assignment type: Map
- Map entries:
- Key: Content-Type
- Value: application/json
Method
- Local variable name:
method - Assignment type: String or expression
- Value: POST
Payload
- Local variable name:
payload - Assignment type: Script
- Format: JavaScript
- Type: Inline script
- Script:
JSON.stringify({
execution_id:execution.getId(),
stage:"Defining the сhanges",
is_completed:false,
payload: {
to: [execution.getVariable("invoker_id")],
message: "Dear user, please provide the reason for the change request for the Owner's review.",
need: {
mass_approve: false,
response: true,
assign: false
},
ui: {
caption:"",
assign: "",
buttons: {
approve:"Send for approval",
reject:"Cancel request"
}
}
}
});