<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : plan1.xml
    Created on : 24 settembre 2007, 14.48
    Author     : mussi
    Description:
        Purpose of the document follows.
-->

<!-- <plan xmlns='http://xml.netbeans.oWebApplication1rg/schema/repairPlan'
      xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
     xsi:schemaLocation='http://xml.netbeans.org/schema/repairPlan'> file:/home/mussi/software/RepairPlanExecutor/src/schema/RepairPlan.xsd'> -->

<plan xmlns='http://xml.netbeans.org/schema/newXMLSchema'>
    <processID>6101</processID>
    <actions>
        
        <action>
            <compensate>
                <description>Compensation of the ConfirmOrder on the Supplier</description>
                <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']/invoke[@name='Inv-ConfirmOrder-Supplier']</activityID>
            </compensate>
        </action>
        
        <action>
            <compensate>
                <description>Compensation of the CheckAndReserve on the Supplier</description>
                <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/flow[@name='Flow-CheckAndReserve']/sequence[@name='Sequence-CheckAndReserve-Supplier']/invoke[@name='Inv-CheckAndReserve-Supplier']</activityID>   
            </compensate>
        </action>
        
        <action>
            <substitute>
                <description>Substitution of the Provider by means of the PAWS Semantic Mediator</description>
                <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/flow[@name='Flow-CheckAndReserve']/sequence[@name='Sequence-CheckAndReserve-Supplier']/invoke[@name='Inv-CheckAndReserve-Supplier']</activityID>
                <selectionParameters></selectionParameters>
            </substitute>
        </action>
        
        <!--
        <action>
            <retry>
                <description>Retry of the CheckAndReserve on the Supplier</description>
                <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/flow[@name='Flow-CheckAndReserve']/sequence[@name='Sequence-CheckAndReserve-Supplier']/invoke[@name='Inv-CheckAndReserve-Supplier']</activityID>
            </retry>
        </action> 
        -->
        
        <action>
            <retry>
                <description>Retry of the Assign for the evaluation of the IsAllAvailable condition</description>
                <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/assign[@name='Assign-ReservationResults']</activityID>
            </retry>
        </action>
        
        <action>
            <retry>
                <description>Retry of the IsAllAvailable condition</description>
                <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']</activityID>
            </retry>
        </action>
        
        <action>
            <evaluateCondition>
                <description>Evaluation whether the first branch of the IsAllAvailable condition is active or not</description>
                <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case</activityID>
                
                <actions>
                    
                    <action>
                        <retry>
                            <description>The first branch of the IsAllAvailable condition is active and we activate it by means of a Retry</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case</activityID>
                        </retry>
                    </action>
                    
                    <action>
                        <retry>
                            <description>We activate the Sequence included in the branch by means of a Retry</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']</activityID>
                        </retry>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip of the Assign for the EvauateTotalCost on the LocalShop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/assign[@name='Assign-PrepareMsg-CalculateTotalCost']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip of the EvauateTotalCost on the LocalShop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/invoke[@name='Inv-CalculateTotalCost-LocalShop']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip of the Assign for the ReplyAllIsAvailable on the Shop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/assign[@name='Assign-Prepare-Reply-Msg']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip of the ReplyAllIsAvailable on the Shop. This Retry is handled by the SH-BPEL middleware</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/reply[@name='Reply-AllIsAvailable']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip of the Receive-ConfirmationByCustomer on the Shop. This Retry is handled by the SH-BPEL middleware</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/receive[@name='Receive-ConfimationFromCustomer']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip of the Assign to store inside the Shop the new input submitted by the customer.</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/assign[@name='Assign-CustomerConfirmation']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip the Assign for the ConfirmOrder on the Supplier</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/assign[@name='Assign-CustomerConfirmation']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip the SwithCustomerConfirmationTrue condition</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>The first branch of the SwitchCustomerConfirmationTrue condition is active and we activate it by means of a Skip</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>We activate the Sequence included in the branch by means of a Skip</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip the Assign for the ForwardOrder on the LocalShop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']/assign[@name='Assign-PrepareMsgForwardOrder-LocalShop']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <skip>
                            <description>Skip the ForwardOrder on the LocalShop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']/invoke[@name='Inv-ForwardOrder-LocalShop']</activityID>
                        </skip>
                    </action>
                    
                    <action>
                        <retry>
                            <description>Retry the Assign for the ConfirmOrder on the Supplier</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']/assign[@name='Assign-PrepareMsg-ConfirmOrder']</activityID>
                        </retry>
                    </action>
                    
                    <action>
                        <retry>
                            <description>Retry the ConfirmOrder on the Supplier</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']/invoke[@name='Inv-ConfirmOrder-Supplier']</activityID>
                        </retry>
                    </action>
                    
                    <action>
                        <retry>
                            <description>Retry the Assign for the ForwardOrder on the Warehouse</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']/assign[@name='Assign-PrepareMsg-ForwardOrder']</activityID>
                        </retry>
                    </action>
                    
                    <action>
                        <retry>
                            <description>Retry the ForwardOrder on the Warehouse</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']/invoke[@name='Inv-ForwardOrder-Warehouse']</activityID>
                        </retry>
                    </action> 
                    
                    
                    <action>
                        <retry>
                            <description>Retry the Assign for the Reply on the Shop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/switch[@name='Switch-CustomerConfirmationTrue']/case/sequence[@name='Sequence-OrderConfirmed']/assign[@name='Prepare-Reply-Msg']</activityID>
                        </retry>
                    </action>
                    
                    
                    <action>
                        <retry>
                            <description>Retry the Reply on the Shop. This Retry is not handled by the SH-BPEL middleware</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/case/sequence[@name='Sequence-AllIsAvailable']/reply[2]</activityID>
                        </retry>
                    </action>
                    
                </actions>
            </evaluateCondition>
        </action>
        <action>
            <evaluateCondition>
                <description>Evaluation whether the second branch of the IsAllAvailable condition is active or not</description>
                <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise</activityID>
                <actions>
                    
                    <action>
                        <retry>
                            <description>The second branch of the IsAllAvailable condition is active and we activate it by means of a Retry</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>We activate the Sequence included in the branch by means of a Retry</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the Assign for the MergeUnavailableItemList on LocalShop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/assign[@name='Assign-PrepareMsg-MergeUnavailableItemList']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the MergeUnavailableItemList on LocalShop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/invoke[@name='Inv-MergeUnavailableItemList-LocalShop']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the Assign for the CancelOrder on LocalShop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/assign[@name='Assign-PrepareMsg-CancelOrder-LocalShop']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the CancelOrder on LocalShop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/invoke[@name='Inv-CancelOrder-LocalShop']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the Flow included in the branch</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/flow[@name='Flow-CancelOrder']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the first Sequence contained in the Flow</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/flow[@name='Flow-CancelOrder']/sequence[@name='Sequence-CancelOrder-Supplier']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the Assign for the CancelOrder on the Supplier</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/flow[@name='Flow-CancelOrder']/sequence[@name='Sequence-CancelOrder-Supplier']/assign[@name='Assign-PrepareMsg-CancelOrder']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the CancelOrder on the Supplier</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/flow[@name='Flow-CancelOrder']/sequence[@name='Sequence-CancelOrder-Supplier']/invoke[@name='Inv-CancelOrder-Supplier']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the second Sequence contained in the Flow</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/flow[@name='Flow-CancelOrder']/sequence[@name='Sequence-CancelOrder-Warehouse']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the Assign for the CancelOrder on the Warehouse</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/flow[@name='Flow-CancelOrder']/sequence[@name='Sequence-CancelOrder-Warehouse']/assign[@name='Assign-PrepareMsg-CancelOrder']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the CancelOrder on the Warehouse</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/flow[@name='Flow-CancelOrder']/sequence[@name='Sequence-CancelOrder-Warehouse']/invoke[@name='Inv-CancelOrder-Warehouse']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the Assign for the ReplySomethingIsNotAvailable on the Shop</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/assign[@name='Prepare-Reply-Msg']</activityID>
                        </retry>
                    </action>
                    <action>
                        <retry>
                            <description>Retry the ReplySomethingIsNotAvailable on the Shop. This Retry is handled by the SH-BPEL middleware</description>
                            <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/switch[@name='Switch-IsAllAvailable']/otherwise/sequence[@name='Sequence-SomethingIsNotAvailable']/reply[@name='Reply-SomethingIsNotAvailable']</activityID>
                        </retry>
                    </action>
                    
                </actions>
            </evaluateCondition>
        </action>
        
    </actions>
    
    <executeFrom>
        <description>Set the resume point</description>
        <activityID>/process/sequence[@name='Sequence-FoodShop-Process']/empty[@name='Empty-LastActivity']</activityID>
        <restoreState>true</restoreState>
    </executeFrom>
    
</plan>
