Script Components are predefined scripts written for Script Tasks. All Script Components are found in the component tab in the left panel of the modeller.
Available script components
At the moment there are eight released script components and we are continuously developing more useful scripts to use.
- Set Field Value - Use this script component to write static information or retrieved data within an instance to a form field.
Read more in the article Set Field Value.
- Clear Field Value - Use this script component to automatically clear a Data Object form field from any connected form in your process model.
Read more in the article Clear Field Value.
- Copy all Fields - Use this script component to automatically copy multiple form field values from one or more forms to multiple form fields in any designated form.
Read more in the article Copy all Fields.
- Move to Folder - Use this script component to automatically move a form from the instance root directory or any other created directory to any specified location.
Read more in the article Move to Folder.
- Rename Form - Use this script component to automatically rename a form in your process model either by custom data or data collected from any connected form.
Read more in the article Rename Form.
- Set Instance Name - Use this script component to change the name of the current instance at any point during your workflow.
Read more in the article Set Instance Name.
Unassign Role - Use this script component to clear a selected role of any assigned user or group.
Read more in the article Unassign Role.
Assign Role From Form Field - Automatically assigns an available user in Barium live to a selected role.
Read more in the article Assign Role From Form Field.
- Generate Document from Template - Generates a word document or a PDF file with data from Barium Live form fields based on a .docx template.
Read more in the article Generate Document from Template.
Scripts with reading and writing purposeAll data needed in the script have to be available for the Script Task. Data in Barium Live is either managed in variables or in Data Objects. Variables is always available globally in each instance, therefore you do not need to prepare anything if only variables are handled in the script. If you are using data or fields in Data Objects on the other hand you will need to enable them for the Script Task. If the script will catch data from a Data Object it needs to be put as an input to the task and if the script will write to a Data Object it needs to be put as an output to the task. Read more about input/outputs in the article Add forms to your process.
NOTE: A Script Task can only ever have one data output. If you wish to affect multiple Data Objects, you need to add more Script Tasks.