Input Dialog Forms

Input dialog form is a form defined in the BPMN process model. When users start processes or open user tasks, input dialogs are automatically rendered based on the configuration you provided in the model. Modifications of its layout and behavior aren’t available.

You can configure an input dialog for the StartEvent of User Task model elements. To create an input dialog form, set form type Input dialog from the pull-down list in the BPMN Inspector panel.

create dialog form

Then additional form properties will appear:

form section

Here you can choose open mode, set parameters, and outcomes.

Open Mode

This property defines a mode how the form will be open:

  • Dialog — means a modal window.

  • Navigate — view will be opened by navigating to its URL (specified in the @Route annotation)

open mode

By default, Dialog mode is used.

Parameters

Actually, parameters are form fields that may show data to the user or expect input from him. You can create parameters from the BPMN Inspector panel:

create parameters

Next, the parameter editor window will open. Here you can select the process variable from the pull-down list or define a new variable by entering its name.

parameter editor begin

The parameter may be editable and required according to checkboxes.

Supported parameter types are:

  • String

  • Multiline string

  • Decimal

  • Number

  • Boolean

  • Date

  • Date with time

  • Entity

  • Entity list

  • File

  • Platform enum

  • Custom enum

For types Entity and Entity list additional properties are available. Here you have to define an entity class from the pull-down list:

parameter editor entity

Then, select a UI component that will be used for the entity. There are two options: ComboBox or EntityPicker

parameter editor entity ui compontent

By default, the EntityPicker option is selected. In this case, you can choose a Lookup screen as well. If you leave it empty, the standard list view for this entity will be used.

When a Combo box is selected, you have to specify a JPQL query, with 'where' and order by clauses if needed. You can write the query manually or use JPQL Wizard.

parameter editor entity combo box

After parameters are created, you can edit them directly in the BPMN Inspector panel.

edit param in panel

After the first parameter is created, a dialog window with a list of parameters appears. You can continue creating parameters here and manage its order.

parameters list

XML Representation

As was said above, the input dialog form is defined directly in the BPMN model. So it is represented in the XML by jmix:formData attribute:

<jmix:formData type="input-dialog" openMode="DIALOG">
  <jmix:formFields>
    <jmix:formField id="order" caption="Order" type="entity" editable="true" required="false">
      <jmix:formFieldProperty name="entityName" value="smpl_Order" />
      <jmix:formFieldProperty name="uiComponent" value="comboBox" />
      <jmix:formFieldProperty name="query" value="select e from smpl_Order e where e.amount &#62; 1000" />
    </jmix:formField>
    <jmix:formField id="name" caption="Name" type="string" editable="true" required="false" />
  </jmix:formFields>

Business Key

When creating an input dialog form for the start event, you can define a business key.

setting business key

It is possible to set a value of business key directly or take it from the process variable.

Outcomes

Outcomes are pre-defined variants of the user task completion, indicating what decision the performer has made.

For example, in a document approval task, the user can approve a document or reject it. Respectively, there should be created two outcomes: “approve” and “reject”.

On the process forms, outcomes represented by named buttons. To complete the task, a user must press one of them.

Whatever outcome button the user chooses, task complete event will be fired, but the standard Complete button wouldn’t be shown if outcomes are defined.

You can create outcomes from the BPMN Inspector panel:

create outcomes

Then, the outcomes editor window will open. Here you can create outcomes and provide them with icons.

outcomes editor

As well, you can edit outcomes directly in the BPMN Inspector panel.

outcomes created

XML Representation

Outcomes in the XML are defined in jmix:formOutcomes section.

  <jmix:formOutcomes>
    <jmix:formOutcome id="approve" caption="Approve" icon="CHECK" />
    <jmix:formOutcome id="reject" caption="Reject" icon="BAN" />
  </jmix:formOutcomes>

Example

Finally, the input dialog form will look like that:

form example

When using entities as form parameters, better use Jmix view forms.