Technical Information for Adapting the SAPUI5 Application

To use SAPUI5 applications as forms in SAP Build Process Automation, you need to add the "sap.bpa.task" namespace to the manifest.json file. You also need to adapt the Component.js file and the App.view.xml file in accordance with the manifest.json. The examples shown here are all compatible with each other.

Configuring the manifest.json File, version 1.0.0

Add the namespace "sap.bpa.task" to the manifest.json for your application. The following is an example:
The namespace must have the following properties:
  • The _version must be the namespace version.

  • The category can be either standard or approval, depending on the type of form you want to use in SAP Build Process Automation. The outcomes depend on the category you choose.

  • The outcomes can be an array of objects that have an id and a label. The id can be submit, approve or reject. You can enter any text for the label.

    • If the category is standard, the outcome must be [{id:”submit”, label: “AnyLabel”}]

    • If the category is approval, the outcome must be [{id:”approve”, label:”SomeLabel”}, {id:”reject”, label: “SomeLabel2”}].

  • The inputs must be a draft-7 JSON schema and define the context object you receive with the Workflow API for Cloud Foundry. For more information, see the Inputs and Outputs supported by SAP Build Process Automation Forms section below.

  • The outputs must be a draft-7 JSON schema and define the context object you have to send with the Workflow API for Cloud Foundry. For more information, see the Inputs and Outputs supported by SAP Build Process Automation Forms section below.

Configuring the manifest.json File, version 1.1.0

Add the namespace "sap.bpa.task" to the manifest.json for your application. The following is an example:
The namespace must have the following properties:
  • The _version must be the namespace version.

  • The category can be either standard or approval, depending on the type of form you want to use in SAP Build Process Automation.

  • The outcomes can be an array of objects that have an id, label, and type. The id can be arbitrary but must be unique. You can enter any text for the label. The type must be either positive, negative, or neutral and should correspond to the actions that the application creates for My Inbox.

    With version 1.1.0 you can have up to 5 custom outcomes independent of the category.

  • The inputs must be a draft-7 JSON schema and define the context object you receive with the Workflow API for Cloud Foundry. For more information, see the Inputs and Outputs supported by SAP Build Process Automation Forms section below.

  • The outputs must be a draft-7 JSON schema and define the context object you have to send with the Workflow API for Cloud Foundry. For more information, see the Inputs and Outputs supported by SAP Build Process Automation Forms section below.

Configuring the Component.js File

Once you’ve created your SAPUI5 application, you need to adapt the Component.js file.

Replace the definition of the Component.js file, which is the second parameter of UIComponent.extend, using the following example:

Configuring the App.view.xml File

If you want to use a text input, replace the App element in your app.view.xml file as follows:

Inputs and Outputs supported by SAP Build Process Automation Forms

The following schema shows all property definitions a SAP Build Process Automation form can output or handle as input.

Update the xs-app.json File

In the xs-app.json in your UI module folder (the same folder that also contains the webapp), you must replace the following code snippet:

Troubleshooting

  • When you build your application, if you receive an error message stating that your UI5 CLI installation is outdated, update the @ui5/cli version in the package.json file of the UI module. You can use versions from version 3 onwards, for example "^3.4.0".

  • If you have issues importing an SAPUI5 Form into your project or while deploying a project with an SAPUI5 Form, ensure that the required subaccount destinations are created in your tenant. For more information, see Create an SAP UI5 Task for a Business Process.