Description:
The widget executes a chosen process definition in real-time and background modes, then outputs the result to the mapped fields after completion.
Inputs
- ID/Name - Name of widget generated by FlowWright (read-only field)
- Execute Button Text - Enter description for Execute Button Text
- Select Workflow Definition - Select the existing workflow definition
- Select Execute Mode - Select between Realtime or Background
- Save Instance - Select checkbox to save process instance
- Input Mapping (Variables) - Identify input variables required in the workflow
- Input Mapping (Globals) - Identify input globals required in the workflow
- Output Mapping (Variables) - Identify output variables to hold the result in the workflow
- Output Mapping (Globals) - Identify output globals to hold the result in the workflow
- Hide - Select the checkbox to Hide (tick mark)
- Read Only - Select the checkbox to Read-Only (tick mark)
- Tool Tip - Enter information to display on mouse hover on the form render
- Styles - Enter the CSS scripts for widget styles
- Apply Classes - Select between custom classes defined
- Save - Save the input values
- Delete - Remove this form widget from the designer page
- Close - Close the input popup window
Design:

Example:
Let’s build and execute the “TrainingInviteForm” example.
- Create a form definition for the "TrainingInviteForm".
- Place a “BootstrapGrid” on the canvas. Add several rows to replicate the “Training Invitation Form,” as illustrated below.
- Drag a “Label, Textbox, Save, Submit, ExecuteWorkflow, and iFrame” control onto the canvas and arrange them as illustrated below.

- Edit the “Text” widget properties and label the names with something appropriate and easy to identify.
- Create a Process Definition called “TrainingInviteWorkflow”.
- Drag the “WordDocGenerator and Send Email” steps onto the canvas and connect them as illustrated below.

- Click Action > Define Variables, then create the following process variables.

- Select the “WordDocGenerator” step and configure the “Required” properties. Enter a name for the step. Choose the report template. Click the icon to upload the Report Template (*.docx) from your local folder. Enter variable or global references to store the document's physical and virtual paths. Click the Save button.

- Select the “SendEmail” step and set the “Required” properties. Enter a name for the step, then click Save.

- Select the “SendEmail” step and set up the “Optional” properties. Provide a variable or a global reference with external email addresses. Enter the email subject text.

- Click the button to configure the “Body of the email message.” In the message body, include variable or global references for ASPOSE to complete the mail merge. Then click the Save button.

- On the Form definition page for “TrainingInviteForm", double-click the “ExecuteWorkflow” widget to edit its properties.

- A pop-up window appears for configuration. Enter the text for the “Execute Button.” Select the process definition from the drop-down list. Choose the execution mode between “Real-Time” and “Background.” Note: In real-time execution, wait or human interaction steps, such as tasks and route forms, are overridden and completed automatically. Select the “Save” checkbox to store the process instance. Select the “Hide” checkbox to hide this widget at runtime. Select the “Read-Only” checkbox to disable the button click event.

- Select the “Conditions” tab. Click the plus sign (+) to add an empty row. You need to map the input and output variable values. Choose the variable/global reference and map it to the appropriate Form fields as shown below. The Form values are linked to Workflow process variables as input. The Workflow output variable or global values are mapped to the Form fields. Click the Save button.

- Choose the “Styling” tab. Enter the CSS syntax. Select the classes to apply from the global drop-down list. Click the Save button.

- Select the “Other” tab. Enter the tooltip text. Click the Save button.

- Save the “TrainingInviteForm" form definition. Select Actions > Create Form Instance from the menu. Generate a new form instance and check the box to edit it.

- The Form is displayed for the user as shown below. Enter the user input. Click the “Generate Invite” button to start the workflow execution.

- When clicked, the "Execute Workflow" widget creates a new process instance in the background and runs the configured workflow or process. The Form values are sent to the workflow, and the result is received and displayed in the Form fields. Click the Submit button to finish the Form.

- You must navigate to the Form Instance page to view the new Form instance and render it.

- The Form is rendered in read-only mode for the user as shown below.

Definition Sample:
You may download and extract the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after the import. Then, save the definition to confirm the changes.
Click here to download the sample file.