LSPS documentation logo
LSPS Documentation
Form Definition

A form definition holds one form with its constructors, members (local variables and methods), and the tree of form components, such as, layout components, input components, output components, etc.

Important: Chart components are based on Vaadin Charts developed by a third party. Make sure to obtain the Vaadin Chart licenses before you use them. The users of your application and Management Console, do not require any additional licenses.

Creating a Form Definition

To create a form definition file, do the following:

  1. Make sure you have created a project and module.
  2. Remove the ui module from module imports of your module and import the forms module.

    Important: Having both, the ui module and the forms module, imported in your module could cause exceptions on your forms in runtime.

  3. In the GO-BPMN Explorer view, right-click the module.
  4. In the displayed context menu, go to New Form Definition.
    CreatingFormDefinition.png
    Creating a form definition
  5. In the New Form Definition dialog, enter the form name and make sure the Use FormComponent-based UI.
    newFormCheck.png
    Flagging a form definition to create a form based on the forms module

Renaming a Form Definition

To rename a form definition and its form, right-click the Form root node in the Outline view or the file in the GO-BPMN Explorer and click Rename in the context menu.

Note that this will rename all the references to the Form root, the form definition file, the methods file.

renamingFormRoot.png
Renaming Form
Alternative, rename the form definition file.

Previewing a Form

To display preview of your form in your web browser, do the following:

  1. In the GO-BPMN Explorer, right-click the form.
  2. Select Run As -> Form Preview.

A form-preview configuration is created for the preview if it doesn't exist yet. Modify the preview configuration if you need to send input parameters to the form.

FormPreviewConfiguration.png
The form preview called with the argument Hello
When you request a form preview, the LSPS Server to which your Designer is connected, runs a persisted instance of the module with the form: it initializes global variables and form parameters, and creates the form context. Then your system browser with the form preview opens.

To delete the model instances created by form preview, open the Model Instances view of the Management perspective, right-click anywhere into the view and click Remove All Form Preview Model Instances.

Important: Make sure to disable this feature in production environments.