Tutorial on Decision Providers

Decision Provider lets you integrate the decision models from the decision engine into EFFORT to create automated decision engines. In this tutorial we will discuss one specific example of loan application. We will write the rule to decide whether the user is eligible for loan or not, and how to integrate and execute the things in EFFORT. The below are the various steps involved.

Step 1. Create Decision Model

This section helps you to create decision model in the Business Central.
  1. Log in to Business Central application with your credentials.
    Business Central Login Page
  2. The next thing you’ll see is the Business Central welcome page with the different configuration tools. Click on the Design tool to create a project. Here we are creating a project with the name Loans_Related_Process. If you need more information on how to create a project, refer to Create Project in Business Central.
    Business Central Click Add Asset Button
  3. Now add assets to the project which you created in the above step. We are adding an asset with the name LoanProcess. Refer to Add Assets to Project for information on how to add an asset.
    Business Central Added Asset
  4. Now you'll see the canvas on the right side where you can create decision models. Create a sample decision model that evaluates the loan eligibility based on two inputs such as Loan Amount and Monthly Income.
    Business Central Decision Model Page
    Here the eligibility criteria is defined as shown below. If the loan amount is less than ten times the monthly income, then the user is eligible for a loan.
    Literal Expression For Eligibility
    If the above expression is true, the decision will provide the value Approved. If it is false, the decision will provide the value Rejected.
    Decision Table For Decision
  5. Go back to the projects page. You'll see the DMN file which is created above. Click Deploy button on the top.
    Business Central Click Deploybutton
  6. Click on View deployment details link in the successful message.
    Business Central Click View Deployment
  7. You can see the deployed project details.
    Business Central Deployed Projects Page
  8. Now the decision engine URL is
    https://decisions.spoors.dev/kie-server/services/rest/server/containers/Loans_Related_Process_1.0.0-SNAPSHOT/dmn
  9. Finally, you need to download the DMN file from the Business Central. For more information, refer to Download DMN File from Business Central.

Step 2. Create Decision Provider

This section gives information about how to create Decision Provider in the EFFORT.
  1. Sign-in to your EFFORT account.
  2. Navigate to Configurator > Work Processes > Decision Providers.
  3. Now create a Decision Provider, as shown below. Make sure you have downloaded the DMN file.
    Effort Decision Provider Page
    For more information on how to create a decision provider, refer to Create Decision Providers.

Step 3. Create Work Process

In this section, we are creating a sample work process which involves in loan processing. Find the below steps to create a sample work process.
  1. Go to Work Processes > Action Process > Create Work Process.
  2. Create a work process as shown below. For more information on how to create a work process, refer to Create a Work Process.
    Create Business Work Template
    The below form is configured to the first action.
    Create Loan Details Form
    The below form is configured to the second action.
    Create Eligibility Status Form
    The below form is configured to the third action.
    Create Borrower Details Form
  3. Here the Loan Eligibility action is a decision action where we can get the status of the loan based on the inputs. To configure it as a decision action, select Decision Bot in the Action Type.
    Select Decision Bot
  4. Now Save the work process and click the Manage Flow card to workflow.
    Loan Process Actions

Step 4. Configure Workflow

In this section, we will define the workflow.
  1. Configure the workflow such as Start Action, End Action, and Next Actions as shown below.
    Configure Work Flow
    For more information on how to manage workflow, refer to Workflow.
  2. Click the gear icon under Configure Bot / External Action to configure the decision action. Configure the action as shown below and click Save.
    Decision Action Configuration
  3. Now configure the End Work Rules for the decision action named as Loan Eligibility. Click Define Rule(s) button under End Work Rules against the Loan Eligibility.
    End Work Rules Configuration
    The above criteria is configured to end the work process if the Status is Rejected. If the Status is Approved, then the next action (Borrower Details) will need to be performed.
  4. Save the work flow. Now you can get start with the works.

Step 5. Add Work

In this section, we will perform the actions to show you the work process.
  1. Go to Web App > Work Processes. Now add work for the Loan Process. Fill out the mandatory details and click Save.
    Create Loan Process
  2. Fill the form which is configured to the first action.
    Fill First Action Form
    As shown above, the Loan Amount is less than ten times the Monthly Income. So it must generate Status field value as Approved.
  3. Refresh the page to auto complete the second action.
    Second Action Form Fill
    In the above example, the Status is showing as Approved since it meets the eligibility criteria defined in the decision model.
  4. Now perform third action to complete the work process.
    Performed Actions
    This is how the work process works. This is a sample work process to check the eligibility for loan based on the business rule defined in the decision engine. You can customize the actions and decision models as per your business rules.