cancel
Showing results for 
Search instead for 
Did you mean: 

Modelling message based process start

tobiasw_
Champ in-the-making
Champ in-the-making
Hi everybody,

I was wondering how to model a message based process start in eclipse?

Do you usually use signavio, eclipse or do you write the xml manually?

Best regards,

Tobias

Edit: [Sorry, just noticed this is probably the wrong forum…]
5 REPLIES 5

tobiasw_
Champ in-the-making
Champ in-the-making
The xml would look somewhat like this. Anyone knows how to start a process with a message signal?

The only signal I found was in class runtimeService, but needs an execution id.

http://activiti.org/javadocs/org/activiti/engine/RuntimeService.html#signal%28java.lang.String%29

<itemDefinition id="StartProcessMessageType" structureRef="java.lang.String" />

<message id="StartProcessMessage" itemRef="StartProcessMessageType" />

<!– Start Event–>
    <startEvent id="messageStartEvent" name="StartProcess" >
      <dataOutput id="messageStartEventOutput" />
      <dataOutputAssociation>
        <sourceRef>messageStartEventOutput</sourceRef>
        <targetRef>s</targetRef>
      </dataOutputAssociation>
      <outputSet>
        <dataOutputRefs>messageStartEventOutput</dataOutputRefs>
      </outputSet>
      <messageEventDefinition messageRef="StartProcessMessage"/>
    </startEvent>

trademak
Star Contributor
Star Contributor
Hi,

If you want to run this process on Activiti don't use a message start event.
The supported start events are described in the userguide, see http://activiti.org/userguide/index.html#bpmnStartEvents.

Best regards,

tobiasw_
Champ in-the-making
Champ in-the-making
Thanks for your help Tijs.

I had a look at the user guide already and I could only find none start and timer start.

The one I was hoping for is Non-interrupting - Message Start Event as described in the spec http://www.omg.org/spec/BPMN/2.0/PDF/ at page 424.

trademak
Star Contributor
Star Contributor
Hi,

Can you explain why you want to use this type of start event?
With Activiti the none start event would probably fill-in your needs also.

Best regards,

I keep searing for the same. I have a parent process that does some stuff and at some point I want to create several subprocesses. I suppose I can loop in the flow, that seems awkward. The first thought I has was a script task that called startProcessInstanceByMessage() ... specifying a message refernce. I'd have another process that used the "message start event" ...

This is what the Eclipse plug-in generates. There appears to be exactly what I wont ... just throws an exception when I try to call startProcessInstanceByMessage() beccause there are no subscribers.

<startEvent id="messagestartevent1" name="Message start" activiti:async="true">
      <messageEventDefinition messageRef="TriggerSubProcessMessage"></messageEventDefinition>
</startEvent>

The reference you make takes me to the User Guide that sure seems to descrbie just want i want...

8.2.9. Message Start Event

Description

A message start event can be used to start a process instance using a named message. This effectively allows us to select the right start event from a set of alternative start events using the message name.