Choreography Dependency

In this choreography one choreography is dependent on another such that the second choreography can only be executed after an instance of the earlier choreography has occurred. Here is an example to make it more concrete.

The first choreography - order placement

The first choreography allows a buyer to place an order then optionally change or cancel it. It involves:

1. A Buyer sending a Supplier an order.

2. The Supplier sending an order response document to the buyer that indicates the extent to which the supplier can satisfy the order. This is dependent on step 1

3. The Buyer optionally sending a Change Order to the Supplier that modifies the original. This is dependent on the step 1 and can occur multiple times.

4. The supplier sends an order response document to the buyer that indicates the extent to which the supplier can satisfy the changed order. This is dependent on and a response to step 3.

5. The Buyer optionally sending a Cancel Order to the Supplier that cancels the original order and any changes. This can occur at any point after step 1 provided that a step 5 (this step) has not been executed previously.

6. The Supplier sending a Cancel Order Response to the Buyer that indicates whether or not the Cancel Order has been accepted. This is dependent on step 5.

In addition:

7. The Supplier can send an error response document to the Buyer as a reply to any message they receive that indicates that there was some error in the message that prevented it being processed.

8. The Buyer can send an error response document to the Supplier as a reply to any message they receive that indicates that there was some error in the message that prevented it being processed.

The second choreography - order status query

This second choreography allows a Buyer to make an inquiry on the status of any order they have previously placed. The dependency is that the Buyer should only do an order status query if they have previously started the execution of an order placement choreography. The steps are:

1. A Buyer sending a Supplier an order status request. This is dependent on step 1 of the first choreography

2. The Supplier returning an order status response that indicates: a) if the order was recognized, and b) if it was recognized, then the state of the processing of the order, e.g. received but not processed, processed, shipped, billed, etc.

In addition error response documents can be sent as for the first choreography.