How to model Faults from SwitchYard Services in a jBPM process?
jeffdelong Apr 10, 2013 11:14 PMI ma trying to model the Savara purchasing example as with the StoreService implemented as a BPM Component, which uses a jBPM process to orchestrate two SwitchYard services (CreditAgency and LogisticsService), modeled as SwitchYard Services (not SwitchYard Dynamic Service Tasks). I have a question on how to handle a Fault throw by the CreditAgencyService. The requirement is that if the CreditAgency returns a CustomerUnknownFault the StoreService will return an AccountNotFoundFault.
https://docs.jboss.org/author/display/SWITCHYARD08/BPM describes fault handling properties, however I cannot seem to add these in the SwitchYard Services task
When I hit the Green + alongside Fault Signal Id, nothing happens. Nor is there any thing in the selection box.
By the way, CreditAgency.java defines
public interface CreditAgency {
public org.jboss.examples.creditagency.CreditRatingType creditCheck(
org.jboss.examples.creditagency.CreditCheckType content
) throws CustomerUnknownFault;
}
and my Intermediate Catch Event does know about this Fault
Which results in bmpn2
<boundaryEvent id="BoundaryEvent_2" name="" attachedToRef="ServiceTask_1"> | |
<errorEventDefinition id="ErrorEventDefinition_2" errorRef="Error_1"/> | |
</boundaryEvent> |
</process>
<interface id="Interface_1" implementationRef="org.savara.purchasing.creditagency.CreditAgency" name="CreditAgency">
<operation id="Operation_1" implementationRef="creditCheck" name="creditCheck"> | |
<inMessageRef>CreditAgency_creditCheck_content</inMessageRef> | |
<outMessageRef>CreditAgency_creditCheck_Result</outMessageRef> | |
<errorRef>Error_1</errorRef> | |
</operation> |
</interface>
<itemDefinition id="ItemDefinition_1" structureRef="org.jboss.examples.creditagency.CreditCheckType"/>
<message id="CreditAgency_creditCheck_content" itemRef="ItemDefinition_1" name="CreditAgency_creditCheck_content"/>
<itemDefinition id="ItemDefinition_2" structureRef="org.jboss.examples.creditagency.CreditRatingType"/>
<message id="CreditAgency_creditCheck_Result" itemRef="ItemDefinition_2" name="CreditAgency_creditCheck_Result"/>
<itemDefinition id="ItemDefinition_3" structureRef="org.savara.purchasing.creditagency.CustomerUnknownFault"/>
<error id="Error_1" name="CustomerUnknownFault" structureRef="ItemDefinition_3"/>
In the Boundary Event Event Definitions UI, the Event Type is Error, and this name is not editable. So I am not sure how I would name different events.
Once this is sorted out, the next step would be to figure out how to throw the AccountNotFoundFault back to the client.