ExecuteWorkflow Widget

Use this widget to execute a process instance and fetch result as return values.

Last published at: June 4th, 2024

Description:

Executes a selected process definition (in real-time mode and background mode) and returns the result from the process definition to the mapped fields before configuration.

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  
  • 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 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 new definition of the form called “TrainingInviteForm.”
  • Select the Open Designer checkbox and click the “Create” button
  • Drag a “bootstrap grid” to the canvas. Add multiple rows to match the training invitation form graphic displayed below
  • Drag Label, Textbox, Save button, Submit button, Execute Workflow button, and iFrame widgets to the canvas and arrange them to match the training invitation form graphic displayed below

 

  • Edit Textbox properties and label the names to something appropriate and easy to identify
  • Create a new process definition called “TrainingInviteWorkflow” in a new tab
  • Drag the WordDocGenerator and Send Email step to Canvas and connect them as shown in the graphic below

 

  • Click on Action - Define Variables and create the following process variables

 

  • Select the WordDocGenerator step and configure the properties as shown in the graphic below. Click the icon to upload the Report Template (*.docx) from your local folder. Select the same template document from the dropdown and confirm the changes with the SAVE button. 

 

  • Select the SendEmail step and configure the “Settings” properties as shown in the graphic below

 

  • Select the SendEmail step and configure the “Advanced” properties as shown in the graphic below

 

  • Configure the "Body of the email message" to display an invite like the graphic below

 

  • Save the process definition “TrainingInviteWorkflow” to confirm the changes
  • Navigate back to the form definition page “TrainingInviteForm.” 
  • Drag an ExecuteWorkflow widget to the canvas
  • Double-click on the widget to configure the inputs as shown in the below graphic

 

  • Double-click on the widget to configure the output mapping as shown in the below graphic

 

  • Select any existing workflow definition using the drop-down
  • Identify the input variables and globals required in the workflow definition  
  • Identify the output variables and globals to hold the result in the workflow definition
  • Click on the Save button and Close the popup window
  • Generate a new Form Instance. Navigate to the Actions menu and Edit the form instance. The rendered widget will appear as shown in the below graphic.

 

  • On Click, the "Execute Workflow" widget shall create a new instance in the background and execute the workflow based on the configuration. Navigate to the Form Instance page to view the new workflow instance created and render the instance for viewing.