cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with DataBinding from OData Service in Workflow Task UI

0 Kudos

Hello,

i am new to SAP Cloud Platform Workflow and i have some issues with data Binding in my workflow. I want to create a simple Workflow of Purchase Order Approval and Rejection. It has 2 user tasks for which i build a Use Interface with the Workflow Task UI Template. (Right Click on the Workflow Project -> new -> workflow Task ui).

This gives me the nice opinion to deliver my context (the Purchase Order ID) via Workflow API to start a workflow instance from a definition. All the data from the context gets to the fields, lables and tables i want, but there is a problem i have with "normal" Odata Binding via the Entity Set Function (for example: List Item). I can create my datasource in the manifest.json and it seems to sync the metadata, but if i want to access the data in my Workflow Task UI folder "decideOrder" which is in the Workflow Projekt itself, it doesnt show the possibility to bind my entity Sets.

I really tried everything to solve this problem, but even if i copy the "local Service" metadata files to the Workflow UI component, it shows the entity sets, but in the application in my Inbox the fields are empty. The Odata Service itself is fine. I tried it with a normal UI5 Application to bind the items an it works. Seems to me, that the Workflow Task UI is not a possibility for binding my odata entities without using the json contextModel...or am i missing something?

Does the Workflow Task UI (it is even used in the Onboarding Sample in SAP Cloud Platform) maybe has some special folder architecture i am overseeing, so that the Application does not want to load the model?

Is the only way to solve this really is to write a sapui5 application for every User Task?

Maybe i am missing something, because the SAP Cloud Platform with especially the workflow Services is new to me...

Here is picture of my folder structure, the successful manifest.json. Metadata Sync.

The folder "decideOrder" is the UI for the User Task i am working on right now. It was automatically generated by the creation of the Workflow Task UI.

Thanks for your help!


Regards,

Stephan

Accepted Solutions (0)

Answers (2)

Answers (2)

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Stephan,
If you create the task UI using Workflow Task UI, all it does is pre-fills the task configuration in Component.js file but you still need to code your user-interface and do bindings etc. You can use standard SAPUI5 list or table or tree control and bind your model with it. It is like modelling any other SAPUI5 application. You can refer to the Sample workflow application to see how it is done.

Hope that clarifies.

Regards,
Archana

0 Kudos

Hello Archana,

i have now build a new UI5 project in an external Folder in my Workspace.

I can now sync metadata in this project and get the Data from the Entity Set, but if i deploy the application in my SCP, the tables stay empty. In other UI5 applications it works.

In my other UI5 application the manifest.json is not in the webapp folder. If i change my folder structure so that there is no webapp folder anymore (like in other UI5 projects) the manifest.json still syncs the metadata into webapp/localService/metadata.xml. That is a problem, because then my UI5 List doesnt recognize it anymore.

Am i missing something? Is there a possibility to change the path? Or do i have other settings for the model?

Thank you in advance,

Regards,

Stephan

This is my folder structure where my EntitySet shows up in a UI5-List and the metadata is synced. But tables stay empty in My Inbox.

Archana
Product and Topic Expert
Product and Topic Expert
0 Kudos

If it is simple user-interface layout, I would recommend to use Forms
https://help.sap.com/viewer/f85276c5069a429fa37d1cd352785c25/Cloud/en-US/bc57d645aee44e11afc8992fd27...

0 Kudos

Hello Archana,

thanks for your quick reply. Unfortunately it is a bit more complex user interface with calling Data from an OData Service for getting PurchaseOrders and the Archivelink Documents from our S/4 HANA System.

The Workflow Task UI works and shows the data from our Odata Services, but for some more Use-Cases in my workflow i need the Entity Set Function (for example to get new Documents shown in a list after uploading them in Upload Collection without switching the user Task or get new Data via service Task).

0 Kudos

Hello Archana,

that is what i do and it works perfectly when i fill it with my JSON-Model as you can see here:

That is the Code: (i had to set the items in the List in the code itself, not over Layout Editor)

That is what i get in my UI:

But i want to fill the list with the entity Set function and not with the JSON-Model which i get from my Service Task.
The problem there is, that i can add my data source to the manifest.json in the SAP UI5 Component and it works (it works in other normal applications too, but not in Workflow UI, but after that, the EntitySet in this List is empty and i can not select it:

I think it might be a problem with the architecture of a Workflow Project with Task UIs, but maybe i am missing something...

Thanks!