Cloud process integration can be used to do process integration, but also can be used to simplify development . We can put together backend service in an iflow for a front end application like SAP UI5 . Today I will  demo the process .  To simplify the demo, I will demo the process base on the blog Trigger a Workflow Instance from a SAPUI5 Application developed in a Multitarget Application by Mariajose Martinez

Step 1,  Deploy an iflow in Cloud process integration :

The following is the code in script1.grouvy

import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
def body = message.getBody(java.lang.String)
    def messageLog = messageLogFactory.getMessageLog(message)
    if (messageLog != null) {
        messageLog.addAttachmentAsString('ui5message', body, 'text/plain')
    }
    return message
}

After deployment, the runtime is in the following screenshot :

Step 2, create destination  for  cloud process integration runtime service key in BTP cockpit .

Step 3, Build and deploy the code base on the blog Trigger a Workflow Instance from a SAPUI5 Application developed in a Multitarget Application by Mariajose Martinez. Make some the following adjustment for Iflow rest api call.

Please note the following rout is added in xs-app.json under the module ui5workflowproject-approuter, Not under the module ui5applicationmodule .

Step 4 , Test from deployed sapui5 application

https://sap-internal—p-t-cee-iacapj-dev-ui5workflowproject-approuter.cfapps.eu10.hana.ondemand.com/ui5applicationmodule/index.html

Step 5, Check the result in Cloud Process Integration

 

The End!

Thank you for your time for reading!

 

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x