Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacky_Liu
Product and Topic Expert
Product and Topic Expert
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 mariajosemq741

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 mariajosemq741. 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...



Step 5, Check the result in Cloud Process Integration


 



The End!

Thank you for your time for reading!

 

Best regards!

Jacky Liu

 
6 Comments