Using Set Expressions
There are two primary ways of setting a Gloop property's value:
||Demonstrates the use of unevaluated set expressions.|
||Demonstrates how to use import statements in set expressions.|
||Demonstrates how the properties of a model are set via set expressions that query the database.|
||Demonstrates how to set a value of a Gloop model via set expressions.|
Please see the following articles for more information:
examples package that is already installed in your TORO Integrate instance, navigate to
code folder, and look
for a directory called
setExpression. This directory has a
conf folder that has a
startup service and four Gloop services that demonstrate the use of set expressions, shown below:
1 2 3 4 5 6 7 8 9 10 11
examples ├── ... └── code └── ... └── dataTransformation ├── conf │ └── SetExpressionSetup.gloop ├── BasicSetExpression.gloop ├── BCryptHashing.gloop ├── DatabaseLookup.gloop └── GloopModelSetExpression.gloop
Simply open and run these services to inspect their contents and see how they work.
How It Works...
Map lines work best for simple property value mappings. However, for more complex value mappings, set expressions are more ideal. You can use set expressions to assign a default value, or to use Groovy to compute the value for you.