-
Feature Request
-
Resolution: Duplicate
-
L3 - Default
-
None
-
None
-
None
We now had the use case a couple of times to create incidents from the outside (especially to notify the process of errors occurred in the ESB/Integration framework). Currently you need a workaround to do this (see http://image.slidesharecdn.com/2013communitydaybestpracticesfromconsulting-131022085051-phpapp02/95/slide-30-638.jpg?1382449917 in http://de.slideshare.net/camunda/community-day-2013-consulting-talks-about-camunda-bpm-best-practices). Basically you create the incidents within a custom command.
If you want retry possibilities this is not sufficient. Then you have to create a failed job (which seems to create the incident anyway) as shown here: https://bitbucket.org/camunda/outer-space-demos/src/master/async-on-error/src/main/java/com/camunda/fox/outerspace/async_on_error/AsyncOnErrorActivityBehavior.java?at=master:
protected void createAsynchronousContinuationJob(DelegateExecution execution, Exception exception)
{ MessageEntity message = new MessageEntity(); message.setProcessInstanceId(execution.getProcessInstanceId()); message.setExecutionId(execution.getId()); message.setExclusive(true); message.setJobHandlerType(AsyncContinuationJobHandler.TYPE); message.setExceptionMessage(exception.getMessage()); message.setExceptionStacktrace(getExceptionStacktrace(exception)); Context .getCommandContext() .getJobManager() .send(message); }We should have a public API method to provide the desired behavior out-of-the-box. For sure a Java API - ideally REST as well.
This is the controller panel for Smart Panels app
- is related to
-
CAM-836 Expose Incident Infrastructure in ProcessInstance-, Execution- and ProcessDefinitionQuery
- Closed