• Arnaud Fontaine's avatar
    simulation: The parent SM may have several BLs as 'causality'. · 3f4c8e91
    Arnaud Fontaine authored
    Simulation Tree:
      SM_PPL
        AR(Inventory Accounting Transaction)
          SM_IAT(ledger=A)
          SM_IAT(ledger=B)
    
    Where SM_IAT.isBuildable() returns True iff:
      * SM_IAT(ledger=A): SM_PPL delivery state == 'started' (Shipped).
      * SM_IAT(ledger=B): SM_PPL delivery state == 'stopped' (Received).
    
    Defining this in a single BP lead to the following Business Links:
      * BL_PPL_started:
        - predecessor=trade/ordered
        - successor=trade/delivery_started
        - completed_state_list=['started']
        - trade_phase=trade/delivery
      * BL_IAT_ledger_A:
        - predecessor=trade/delivery_started
        - successor=trade/inventory_accounted
        - trade_phase=trade/inventory_accounting
        - predicate: ledger == A
    
      * BL_PPL_delivered:
        - predecessor=trade/ordered
        - successor=trade/delivered
        - completed_state_list=['stopped', 'delivered']
        - trade_phase=trade/delivery
      * BL_IAT_ledger_B:
        - predecessor=trade/delivered
        - successor=trade/inventory_accounted
        - trade_phase=trade/inventory_accounting
        - predicate: ledger == B
    
    This means that SM_PPL will have both BL_PPL_started and
    BBL_PPL_delivered Business Links as causality which was not handled
    by isBuildable.
    
    Another solution would have been to add this logic on the Builder
    'Simulation Select Method' but IMO this should not be done there.
    3f4c8e91
Name
Last commit
Last update
bt5 Loading commit data...
erp5 Loading commit data...
product Loading commit data...
scalability_test Loading commit data...
slapos Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
CHANGES.erp5.util.txt Loading commit data...
MANIFEST.in Loading commit data...
Products Loading commit data...
README.erp5.util.txt Loading commit data...
setup.py Loading commit data...