Rename Form is a Script Component that automatically renames a form in your process model.
This is useful for when a form might transition from one state to another requiring it to change name.
Add the Rename Form component to a process
- Open the Component section in the left panel of the modeller
- Drag and drop the component Rename Form onto your canvas or onto an already existing script component of any type if you want to stack several scripts in one task.
- Close the configuration window and connect the Script Task to your other symbols as well as to any Form Templates and Data Objects you want to set and get values to and from.
- Open the script task settings and click on Configure scripts to open the configuration view .
- Choose what form you would like to rename by connecting a corresponding Form Template or Data Object to your script task. A drop down list will be shown containing all connected forms available for renaming.
NOTE: The connected Form Templates or Data Objects can be either an input OR an output to the Script Task
- Select where to take the new value from, you have two choices; Data Object or Custom Value:
a) Data Object: Choose the data object and field you wish to collect the new name from in the drop down lists.
b) Custom Value: Here you can write variables or plain text that will be set to the form field.
NOTE: If you want to use a new name from a Data Object, the data object must be connected as an input to the Script Task.
Read more about variables in the article Variables.
- Click on Save.
How to rename multiple forms in the same Script Task
If you want to rename more than one form, make sure those other Form Templates and/or Data Objects are connected to the script task, then drag and drop one or more additional Script Component from the Component Browser onto your existing Script Task and configure your second script component. All added components will be accessible from the left side menu in the Configure Script setting.
NOTE: You can also drag and drop the Script Component onto an already existing Task in your process to transform it to a Script Task with the Script Component set on it. Note however that a script task can only ever be a script task and that any functionality the task originally had will not be available.