During the lifespan of Bosbec WE and the Workflow Builder, there have been different iterations of the expression syntax used in the properties fields and resources. While each iteration and implementation of a new syntax was made to solve a shortcoming of the previously existing syntaxes or to make things clearer, this has led to a mix of syntaxes in various jobs, making it unclear which to use. To rectify this, we are currently working on implementing an alternative expression syntax to streamline the building process.
This page explores the two different versions and how to use them. While we are implementing support for the new syntax in most jobs, this is an ongoing process, and some jobs or individual properties may still not support it. However, we suggest using the alt1 syntax as much as possible but falling back on the legacy syntax where the new syntax is not yet supported. This approach will make transitioning to the new syntax easier in the future.
If you are using the alt1 syntax and find a job or properties field that does not yet support it, please let us know through the contact pages or the help center in the admin panel.
Legacy
Legacy is the mixed syntax used in most jobs. If not changed, this is the default for now. The list below provides an example of the different syntaxes in different jobs.
metadata.key
{metadata.key}
{{metadata.key}}
[metadata.key]
[key]
In most cases, these can also be prefixed with a resource name, such as unit_resource.metadata.key or incomingmessage.body. More on this can be found in Working With Variables.
If in doubt, hover the information icon next to most input fields to show a tooltip with a suggestion on how to format the string. If this is missing, please let us know through the same channels stated earlier.
![](https://help.bosbec.com/wp-content/uploads/2024/07/image.png)
Alt1
Alt1 is the main candidate for replacing the legacy syntax, and some of the newer jobs, such as the pipeline jobs, have already had this implemented as default.
Getting data from a key dynamically looks like this:
{{metadata.key}} or {{resource.metadata.key}}
Saving data to a key looks like this:
metadata.key or resource.metadata.key
Using the curly brackets indicates that the workflow should search for a value matching the key and replace the string, and leaving them out will leave the string as is.
Selecting syntax
The first way to change the syntax is to open the trigger’s properties and change the selection in the dropdown menu, as seen below.
![](https://help.bosbec.com/wp-content/uploads/2024/07/image-1.png)
The second way is to replace the custom settings in the workflow context. You can do this by setting the settings.customsettings._expression_syntax to alt1 or an empty value (for legacy syntax).
![](https://help.bosbec.com/wp-content/uploads/2024/07/image-2.png)