AnsweredAssumed Answered

How can I forward catched exception?

Question asked by al_lv on Mar 9, 2011
Latest reply on Mar 14, 2011 by jbarrez
Hallo all,

this is my process definition:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="siebel" name="siebel">
    <startEvent id="startevent3" name="Start"></startEvent>
    <serviceTask id="servicetask1" name="SiebelTask" activiti:class="de.ec4u.c4.workflowserver.servicetasks.SiebelTask"></serviceTask>
    <endEvent id="endevent3" name="End"></endEvent>
    <sequenceFlow id="flow2" name="" sourceRef="startevent3" targetRef="servicetask1"></sequenceFlow>
    <sequenceFlow id="flow3" name="" sourceRef="servicetask1" targetRef="endevent3"></sequenceFlow>
   <boundaryEvent attachedToRef="servicetask1" cancelActivity="true" id="boundaryerror1" name="" parallelMultiple="false">        
         <errorEventDefinition/>
    </boundaryEvent>
   <sequenceFlow id="flow4" name="to Service Task" sourceRef="boundaryerror1" targetRef="servicetask2"></sequenceFlow>
   <serviceTask id="servicetask2" name="WriteToFile" activiti:class="de.ec4u.c4.workflowserver.servicetasks.WriteToFile"></serviceTask>
   <endEvent id="endevent4" name="End"></endEvent>
   <sequenceFlow id="flow5" name="" sourceRef="servicetask2" targetRef="endevent4"></sequenceFlow>
</process>
</definitions>

the diagramm:
[attachment=0]archive_document_v2.png[/attachment].

I want to catch all exceptions that can be throwen during SibelTask and write the stack trace into the file.
Is it possible with boundary error event?
If yes, how can I forward with boundary error event catched error or exception to the next Java Service task?

Thanks

Alexej

Attachments

Outcomes