Document toolboxDocument toolbox

Avola Decision Connector

Description

This module connects to the new version of Avola Decision and makes it easy for Mendix developers to integrate the Avola engine in a Mendix project. All supported API operations are supporting in which the authentication, synchronisation and execution is handled. For more information about Avola Decision, please check our website.

Typical usage scenario

For implementing decisions in the Mendix application determined, built and maintained by the business in Avola Decision. Typical scenario's are decisions regarding acceptations, calculations and process flows.

Features and limitations

Features:

  • Authentication.Synchronisation of all decisions or a specific decision with all its versions.

  • Execution of specific decision versions.

  • Advanced testing pages, with predefined setup so testing is dummy proof.

  • Advanced logging. Debug for calls which log the reference and conclusion among others. Trace for mapped information on business data level.

  • Microflow helpers for implementing the logic in the Mendix model.

  • Language support for en_US and nl_NL.

  • Encryption applied to client id, client secret and token.

  • Uses native REST implementation of Mendix, so no code is written; easy maintenance.

Dependencies

  • Encryption module

Installation

Note: We recommend to also download the Avola Decision Explorer for all Mendix Projects from 10.12.0

  1. Import the module into your project.

  2. Setup your AvolaUrl (constant).

  3. Attach AvolaOAuth_Overview to the navigation.

  4. Attach DecisionService_Overview to the navigation.

  5. Attach ExecutionRequestLog_Overview to the navigation

Configuration

  1. Add new Avola OAuth configuration. Provide the client id and client secret provided via the Avola Modeler and save.

  2. Make sure no client certificates are send to Avola, by setting the custom runtime setting (https://docs.mendix.com/refguide/custom-settings/#general ) 'NoClientCertificateUsages'. The value should be the values of the AvolaLoginURL and AvolaUrl constants, comma seperated and without https://.

    Example: login.avo.la,bizzomate.api.execution.test.avo.la
    This setting is neccesary because, by default, Mendix sends out all configured client certificates along with any request. However, we do not use a client certificate for Avola. So if you have client certificates configured for any other services, these client certificates are send along with the Avola request. Since they are not valid Avola certificates, we would get a 403: Forbidden response from Avola (even if our client id & secret is correct). By setting the 'NoClientCertificateUsages' setting, we make sure no client certificates are send along with the request to Avola.Technically, this setting is only neccesary when you actually have client certificates configured, but it is also recommended to configure when you don't have any client certificates configured. That way, you can be sure the Avola connection keeps working, even if someone would add client certificates to your project in the future.

How to implement decision Service execution?

The folder _UseThis contains an folder API which has helpers microflows.

  1. Create an execution request using 'ExecutionRequest_Create'

  2. Add data for each input data and meta data synchronised for a version using 'ExecutionRequest_AddData'

  3. Call the Avola Decision engine for executing the request using

    1. 'ExecutionRequest_CallWrapper'. This will return the complete execution result object

    2. 'ExecutionRequest_CallWrapper_GetFinalConclusion'. This will return the final conclusion object.