This function package enables you to coerce data from one type to another.
Valid data types in Flogo include:
Type |
Description |
any |
Any data type. |
string |
A string |
int |
A standard int |
int32 |
A 32 bit integer |
int64 |
A 64 bit integer |
float32 |
A 32 bit float |
float64 |
A 64 bit float |
bool |
A boolean (true |
object |
A flogo object. Essentially a JOSN object |
bytes |
A byte data type |
params |
Parameters data type |
array |
An array type |
map |
A map |
Used to convert a value to a specified type.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
type |
string |
The data type to coerce to. |
Arg |
Type |
Description |
returnType |
any |
The coerced value |
Convert the spcified value to a string.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
string |
The coerced string value |
Convert the specified value to an int.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
int |
The coerced int value |
Convert the specified value to an int32.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
int32 |
The coerced int32 value |
Convert the specified value to a int64.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
int64 |
The coerced int64 value |
Convert the specified value to a float32.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
float32 |
The coerced int32 value |
Convert the specified value to a float64.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
float64 |
The coerced float64 value |
Convert the specified value to a boolean.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
bool |
The coerced bool value |
Convert the specified value to bytes.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
byte |
The coerced byte value |
Convert the specified value to params type.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
params |
The coerced params value |
Convert the specified value to an object type.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
object |
The coerced object |
Convert the specified value to an array.
Arg |
Type |
Description |
value |
any |
The value to be coerced. |
Arg |
Type |
Description |
returnType |
array |
The coerced array |