Webform Type Task

Last updated on
16 March 2018

The webform type task is used to create and/or route webform content for review or edit. The Drupal 8 version of the Webform module created by Jacob Rockowitz is a very powerful a form builder and submission manager for Drupal 8. Most business workflows involve forms and often start with someone filling out a form. The integration of Webform and Maestro was so important in our opinion that (as of version 21), we have included the integration of a Webform Handler as well as a Webform Type task to allow a seamless integration of forms with Maestro workflows.

There are two options available to integrate a webform into a Maestro workflow. You can launch a workflow from a webform or have a task in the workflow that shows a webform to a user as an interactive task. It's possible and often the case, where you will use both techniques. Launch the workflow from a webform and then have a user assigned to review or edit the webform submission as a task in the workflow.

Launching a workflow from a Webform:

A Maestro workflow can be launched (started) upon completing and submitting a webform using the webform handler that is provided by the maestro webform module. The Webform module allows you to have multiple handlers configured per webform. The Maestro module as of version 2.1 provides a handler that will prompt you to select what workflow to launch.  Form the webform that you want to launch a workflow, look under settings and then under the Emails/Handlers tab. Select the Spawn Maestro Workflow handler and then configure it as shown below. You will be prompted to select from the defined maestro workflows.

As noted for in the documentation for the Content Type task, Maestro tracks the content in the workflow using a unique identifier. In the case of launching a workflow from the webform handler, the unique identifier used is called 'submission'.

Now when the maestro workflow process is started, it will know about the webform submission and subsequent tasks can pull values of the webform to set process variables or pass the webform to user(s) to review or edit.

Using a webform in a workflow

You can have an interactive task assigned to a user(s) in your workflow that will create a new webform submission or review an existing webform submission.

In the Template Builder, add a new task of type Webform Task to your workflow. Once it's added, click on the Edit menu icon on the top left corner of the task. The following image is the edit dialog for setting the Webform Task properties

If this task is configured to use a unique identifier and there is an existing webform submission that is tracked for this workflow process already, then you have the option for the task to present either the edit or view form to the user. Note, user permissions will still apply as a user can not edit a submission they would not normally have permission.

Help improve this page

Page status: No known problems

You can: