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-18756
Seems 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?
AFAIK EndpointService belongs to enterprise apis (of APS). contact alfresco for APS javadocs to kown usage and other details,
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.