Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-1442

Provide public API to create incidents

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Duplicate
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • 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.

        This is the controller panel for Smart Panels app

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

                Created:
                Updated:
                Resolved: