As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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.
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.
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?
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...
https://alfresco.atlassian.net/browse/MNT-18756Seems no work has been logged...
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.
Hi, do you have any example of custom service task that does rest call?
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
Do you have an exaple of how to use EndpointService?