cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BTP CF: write status to CAP App from Workflow

former_member729305
Participant
0 Kudos

Hello everyone,

I am currently working on a CAP App which initiates a workflow instance by Event Handler. this works fine. Within the myInbox for this worklow instance the user can confirm or reject the item. Next step is that I want to write that decision/status ${context.decision} back to my CAP App. I thought I could do that via the service task in my workflow with a HTTP Patch call for my destination which is my URL for my App. The path then includes the item ID from context for which i want to update the status. What would I have to enter in the request and response variable to assure that the field within my CAP App is updated?

Is that approach correct? Do you have any ideas how to solve that?

Best Regards

Max

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor
0 Kudos

The request variable must be set to a context field containing the properties you want to update with your PATCH request. The response variable must be set to a context field in which the response of the PATCH request is stored (details and example -> check the documentation here).

In case you want to have a special handling in your workflow in case the PATCH request is not successful, you have to model it, e.g. by using a gateway checking the response code stored in context response variable field to be able to decide how to go on.

former_member729305
Participant
0 Kudos

Dear florian.pfeffer

Thank you very much for your answer! In my case all I want to do is to update a certain datafield within another app via HTTP PATCH from my workflow instance. The destination then is the URL to myApp and the path represents the certain record for which I am updating the data field. I am wondering if I need a response at all? as I do not want to receive anything back to my context/workflow. All i want to do is to write the status fom workflow (e.g. 'approved') to my App. it should work then wotihout Response, correct?

BR
Max

pfefferf
Active Contributor
0 Kudos

Yes, if you are not interested in the response (even if the PATCH failed), then you can ignore it.

former_member729305
Participant
0 Kudos

thanks! When you make a PATCH Request it updates the record that you are calling by destination and path with the entry thats inside your given context? e.g. ${context.decision}

In addition: can you tell how to maintain the XSRF Token Path?

v1/xsrf-token does not work and returns error that header information could not be received.

BR
Max