Does REST call task throw BPMNError?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2021 03:12 AM
If REST call task receives http status 400, for example, does it throw a BPMNError so that a boundary error event can catch it? It does not seem to happen.
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2021 05:07 AM
Hi!
I am not so sure about your question but for example, If I take a look into this ActivitiWorkflowEngine java file I can see the errors are controlled like this:
private static final String ERR_DEPLOY_WORKFLOW = "activiti.engine.deploy.workflow.error";
So, i can make the trace to this activiti-engine-messages properties file where is defined the translation of this error:
activiti.engine.deploy.workflow.error=Failed to deploy workflow definition.
Is this helping you? If not, could you please give us more details about exactly what do you need to know?
Cheers,
Cris.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2021 05:25 AM
Actually not. ERR_DEPLOY_WORKFLOW seems to be just a constant holding an error message for a failed deployment.
I mean that, in runtime, if a REST call task submits a request and reveices any other http status than OK it just hangs forever (if you don't attach a timer boundary event). Instead, it should throw a BPMNError so that the process could catch it and do something. My question is why it does not do it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2021 06:37 AM
And exceptions like this are just logged and the execution hangs:
org.activiti.engine.ActivitiException: error while converting: 897 to long at com.activiti.runtime.activiti.BaseRestCallDelegate.getFormattedLongValue(BaseRestCallDelegate.java:760) at com.activiti.runtime.activiti.BaseRestCallDelegate.createJSONRequestObject(BaseRestCallDelegate.java:307)
It would be nice to know why numbers cannot be converted to long...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2021 12:54 PM
https://alfresco.atlassian.net/browse/MNT-18756
Seems no work has been logged...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2021 06:24 AM
No, it does not. create your custom service (fo a service task) that does the rest call and throws appropriate errors as you may need.
Abbas

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2021 07:14 AM
Hi, do you have any example of custom service task that does rest call?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2021 12:23 AM
you can use rest template to call rest apis from code. if you have stored your URLS in admin endpoint, use APS' endpointService to access them
Abbas

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2021 09:11 AM
Do you have an exaple of how to use EndpointService?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2021 11:34 PM
AFAIK EndpointService belongs to enterprise apis (of APS). contact alfresco for APS javadocs to kown usage and other details,
Abbas
