cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cannot test workflow api using run configuration in BAS

Pamela
Product and Topic Expert
Product and Topic Expert
0 Likes
657

Dear experts,

I created a MTA project with HTML5 module. I'm invoking workflow rest and odata api In the HTML5 modeule.

It was working fine if deploy this project to BTP.

But when I tried to directly preview this HTML5 application in BAS, it returns 404 NOT FOUND.

I tried to put VCAP_SERVICES that contains destination and worfklow into my run configuration's env property.

But it still cannot invode workflow related APIs.

Am I missing a configuration? How can I make it works?

Thanks and regards,

Pamela

Accepted Solutions (0)

Answers (2)

Answers (2)

tobias_breyer
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Pamela,

maybe the error logs of the managed approuter tell you more about the 404 error:

https://help.sap.com/docs/WZ_STD/8c8e1958338140699bd4811b37b82ece/fb3b6b6299de413289c991c6358dfbd9.h...

Regards,

Tobias

junwu
SAP Champion
SAP Champion
0 Likes

show us your xs-app.json and your code to call odata

are you using standalone app router or managed router?

Pamela
Product and Topic Expert
Product and Topic Expert
0 Likes

I'm using managed router.

And following is my xs-app.json.

{
"welcomeFile": "/index.html",
"authenticationMethod": "route",
"routes": [
{
"source": "^/wfs/(.*)$",
"target": "/workflow-service/rest/$1",
"service": "com.sap.bpm.workflow",
"endpoint": "workflow_rest_url",
"authenticationType": "xsuaa"
},{
"source": "^/bpmworkflowruntimeodata/(.*)$",
"target": "/$1",
"service": "com.sap.bpm.workflow",
"endpoint": "workflow_odata_url",
"authenticationType": "xsuaa"
}, {
"source": "^/bpmworkflowruntime/(.*)$",
"target": "/$1",
"service": "com.sap.bpm.workflow",
"endpoint": "workflow_rest_url",
"authenticationType": "xsuaa"
},
{
"source": "^/sap/(.*)$",
"target": "/sap/$1",
"destination": "ES5",
"authenticationType": "xsuaa",
"csrfProtection": false
},
{
"source": "^/resources/(.*)$",
"target": "/resources/$1",
"authenticationType": "none",
"destination": "ui5"
},
{
"source": "^/test-resources/(.*)$",
"target": "/test-resources/$1",
"authenticationType": "none",
"destination": "ui5"
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
And binding the workflow odata service as main service in manifest.json
"dataSources": {
"mainService": {
"uri": "/bpmworkflowruntimeodata/v1/tcm",
"type": "OData",
"settings": {
"odataVersion": "2.0"
}
}
},

Then directly binding entity "TaskCollection" in my view.

Thanks and regards,

Pamela