Set Instance Name is a Script Component allowing you to change the name of an instance at any point during your process.
This is useful for when you wish to change the name of the instance, for example adding a prefix to instances depending on their end state.
Add the Set Instance Name component to a process
Open the Component section in the left panel of the modeller
- Drag and drop the component Set Instance Name onto your canvas.
- Close the configuration window, incorporate the new Script Task to your model and connect any Form Templates and/or Data Objects you might wish to collect the new instance name from.
- Open the script task settings and click on Configure scripts to open the configuration view.
- Select where from to take the value, you have two choices; Data Object or Custom Value:
a) Data Object: Choose the data object and field you wish to collect the value from in the drop down lists.
NOTE: If you use Data Object, the object must be an input to the Script Task. Furthermore, you can only collect field value from a text field. If you want to use for example a number field you must use Custom Value with variables (see below).
b) Custom Value: Here you can write variables or plain text that will be set as the new instance name.
Read more about variables in the article Variables.
- Click on Save.