Blog Posts Process Management

Mapping Form Field Values to Workflow Process Variables

Mapping Form Field Values

In our March 2nd blog we used the workflow process to route a form for data entry. Let’s revisit that “TestFormDef” workflow definition and look at mapping a form field value to a workflow process variable.

Open the “TestFormDef” workflow definition in the designer for editing. Drag and drop a “getFormFieldValues” step into the designer and connect the last step (routeform) to the new step. Mapping Test Form Definition

Next, let’s define another workflow process string variable called “lastName”. Select the “start” step and click in the “Variables” link at the bottom of its properties pane. Type “lastName” in the Add Variable field, select “String” for Type, and click the Add button.

Mapping Workflow Process String Variable

Click the Save button to save and close Variables page.

Click on the new “getformfieldvalues” step and configure the following properties:

Mapping Get Form Field Variables

Enter “variable.formID1” for the Variable that holds the form instance ID. In the Select form definition dropdown, select the form definition used in the instantiateform step. Now click the Mapping of fields to variables button:

Mapping Instantiate

Select “txtLastName” in the Form Field dropdown and enter “lastName” in the Variable Name field. Click the Save button on the popup and click the Save button in the step properties pane. When the Workflow Instance executes, the value in the “txtLastName” form field will be written to the process variable “lastName”. Let’s save the Definition and re-execute the Workflow Instance. Mapping Form Field

The rendered view of the task containing the form is shown above. For this example we will select Joe Simpson from the Name Lookup and then complete the task.

Now let’s render the executed process: Mapping Form ExecuteClick on the last step in the process to view the properties:

Mapping Form Field VariablesAs highlighted above, the variable “lastName” now contains the value entered into the “txtLastName” field within the form.

 

You may also be interested in reading more on the subject of Configuring a Custom Workflow Step.

A small sampling of the Workflow Technology for BPM Solutions contained within our cDevWorkflow product offering can be found here: Workflow Technology That Works.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/mapping-form-field-values-to-workflow-process-variables/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×