cancel
Showing results for 
Search instead for 
Did you mean: 

Linking two activiti workflows

anshuman87
Champ in-the-making
Champ in-the-making
Hi,

I want to connect two independent business processes such that after starting a workflow , at some point in that workflow the control passes to another process, which then starts to execute.

I tried doing this using both message event and signal event with no success. The first process appears to throw the signal but it is not being caught by the second process.

I am attaching the test activiti diagrams that I used for the above. Please advise.

Note: The attached diagrams are in .txt format. Please remove the .txt extension to view the xml files.
2 REPLIES 2

anshuman87
Champ in-the-making
Champ in-the-making
Pasting the code for the activiti diagrams here

TestSender:

<code>
<signal id="ConnectorSignal" name="ConnectorSignal"></signal>
  <message id="ConnectorMessage" name="ConnectorMessage"></message>
  <process id="sendProcess" name="send process" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="User Task"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <boundaryEvent id="boundarymessage1" name="Test Message" attachedToRef="usertask1" cancelActivity="true">
      <messageEventDefinition messageRef="ConnectorMessage"></messageEventDefinition>
    </boundaryEvent>
    <endEvent id="endevent2" name="End"></endEvent>
    <intermediateThrowEvent id="signalintermediatethrowevent1" name="SignalThrowEvent">
      <signalEventDefinition signalRef="ConnectorSignal"></signalEventDefinition>
    </intermediateThrowEvent>
    <sequenceFlow id="flow8" sourceRef="usertask1" targetRef="signalintermediatethrowevent1"></sequenceFlow>
    <sequenceFlow id="flow9" sourceRef="signalintermediatethrowevent1" targetRef="endevent2"></sequenceFlow>
    <sequenceFlow id="flow10" sourceRef="startevent1" targetRef="boundarymessage1"></sequenceFlow>
  </process>
</code>

TestReceiver :

<code>

<signal id="ConnectorSignal" name="ConnectorSignal"></signal>
  <message id="ConnectorMessage" name="ConnectorMessage"></message>
  <process id="receiveProcess" name="receive process" isExecutable="true">
    <userTask id="usertask1" name="User Task"></userTask>
    <endEvent id="endevent2" name="End"></endEvent>
    <sequenceFlow id="flow7" sourceRef="usertask1" targetRef="endevent2"></sequenceFlow>
    <startEvent id="messagestartevent1" name="Message start">
      <messageEventDefinition messageRef="ConnectorMessage"></messageEventDefinition>
    </startEvent>
    <sequenceFlow id="flow10" sourceRef="messagestartevent1" targetRef="usertask1"></sequenceFlow>
    <intermediateCatchEvent id="signalintermediatecatchevent1" name="SignalCatchEvent">
      <signalEventDefinition signalRef="ConnectorSignal"></signalEventDefinition>
    </intermediateCatchEvent>
    <sequenceFlow id="flow11" sourceRef="signalintermediatecatchevent1" targetRef="usertask1"></sequenceFlow>
  </process>
</code>

I am unable to figure out how to get around this and need help. Please respond

jbarrez
Star Contributor
Star Contributor
Signals are to use here. I see the signal defined in the receiver, but there is no start event using it.