Connecting Bizagi processes to use AI

<< Click to Display Table of Contents >>

Navigation:  Cloud applications > Bizagi Artificial Intelligence >

Connecting Bizagi processes to use AI

Overview

When having published an AI experiment, you may easily configure a Bizagi process to consume its AI predictive analysis services so that whenever inputting initial information for each case, you may obtain a prediction.

This allows you to have your processes use a default or suggested value.

For introductory information on Bizagi Artificial Intelligence, refer to Bizagi Artificial Intelligence.

 

Cloud_AI_overview_connectp

 

This section describes how to set your Bizagi processes to consume the predictive analysis service.

 

Before you continue

Note that these steps part from the fact that you would already have:

 

1.Defined a given process in Bizagi.

No special considerations are needed for such process, and you would implement it just as you would do as with any process in Bizagi.

However, it is expected that such process works with a set of data which matches that same data structure employed by the AI experiment.

For  information on Bizagi basics, about how to implement processes with Bizagi Studio, refer to:

http://help.bizagi.com/bpm-suite/en/index.html?process_wizard.htm.

 

2.Clearly identified at which point during the process, you capture initial information and would like to have Bizagi suggest a prediction to the end user.

 

3.Created and published an AI experiment whose result is satisfactory.

For more information about this step, refer to Working with AI experiments.

 

What you need to do

In order to have your Bizagi process connect to the AI experiment, these steps need to be carried out:

 

1.Download the AI experiment connector.

2.Obtain the service endpoint and its access keys to use the connector.

3.Configure the connector in Bizagi Studio.

 

Example

Assuming we have a Healthcare-centered process in Bizagi which has an activity where patient information is captured (Perform Triage), we will rely on the prediction services to learn if AI suggest that diabetes in that patient is likely.

And therefore have Bizagi automatically suggest that a diabetes test should be conducted when clicking the Get suggested exams... button:

 

Cloud_AI_connectprocess1

 

Business information that is captured during the initial activity and to be sent to the predictive services include: Number of times pregnant, Plasma glucose concentration a 2 hours in an oral glucose tolerance test, Diastolic blood pressure, Triceps skin fold thickness, 2-Hour serum insulin, Body mass index, Diabetes pedigree function, and Age in years.

 

Note that we will display the result in the field called Diabetes test suggested? (a string type field).

 

Procedure

Once you have the AI experiment published, follow these steps:

 

1. Download the AI experiment connector.

Go into the published AI experiment and click on View connectivity info button and then, click the Download Prediction Connector button:

 

Cloud_AI_download

 

Notice that a .bizc connector file is downloaded locally into your machine, and you may choose to rename it afterward:

 

Cloud_AI_conndownload

 

note_pin

If the download does not start automatically, you may need to ensure that pop-ups and downloads are authorized in your browser settings for https://ai.bizagi.com.

 

Cloud_AI_popups

 

2. Obtain the service endpoint and its access keys to use the connector

In order to prepare yourself for next steps regarding that connector's configuration, ensure you copy the service endpoint and access keys as provided in that same connectivity info.

Copy:

Url - [environment]:

Ensure you use the service endpoint of your target environment.

 

Cloud_AI_conn_URL

 

Access key 1 (username) and Access key 2 (password):

You may rely on the Copy button for this.

 

Cloud_AI_conn_keys

 

note_pin

DO NOT use the Generate New Keys option unless you are completely certain of wanting to generate new access keys and eliminating previous ones.

Note that once you eliminate previous ones, you will not be able to look them up,nor use them again, which entails that any connector's configuration or application already using the previous pair of keys would no longer be able to connect to the service endpoint.

 

3. Configure the connector in Bizagi Studio.

The final step is about configuring the use of a Bizagi connector in the relevant point of your process.

Before doing so, note that you need to manually install the connector by uploading the .bizc file (as with any other connector and as described at http://help.bizagi.com/bpm-suite/en/index.html?connectors_setup.htm):

 

Therefore, install the .bizc connector file as downloaded in the first step:

 

Cloud_AI_Bizagi1

 

To first install the connector, set:

Into the Connector parameters, the URL to point to the URL [environment] as copied in the previous step.

Use of Basic authentication and input the copied Access keys 1 and 2, as username and password respectively.

 

Cloud_AI_Bizagi2

 

note_pin

Notice that the configuration for each connector allows you to specify different URLs for the different project environments (Development, testing and production).

 

You should make sure you rely on these settings so that you adequately use the URL of the different experiments or environments (that is, use experiment's URL for testing environment in the Development and Test tab of the connector setting, and use the experiment's URL for production environment in the Production tab of the connector setting).

 

Then and to configure the actual use of the connector, for this example, edit the form of the Perform Triage activity so that its Get suggested exams.. button invokes a connector.

To do so, open the given form and click Actions & Validations and then on Add to create a new action:

 

Cloud_AI_Bizagi3

 

For that new action, specify that whenever the button is clicked, it should:

1. Execute a connector.

2. Refresh that field where we display the result (in this example, called Diabetes possible outcome?).

Click on argument for the Execute a connector action in order to configure the connector's URL, inputs and outputs:

 

Cloud_AI_Bizagi4

 

Set the configuration as shown below:

Using the PredictValue action:

 

Cloud_AI_Bizagi_conn1

 

Mapping the relevant information as inputs to send to the AI service (Number of times pregnant, Plasma glucose concentration a 2 hours in an oral glucose tolerance test, Diastolic blood pressure, Triceps skin fold thickness, 2-Hour serum insulin, Body mass index, Diabetes pedigree function, and Age in years):

 

Cloud_AI_Bizagi_conn2

 

Mapping result into the field of Bizagi 's data model that stores such prediction (Diabetes possible outcome? in our example):

 

Cloud_AI_Bizagi_conn3

 

Click Finish and you are set.

At this point. you may run your process and within each new case,  once initial information is input and the Get suggested exams... button is clicked, then a prediction will be shown:

 

Cloud_AI_final

 

note_pin

The AI service is a RESTful service where not necessarily a single process will be the one consuming it.

You may similarly configure other processes to rely on this service, provided of course that they handle a similar data structure, as well as other applications different from Bizagi.

When having other non-Bizagi applications consume such service, you would use the same access keys, and configure your application to target that same RESTful service URL (the service endpoint).