Skip to main content

Generative AI assisted modeling

Introduction

One of the most prominent usage of AI can be categorised in the GenAI or Generative AI category. In this section we will explore the generative AI features that are available in Flowable Design starting from ai.ea1+ to create apps and models using prompts. Note that AI services are not well trained in generating Case and Process models, and even less in Flowable Form and Data Dictionary models. Therefore Flowable is using an intermediate and simplified JSON language as output of the AI service based on the input prompts and then the Case, Process, Form and Data Dictionary models are generated from this. This approach greatly improves the quality of the generated output from the AI service, but there remains the dependency on the quality of the prompt text. It can be necessary that models need to adapted and enhanced to have them executed in Flowable Platform to meet the requirements.

There are 2 ways to use generative AI with Flowable, one is to create a complete app with Case, Form and Data Dictionary models. The second way is to generate individual Case, Process, Form and Data Dictionary models.

Generating apps

Let's explore the generation of a complete app by providing a prompt message to the AI service. When clicking the Create button in a workspace in Flowable Design, you can create a new app from scratch or import an app from a zip file. Now a third option has been added to generate an app, using the AI generator option.

AI Modeling Generate App.png

After choosing the AI generator option, a prompt can be provided as input to create the app and its models. Also previous generated apps can be shown, including the model details of the generated app. Let's use a basic prompt to generate an app that can be used for a loan application case. The following prompt is used to generate the loan application case: Generate an example loan application that focuses on several reviews of the loan.

AI Modeling App Prompt.png

After providing the prompt and a generator name, the information can be sent to the AI service with the submit button. Now an overview page is presented that shows the progress in the app generation. It consists of several steps and various AI service calls will be made to generate all the models needed for our loan application case. This includes the generation of a root case model, the data dictionary model and the form models for each human task.

AI Modeling Generate App Progress.png

When the app generation has been completed, a summary view is provided that shows all the generated models.

AI Modeling Generated App.png

For each generated model you can look at a graphical preview of the model (except for the data dictionary model, which uses a JSON view). The graphical preview can be used to validate if the model has been generated in a way that is expected and meets the requirements to a satisfactory level. When the generation did not meet the expectations, you can choose to generate the app again with a changed prompt. But when the generation is meeting the requirements the app can be imported and the models are available in Flowable Design like any other model and can be adapted as needed.

Generating individual models

In addition to generating a complete app, it is also possible to generate individual Case, Process, Form and Data Dictionary Models. This can be done from within an app and then clicking the Create button. From the opened dialog a generate tab is available where in addition to the OpenAPI / Swagger and Salesforce options a AI generator option is available.

AI Modeling Generate Model.png

In the next dialog view the model type can be selected, let's go for a process model type. To stay in the loan application example, we'll use a basic prompt to generate a loan application process model. The following prompt is used: Generate an example loan application process that focuses on several reviews of the loan.

AI Modeling Model Prompt.png

After providing the prompt and a generator name, the information can be sent to the AI service with the submit button. Now an overview page is presented that shows the progress in the model generation.

AI Modeling Generate Model Progress.png

When the model generation has been completed, a summary view is provided that shows the generated model. Note that it's possible to just import the generated model to the current app, but it's also possible to provide additional prompts to improve the process model.

AI Modeling Generated Model.png

In this example we can see that from the third review there are two connected user tasks. This is not considered as a best practice for a BPMN model, so you can try to adapt this by providing an additional prompt.