on ‎2023 Feb 26 2:53 AM
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
Request clarification before answering.
Hi Pamela,
maybe the error logs of the managed approuter tell you more about the 404 error:
Regards,
Tobias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
show us your xs-app.json and your code to call odata
are you using standalone app router or managed router?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 7 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.