Update Workflow Block

Oomnitza's Update Workflow block allows objects in Oomnitza to be automatically updated or cleaned up when changes occur within Oomnitza.

mceclip0.png

To use this block, you select "add field", then specify the field you wish to update and whether you'd like to clean up or update that field. Then, specify how you'd like to modify that field. Depending on the type of field selected you'll be given appropriate options:

  • String fields like Short Text or Long Text will allow you to hardcode the new string as well as reference other fields or enter string functions including string concatenations.
    • In case you want the new value to be hardcoded, simply enter the new value as a string
    • When refering to a different field you need to add the technical fieldname of that field within {{}}, like using {{barcode}} to refer to the Asset Tag of an Asset.
    • To use the string functions or string concatenations, you can include string operations within the double curly brackets. Examples for this are:
      • {{serial_numer + "-" + asset_tag}}
      • {{serial_numer.lower()}} # using the python lower() method for str type variables
      • {{full_name.split() | first | capitalize}} # combine the Python syntax and Jinja filters to return the first letter of the full name in upper case
      • {% if full_name.lower().startswith('m') %}STARTS WITH M!{% else %}NO IT DOESNT{% endif %} will return the string "STARTS WITH M!" in case the full name start with the letter m and will return the string "NO IT DOESNT" otherwise
      • You can also refer to Global Settings attributes by using this syntax: {{GlobalSetting['email.sender']}} which will reference the Gloabal Setting variable called email.sender
      • concatenations of functions is possible as long as you stay within a single line
      • all common string methods available within Python are supported, see a complete list here: https://docs.python.org/3.6/library/stdtypes.html?highlight=str#string-methods  
  • String fields that are dropdowns will allow you to select the new value from a drop down.
  • Checkbox fields will allow you to update the value to Yes or No.
  • Date fields will allow a variety of functions, including hard-coding a date or dynamically calculating a date based on other dates and date functions.

Additionally, User List fields have special properties that allow you to reference attributes of the associated user.

  • {{assigned_to.username}} returns the username of the assigned user.
  • {{assigned_to.email}} returns the email of the assigned user.
  • {{assigned_to.full_name}} returns the assigned user's full name.
  • {{assigned_to.<external_id>}} additionally, entering the external ID of any field from that user will pull that attribute cross-modually.

This applies to any User fields that may exist on a Asset or Users, such as changed_by, created_by, manager, etc.

Note: In order to avoid endless loops, the Update block will not trigger additional workflows.

Error Handling

The Update Workflow Block also allows for separate decision making if an error occurs, allowing you to notify admins if anything goes wrong. To add an error path, attach the red [x] spline of your workflow block to a notification block, and direct that block to message an admin. mceclip0.png

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk