cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello,

I want to trigger Workflow from application by using bpmworkflowruntime destination defined on BTP.

I configured xs-app.json in application folder.

And here is my mta.yaml file.

In controller in function that handles the click of the button I wrote this code.

Here is my destination.

The error is 403 so it seems that it calls right destination but authorization is missing.

I was working with this tutorial: https://blogs.sap.com/2020/08/27/starting-workflow-from-custom-fiori-application-in-cloud-foundry/

I also tried to call bpmworkflowruntime/v1/xsrf-token but there was 404 error.

From my understanding if I am logged in using xsuaa on SAPUI5 it should automatically authorize the destination usage.

Can someone confirm if all my configurations are correct what should I do to get it working?

Thank you.

View Entire Topic
tobias_breyer
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

have you checked the calling user has suitable permissions?

See API docs: https://api.sap.com/api/SAP_CP_Workflow_CF/resource

POST workflow-instances, 403 => "User does not have sufficient privileges."

Roles permitted to execute this operation:

  • Global roles: WorkflowInitiator
  • Scope: WORKFLOW_INSTANCE_START
So you should validate that the user has WorkflowInitiator role.

Regards,

Tobias

wskaw
Explorer
0 Likes

Hi,

thank you for your answer.

I have tried calling the same API from postman and it works fine, so I think that is not a problem.

Best regards,

Wiktor