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, GUID, 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.