Each time we get a divergence by a divergence tester, automatic solvers will be invoked in delivery_causality_workflow. To use this feature, you need to configure both target solvers and divergence testers.
Table of Contents
Target Solver portal types should be created under portal_solvers, not portal_types.
And add it in Solver Process portal_type's allowed content types.
Then add 'solver_workflow' in the solver portal type's workflow chain.
In each divergence testers where you want to use the automatic target solver that you just created, you need to register the target solver.
Please note that each divergence tester should be atomic, i.e. if we want to solve several properties at a single step (eg. quantity and quantity_unit), we should use a single target solver and thus we should handle there divergences with a single divergence tester. On the other hand, if you might want to solve differently for several properties, divergence testers should be separated per a target solver.
If you want to pass some parameters to the target solver, you can create a script that returns a dict of parameters, and specify it in the target solver portal type ('Default Configuration Property Dict Method' field). You can get these parameters by calling target_solver.getConfigurationPropertyDict() in your target solver class implementation.
If you want to use a delivery solver to modify the quantity of simulation movements, you can create a delivery solver portal type. To specify which delivery solver should be used in the automatic target solver, you need to include 'delivery_solver':'XXX Delivery Solver' in the default parameters described above.
You can see working examples in TestAutomaticSolvingPackingList class in ERP5/tests/testPackingList.py.