You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
Justification trees can be included in a webservice message and sent to another system. Using REST (+JSON) is the most common structure to expose messages. Justification trees can be selected in the domain editor using a custom schema element. This will lead to a JSON structure of the given tree, placed in the selected element of the domain. For more information, check Custom Schema Element: AQ_JustificationTreeV2.
Consuming a Justification Tree
In the current situation, Blueriq is able to send a Justification Tree using a custom Schema element. Blueriq is not able to consume an incoming message using a custom schema element. When information is needed in Blueriq (from another Blueriq webservice), the Justification tree could be interpreted as a part of the message, and handled using a corresponding model (with the elements that are relevant for the consumer).
Justification Tree from another module
When the Justification Tree is modeled in the same module as the domain schema, the schema element can consume the Justification Tree right away. However, in many cases, the module that contains the domain schema will not be the module that contains the Justification Tree. In the example below, the domain module "Service" contains the domain schema (with the AQ_JustificationTree schema element). Due to the data mapping and lack of rules, all attributes used in this module are user set, so no Justification will be available. The domain module "Domain" contains the logical domain of the Blueriq model. The Justification Tree will be available from this module.
In order to use the Justification Tree in the Service module, a data mapping is possible from the Domain module To the Service module. The Justification Tree will be generated, and be available in the other module to be attached to the webservice call.
A Justification Tree will be generated from the scope of the target instance from the matching source instance, so a tree would be available for each instance of the given entity
Clicking on the tree icon will enable you to attach a Justification Tree to the element in the target module and attribute (in the example above "Car.Costs"). When the Justification tree is used in the Custom Schema Element of Car.Costs, this tree will be used.
The tree will be generated based on the Justification of the attribute Tax.AnnualAmount (of the source module), and attached to the attribute in the target module as if this was the Justification of "Car.Costs".
As a result of the data mapping, both the attribute Car.Costs as well as its justification tree become user-set.
The depth and asset format(s) will determine the available tree in the target (service) module. If the depth is set lower in the data mapping than the Schema element, the schema element might miss information to be set in the response message.