Provide public API to create incidents

XMLWordPrintable

    • Type: Feature Request
    • Resolution: Duplicate
    • Priority: L3 - Default
    • None
    • Affects Version/s: None
    • Component/s: engine
    • 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.

            Assignee:
            Unassigned
            Reporter:
            Bernd Ruecker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: