Assign Role from form field is a Script Component allowing you to assign a user to a role in your process provided that users email address has been entered into a connected data object form field AND that the selected user is part of a group mapped to the role. This field must be of the type textfield, textarea or single select and only one email address is supported.


This is useful for when you wish to allow the value of a field to dictate what person is assigned to a specific role.



Add the Assign Role From Form Field component to a process

  1. Open the Component section in the left panel of the modeller
     


  2. Drag and drop the component Assign role from form field onto your canvas and attach a data object to it containing a field with an email address corresponding to a user in Barium Live.
    The direction of the dataID should be set to "input".



  3. Open the script task settings and click on Configure scripts to open the configuration view.




  4. Select the role you wish to assign, any roles present in the process will show up in the dropdown list regardless of where you've placed your script component. Furthermore, select which field to collect the email address from for the user you wish to assign.



  5. Click on save.

    Note: If the script will catch data from a Data Object it needs to be put as an input to the task. Read more about input/outputs in the article Add forms to your process.