Using Expressions
You can use two categories of expressions in TIBCO Cloud Integration- Flogo (PAYG).
Base Expression
Base expressions are assembled as follows: primitive data type + function + expression
Here are some examples of basic expressions:
string.concat("Rest Invoke response status code:",$activity[InvokeRESTService].statusCode)
string.length($activity[InvokeRESTService].responseBody.data) >=7
$activity[InvokeRESTService].statusCode == 200 && $activity[InvokeRESTService].responseBody.data == "Success"
Ternary Expression
Ternary expressions are assembled as follows: base expression ? base expression : base expression
Here is an example of basic ternary expression:
$activity[InvokeRESTService].statusCode == 200 ? "Response successfully":"Response failed, status code not 200"
Here is an example of a nested ternary expression:
$activity[InvokeRESTService].statusCode == 200 ? $activity[InvokeRESTService].responseBody.data == "Success" ? "Response with correct data" : "Status ok but data unexpected" : "Response failed, status code not 200"
Related tasks
Copyright © Cloud Software Group, Inc. All rights reserved.