You will probably notice some empty service descriptors - these are placeholders for actions resulting from exiting the loop (i.e. the loop associated with sending the request for quote to multiple suppliers). There is also another point that you may notice, the first 'SwitchAction' which routes the inbound events has a path with no associated message type. This is because this path is triggered by a different type of event - in this case where all of the quote responses have been received from the suppliers, we then want to return the quote list back to the buyer. Both of these points will be the subject of dev forum posts in the near future.
[Jeff Yu] Yeah, I think with the 'empty message type' in 'SwitchAction' will be a little bit confused, it seems to me like the default branch for 'SwitchAction'.
The above are snippets from the design discussion page for Process Governance.
The issue here is that the path associated with the switch case that has no message type is going to be triggered based on an internally evaluated condition (i.e. when all quotes have been received).
If we don't include an entry for this path in the root 'SwitchAction', then we need to have a different way of defining that this path is a part of the top level stateless behaviour.
In the case of paths triggered by the receipt of a message, then these are documented in this root SwitchAction. The current (version 3) of the worked example on the wiki deals with the non-message triggered path by also including it in the top level SwitchAction - but as Jeff points out, this is confusing because there is no associated message type (or indication what the event is that will trigger the path).
Another approach may be to mark the specific service descriptor in some way? Would prefer not to add another action type for this - wonder whether the relevant "service" element could have an appropriate attribute?
<service category="org.pi4soa.esbbroker.esbbroker" name="ESBBrokerProcess_Broker__7" trigger="internal" > <listeners> <jms-listener busidref="busId8" maxThreads="1" name="org.pi4soa.esbbroker.esbbroker-ESBBrokerProcess_Broker__7"/> </listeners> <actions> <action class="org.jboss.soa.overlord.jbossesb.actions.stateless.SendMessageAction"> <property name="operation" value="makeEnquiry"/> <property name="messageType" value="quoteList"/> <property name="clientRole" value="Buyer"/> </action> </actions> </service>
where 'trigger' attribute indicates the source of the event that will invoke this service descriptor - either internal or external (default). Could use a different attribute name/value.
But not sure how higher level Graphical Editors would be able to deal with this?
Also is there a more appropriate name that 'SwitchAction', for an action that is essentially routing messages based on their type?