Workflow Form Instance Renaming

In our March 14th blog we added a “lastName” variable to our “TestFormDef” workflow definition and mapped the value from the “txtLastName” form field to our new workflow process variable. Today let’s rename the Form Instance using the value stored in the “lastName” workflow process variable.

Open the existing “TestFormDef” workflow definition in the designer for editing. Drag and drop a renameforminstance step into the designer and connect the last step (getFormFieldValues) to the new step as shown in the graphic below.

Form Instance Test Form DefinitionAs a reminder, the start step of our workflow definition currently holds two process variables, “formID1 and “lastName”, and our instantiateform step maps the form instance id to the “formID1” variable.

Form Instance Form VariableClick on the new renameforminstance step to configure its properties. Enter “variable:formID1” in the “Variable to hold the form instance ID:” field and “variable.lastName” in the “name for the form” field.

Form Instance Variable FormSave the changes to the step and the workflow definition.

Now let’s re-execute our “TestFormInst” workflow instance to view the change to the Form Instance name.

Form Instance Test Form InstanceThe routeform step of the workflow instance will create a task with a new form instance for us to fill out. For this example, we will enter “Simpson” in the txtLastName field and complete the task.

Form Instance Route Form

After completing the task, the getformfieldvalues step will map “Simpson” from the txtLastName form field to the variable:lastName process variable. Then our new renameforminstance step will rename the form instance using the “Simpson” value in variable:lastName.

Back on the cDevWorkflow “Instances” tab, we can select and render our latest “TestFormInst” workflow instance to view its execution.

Form Instance Test FormFrom here, clicking on the instance “Forms” button displays a list of the workflow’s form instances. That list should contain a Form Instance called “Simpson”.

Form Instance View ListYou can click on the “Simpson” instance link to view the form instance content.

Form Instance ListSetting Form field values using a Workflow step

Open the Workflow Definition within the designer and drag the “setformfieldvalues” step from the toolbox to the designer. Connect the new step to the last step on the process.

Form Instance Set Form FieldClick on the step and configure the following values for the properties:

Form Instance Set Form Field ValuesLet’s click on the mappings button and set the first name field to a value of “Joel”.

Form Instance MappingSave the step properties and Workflow Definition and let’s re-execute the Workflow Instance. Once the Instance executes, open the task and enter a value of “Bill” for the first name.

Form Instance ExecutesSubmit the task and navigate to the Form Instances page within the Configuration Manager. Select the Form Instance “Simpson” and render the form, you should see the value “Joel” within the first name field.

Form Instance Configuration Manager

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.

Learn more about our Process Automation & IT, QA Services or Software Development products and solutions on the Web!  Visit us at: Innovative Process Solutions