Test a Policy Model Containing Decision Service References

The Debugger can be used to test a policy model containing decision service references. To do this:

  1. Launch the Debugger. You will be prompted to log in to the Hub if you are not already logged in.
    • If you cancel logging in to the Hub, the Debugger will open, however, at the point in your testing where the decision service is invoked, an error will be displayed.
    • If you log in to the Hub, the decision service metadata will be refreshed and re-validated. If the references are still valid the Debugger will open. If the references are not valid, an error will be reported and will need to be fixed before the project can be debugged.
  2. Test your policy model either by entering data on the screens on the Interview tab or by entering input values on the Data tab. The decision services will be invoked as necessary. Note that:
    • If an input field is required and the policy model value is uncertain, then the decision service is not invoked and the decision service outputs are all presumed to be uncertain.

    • If an input field is optional and the policy model value is uncertain, then the decision service will be invoked.

    • If any of the input values are unknown, then all the outputs will be unknown.

    • A relationship that is mapped to a reference field that is known with no targets will result in all output mapped attributes and relationships being uncertain.

    • A decision service reference can still be invoked if one or more of the mapped in relationships is uncertain, provided no other input value is unknown. What will be sent out is the known targets of the relationship.

Tip: If you are not getting the result expected from the decision service invocation, test the decision service project separately to ensure that it is producing the expected output results.

Note: Decision services do not support relevance.

Changing the decision service while using the Debugger

Note that changing decision services while the Debugger is running can have certain effects:

  • Changing the decision service such that it is no longer compatible with the reference will mean invoking the decision service will fail. Note that this isn't as strict a metadata validation as performed by Policy Modeling. It is more dependent on whether the decision service fails based on what the runtime is presenting. For example, a missing input field will still fail, while the removal of an output field that was mapped by the reference will still run, it will just be treated as uncertain.

  • Decision services are only invoked as required due to changing input values. So if a decision service is changed, then the Debugger session might need to be restarted or reset or have values changed to get an updated decision service to be invoked.

  • Interviews have a what-if cache so even switching input values might not be sufficient to trigger a new call to a decision service if you change an input value to one that has been used before if this is in the context of a live update on a screen.