on 11-13-2020 1:21 AM
I'm wondering if its possible (and if any examples exist) for starting a CF workflow instance from a CAP application?
I can see examples (and the open sap cap course - week 4) cover calling external services but these are always OData services with an edmx file that can be used with the `cds import` command.
(According to `cds help import`: "Currently only OData EDMX input is supported".)
The workflow APIs (https://api.sap.com/api/SAP_CP_Workflow_CF/overview?name=SAP_CP_Workflow_CF&type=JSON∾tion=download&artifactType=REST) are REST API's only (not OData).
Alternative options would be to code the rest call directly in the UI5 app (though architecturally it seems better to do this from the cap service) or to fire an enterprise messaging event (which my cap service is doing anyway) and using CPI to capture that event and call the workflow api.
Hi Jason,
Yes you can implement custom handlers to achieve this. There's also a library to help with that: https://github.com/sapmentors/cds-scp-api
Pierre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.