Flows
Last updated
Last updated
A ProcessMIX flow is a graphical diagram (flowchart) made up of interconnected nodes (steps) that contain computer instructions. The nodes are executed in an orderly fashion to run an algorithm, a decision strategy, or a sequence of tasks that achieve a specific goal. It represents a systematic, automated and repeatable process that programmatically performs a well-defined unit of work, typically manipulating data and coordinating people, resources, and information.
A flow definition consists of two parts:
Settings - configuration parameters that are defined for the entire flow;
Flow diagram - the actual implementation, i.e. a visual graph with various types of nodes connected by arrows. Each node will have its own settings and number of incoming/outgoing arrows, in accordance with its nature.
Here are just few examples of business logic that can be implemented with flows:
A record creation service that validates input received from a user, formats and inserts it into a database.
A set of business rules with various checks to automate decision-making strategy.
A state machine implementing a business process that consists of some automated actions, as well as human tasks.
A systems integration process that connects to several external data sources and iterates over the results to produce an aggregated summary.
The flow's top-level settings define how it will be used, what data it will take as inputs, what kind of result it will produce, temporary local variables that it can utilize during the execution, and so on.
Name is an identifier or label assigned to a flow. It has to be unique within a project and must adhere to restrictions listed below.
Input Text
must consist of letters (A-Z or a-z), digits (0-9), underscores (_), or dollar signs ($). However, a name cannot start with a digit or dollar sign ($).
Unique per folder
Mandatory
Min length: 1
Max length: 255
Must not be one of the Reserved words
This parameter controls the way how the output and local variables will be initialized.
Possible values:
True value means that output and local variables are initialized with default values.
False value indicates that output and local variables are null. Use the initialize or initializeDeep functions to manually initialize variables.
The Local Variables section can contain one or more definitions of flow's local variables - i.e. transient internal values that are written and read by the flow itself when it is executed.
This setting determines where and how the flow execution will be triggered. Some flows will be published on a network to become available externally as remote service endpoints. Others will be triggered automatically on a periodic basis. Most flows, however, will serve as internal units of work, invoked from other flows as needed. This allows splitting complex logic into smaller modules that can be easier to understand and reuse.
Possible flow channel choices are described below.
Subflow is a type of internal flow that encapsulates a sequence of activities or tasks called from within another flow. It represents a modular and reusable unit of work that can be invoked and integrated into other flows. Subflows are commonly used to modularize complex logic, promote reusability, and simplify flow design and maintenance.
REST is a type of flow that implements a Representational State Transfer (RESTful) web service endpoint. It defines a set of HTTP methods (GET, POST, PUT, DELETE, etc.) and corresponding request and response mappings to enable communication between client applications and the system. REST flows adhere to REST principles, such as statelessness, uniform interface, and resource-based interactions, and are commonly used for building web APIs and integrating with external systems.
SOAP is a type of flow that implements a Simple Object Access Protocol (SOAP) web service endpoint. It defines a standardized XML-based messaging protocol for exchanging structured information between client applications and the system over the Internet. SOAP flows involve the definition of a WSDL (Web Services Description Language) contract specifying the service interface, operations, message formats, and communication protocols. SOAP flows are widely used for building interoperable and platform-independent web services.
Scheduled is a type of flow that is triggered and executed at predefined intervals or time-based schedules. It allows for the automation of recurring tasks, periodic data processing, and scheduled maintenance activities within the system. Scheduled flows are configured to run at specific times or intervals, such as hourly, daily, weekly, or monthly, and can perform a variety of operations, such as data synchronization, report generation, or system backups, according to the defined schedule.
This attribute provides a textual description or additional information about a flow. Unlike the name property, which serves as a unique identifier or label for the flow, the description property offers supplementary details that help to document the purpose, functionality, or behavior of the flow.
Input Text
Max length: 5000
Inputs - define the data that are provided to the subflow when it is invoked or executed. These properties represent the input values required by the subflow to perform its tasks. Inputs properties may include various data types such as strings, numbers, booleans, objects, arrays, etc.
Output - specify the result generated by the subflow upon completion of its execution. These property represents the output value produced by the subflow, which may be used by other components or nodes within the larger workflow.
HTTP Method - specifies the HTTP method used by the REST flow to handle incoming requests. Common methods include GET, POST, PUT, DELETE, etc.
Binding URL - defines the URL endpoint at which the REST flow is exposed and can be accessed by client applications. It typically consists of the base URL followed by a path that identifies the resource or operation.
input Text
Unique per project in combination with the method property
Mandatory
Min length: 1
Max length: 256
Valid URL
Query parameters - represents data parameters included in the request URL's query string sent to the REST flow. These parameters provide additional information to the flow for processing the request, such as filtering criteria or pagination settings.
Path parameters - refers to dynamic segments of the URL path that are extracted and processed by the REST flow. Path parameters allow for parameterization of the URL and enable routing to different resources or operations based on the provided values.
Parameters types and restrictions:
Unique per flow
must consist of letters (A-Z or a-z), digits (0-9), underscores (_), or dollar signs ($). However, a class name cannot start with a digit and dollar sign ($)
Mandatory
Min length: 1
Max length: 256
HTTP Request - describes the structure and content of the request sent to the REST flow.
HTTP Response - specifies the structure and content of the response generated by the REST flow in response to client requests.
SOAP Request - describes the structure and content of the request sent to the SOAP flow.
SOAP Response - specifies the structure and content of the response generated by the SOAP flow in response to client requests.
Schedule - a cron expression is a string of five to six fields separated by whitespace, which represents a set of times or dates when a job or task should be executed. Each field represents a specific unit of time, such as minutes, hours, days, and so on.
The general format of a cron expression is: * * * * * *
The fields, in order from left to right, represent:
Seconds (0-59)
Minutes (0-59)
Hours (0-23)
Day of the month (1-31)
Month (1-12 or Jan-Dec)
Day of the week (0-6 or Sun-Sat)
Asterisks (`*`) can be used to represent all values within a field, and commas (`,`) can be used to separate multiple values. Hyphens (`-`) can be used to specify a range of values within a field, and forward slashes (`/`) can be used to specify step values.
For example, the following cron expression will execute a task at 12:30 PM every day: 0 30 12 * * ?
And this cron expression will execute a task every 15 minutes: 0 0/15 * * * ?
The flow diagram (graph) is where the implementation of the flow's business logic is done.
Here is an example of such diagram:
There is always one starting point (the "IN" node), but there can be multiple terminating points ("OUT" nodes), with different execution paths in between with action-performing steps, as well as logical condition checks that determine which paths will be taken in a given execution.
Internal flow nodes can be of different types, such as value assignments, condition checks, iterators (loops), integration connectors, decision assets (e.g. decision tables), and so on - everything that a standard business application needs. Condition checks and assignments are described using expressions, which can call functions. In case of some extraordinary situation, a flow can break out of the normal processing sequence by generating an exception.