As the workflow capability within SAP Build Process Automation doesn’t support the enterprise messaging service, you must model an additional action right before each end event for each process definition, that was started from the ABAP environment. This action calls an inbound service and notifies the ABAP Environment that the process that has been started on SAP Build Process Automation is now completed.
You've modeled a project with a process within SAP Build.
The action triggers the completion in the ABAP environment tenant and must be called exactly once.
With this approach, cancellations on workflow instances directly from the workflow capability API aren’t communicated to the ABAP environment tenant.
-
Create a new project in SAP Build by choosing Build an Automated Process > Actions.
-
Upload the API specification.
<?xml version="1.0" encoding="utf-8"?> <edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" xmlns="http://docs.oasis-open.org/odata/ns/edm"> <edmx:DataServices> <Schema Namespace="com.sap.gateway.default.api_workflow_notification.v0001" Alias="SAP__self"> <ComplexType Name="CT_NOTIFICATION_RESULT"> <Property Name="notificationProcessed" Type="Edm.Boolean" Nullable="false"/> </ComplexType> <Action Name="ProcessCompleted"> <Parameter Name="workflowInstanceId" Type="Edm.String" Nullable="false" MaxLength="36"/> <Parameter Name="outcome" Type="Edm.String" Nullable="false" MaxLength="255"/> <ReturnType Type="com.sap.gateway.default.api_workflow_notification.v0001.CT_NOTIFICATION_RESULT" Nullable="false"/> </Action> <EntityContainer Name="Container"> <ActionImport Name="ProcessCompleted" Action="com.sap.gateway.default.api_workflow_notification.v0001.ProcessCompleted"/> </EntityContainer> </Schema> </edmx:DataServices> </edmx:Edmx>
-
Enter a project name.
-
In the Add actions … dialog, choose only the service operation POST /Process Completed and then choose Add.
-
Modify the project settings as follows
-
Enable CSRF tokens for all actions in the project, and set Token Fetch End Point to
„/“
. -
Set the URL prefix to
„/sap/opu/odata4/sap/api_workflow_notification/default/sap/api_workflow_notification/0001“
.
-
-
Save the project.
-
Release the project and publish it to the library.
-
Include a new action step as last step in your process by choosing Actions > Browse Library.
-
Search for „Invoke action ProcessCompleted“ and choose Add.
-
Specify a destination variable in the action step details – create a new variable if necessary.
-
Configure the inputs of the action step.
-
From Process Metadata, assign Process Instance Id to the workflowInstanceId input.
-
Optional. To communicate the result of the process, assign any relevant variable to the outcome input.
-
-
When deploying your project, specify the destination created in the SAP BTP cockpit for the destination variable used in the action step.