Working with Data Types
Each process variable has a data type.Β PROCESIO supports the following data types:
- Primitives:Β String,Β Integer,Β Float / Double, Boolean, DateTime, Json, GUο»ΏID, Object.
- Custom:Β Data Model (custom data type with one or more attributes), File.
- Primitive Value (String)
- List of Primitive Values (List<String>)
- ο»ΏData ModelΒ
- List of Data Modelsο»Ώ
File is a Data Model that contains the following attributes:
- path: path to file (set on upload)
- name: name of the file
- mime-type: file type
- size: file size
- hash: file checksum
Use a File variable type as process input to be able to create processes that use dynamic files as attachments in the Send Email action. Or use it as an output variable to map to it a file that you get from the Call API action. Or many others! π
Be mindful of the data type compatibility when passing values from one process variable to the property of an action. Each action property expects a given data type. This means that the variable type must match the expected property type of the action. We refer to this as data mapping.
Don't worry, there are tooltips that tell you what data type is expected in input:
ο»Ώ
Also, each variable will have a color-coded tag to easily map the variable to its data type:
ο»Ώ
The variables used at a process level are called process variables. Each process may have:
- Input process variables
- Output process variables
- Process Variables used within the process
If the process needs certain dynamic data in order to start, you need to configure process variables that have the βInputβ tag enabled. Declare variables as βOutputβ if there is certain data that you expect to get back from the process once the process has been executed successfully.
Β You need to consider the following when mapping input/outputs to process variables:
- PROCESIO does not support mapping data from one type to another thus you need to map data of the same data types. You can always create a new process variable of the corresponding data type if needed.
- Exception: conversion from Integer to Float is allowed, as well as conversion from any primitive data type to String.Β
- Pay attention to the List<> type of a process variable. Even though 2 process variables may have the same data type, you cannot map a process variable declared as a single value to a process variable declared as a list.
Mapping Rules
- ο»ΏString: you can map any type of variable and concatenations. Β
- Exception: A Data Model cannot be mapped to a String property. Mapping of a Data Model attribute to a String property is allowed.
- ο»ΏInteger property: you can map only Integer variables
- ο»ΏFloatο»Ώ property: you can map only Float and Integerο»Ώ
- ο»ΏBoolean property: you can map only Booleanο»Ώ variablesο»Ώ
- ο»ΏDateTime property: you can map only ο»ΏDateTime variables and hard-coded values with the format:
- dd/MM/yyyy hh:mm:ss
- ο»ΏData Model: you can map only a Data Model variable of the same type. e.g. a βCustomerβ property accepts only the βCustomerβ data type as a variable.Β
- ο»ΏFile: you can map only another File.
ο»Ώ