
1. You are modeling Processes using Process Builder , the no-code process modeling tool.
2. SAPUI5 as your approval or task UIs.
SAP Build Process Automation supports SAPUI5 as the approval / task UIs. SAP Build Process Automation provides SAPUI5 component generation as Process Start or Task UIs. The input/output mapping of an approval form is managed through the manifest.json file of your SAPUI5 component.
Enhance the output mapping json schema of your Approval form. Enhance your outputs json object of your sap.bpa.task name space with additional task instance related info. for eg. TaskInfo is the json object with task instance information. In this example Task instance id, approver id and approver decision are added so that these attributes can be accessed from the process context after completion of the task instance by the approver.
"sap.bpa.task": {
"_version": "1.0.0",
"outcomes": [
{
"id": "approve",
"label": "Allow"
},
{
"id": "reject",
"label": "Deny"
}
],
"category": "approval",
"outputs": {
"$schema": "http://json-schema.org/draft-07/schema",
"title": "output",
"type": "object",
"required": [],
"properties": {
"Comments": {
"type": "string",
"title": "Comment",
"description": "Description for Textfield"
},
"TaskInfo": {
"type": "object",
"description": "Task Instance details",
"properties": {
"ID": {
"type": "string",
"description": "Task Instance id",
"title": "Task Instance ID"
},
"Approver": {
"type": "string",
"description": "Approver completed the task",
"title": "Approver"
},
"Decision": {
"type": "string",
"description": "Approver Decision",
"title": "Decision"
}
}
}
}
}
Task instances uses the patch API to complete and provide output mapping to the process context.Enhance the output mapping of the Task instance as given below. The TaskInfo json object contains attributes like Task Instance ID, approver name and approver decision.
var data = {
status: "COMPLETED",
decision: "approve",
context: {
Comments: "approved",
TaskInfo:{
ID: this.getComponentData().startupParameters.taskModel.InstanceID,
Approver:sap.ushell.Container.getService("UserInfo").getUser().getEmail(),
Decision:"Approved"
},
}
Build and deploy your SAPUI5 component.
Import SAPUI5 component as a form in SAP Build Process Automation and add this component as an approval form.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
11 | |
11 | |
11 | |
10 | |
8 | |
7 | |
7 | |
7 | |
7 |