Flow Builder
Last updated
Last updated
The Flow construct in ProcessMIX is a diagram that describes the logic of a workflow process. It contains a collection of individual steps and controls the order in which they must be executed. Flow steps are depicted using nodes.
The flow editor panel consists of several parts: Advanced Diagram Editor (ADE), flow settings, and node settings.
Flow settings are used to set up flows, and edit their properties. There are common settings for a flow, including initialize variables, channel, description, and local variables. Other settings depend on the selected channel. For example, the REST channel includes the HTTP Method, Binding URL, Path, Request parameters, and both HTTP Request and Response. The SOAP channel features the SOAP Request and Response. The Scheduled channel provides settings based on how your project runs. The Subflow channel provides settings for input and output parameters. Further details on these settings can be found in the sections below.
Node settings are used to control a specific node in the flow: edit its basic parameters, such as name, as well as parameters specific to the node's type, such as assigning value to the input/output/local variable, choosing an asset to work with, and its parameters, functions to execute, and so on.
Node settings panel becomes available when clicking on the node.
Advanced Diagram Editor (ADE) is used to build a flow from the provided nodes.
For additional information, you can watch a video tutorial: How to create a simple flow
After the project has been created and you have started working on it, you will be redirected to the project's Integrated Development Environment (IDE), where you can develop its components.
When you start a project, you can create your first flow in several ways:
Option #1: create a flow by clicking on New Flow link in the center of the IDE.
Option #3: go to Flows on the Project Explorer panel — left panel. Make sure you are in the Flows section. Click the right mouse button to open the context menu on the Explorer panel. Select the New Flow command. In the pop-up window, enter the flow name and click on the CREATE button.
The Flow name should be longer than 1 symbol and shorter than 100, it can contain letters (Latin a-z A-Z), numbers 0-9, $, and an underscore. It should begin only with a letter or an underscore character.
Every flow is made up from a set of nodes. A flow node is the basic unit of work on the platform, through which information is processed and tasks are carried out.
The platform offers different types of nodes, each responsible for a particular type of information processing logic. By combining them, you can implement business solutions of any complexity.
First, you need to configure the settings flow, which is available in the right panel of the builder.
Some settings are common for all channels, while others are specific to each type.
Let’s look at the common settings:
Initialize variables. This attribute declares the way the output and local variables will be initialized. Let’s see an example: The checkbox is unchecked: Output and local variables are all equal to NULL. Use the "initialize" or "initializeDeep" functions to initialize output or local variables. The checkbox is checked: Output and local variables are initialized with default values.
Channel. Define the channel you need. A Flow can be used as a subflow, REST, scheduled, or SOAP. When deciding on a channel, consider how you plan to use the flow: – Use Subflow to create internal flow. Subflows can be used either independently or as a subflow within another flow, using the Subflow node. – To generate and use a REST API in the flow, utilize REST. – To generate a SOAP API and use it in the flow, utilize SOAP. – Scheduled. This type of channel is used to perform flows on a schedule.
Description. Description (optional) will help you to understand the purpose and function of the process.
Local variables. Local variables are used for mapping source elements, mapping functions, or constants to a specific target element. They are declared and used only for the specific target element or attribute for which they are declared. Rename the variable as needed.
The Local variable’s name should be longer than 1 symbol and shorter than 255. It can contain letters (Latin a-z A-Z), numbers 0-9, $, and an underscore. Beginning from a letter. The name of the local variable must be unique within the flow.
You can quickly pick a simple variable's type by selecting from a list of readily available options:
Boolean — value “true” or “false”
String — text, for example, “Peter Peterson”
Integer — whole number, for example, “22”
Float — real number that can contain both integer and fractional part, for example, “0.1234”
Date — specify the date value in the format yyyy-mm-dd, for example ‘’1993-05-31’’
To use less frequently used data types or your own custom data structures, click on the variable type field and select See All. You can then select the desired structure by navigating through the complete type selector tree.
Other flow settings will vary depending on the type of channel selected.
Channel settings
Channel settings include the HTTP Method and Binding URL.
HTTP Method
Select the desired method from the list of available Methods.
Available HTTP Methods:
POST:
The HTTP POST method sends data to the server.
It contains Path parameters, Request parameters, HTTP Request, and HTTP Response.
GET (default):
The HTTP GET method requests a representation of the specified resource. Requests using GET should only be used to request data (they shouldn’t include data).
It contains Path parameters, Request parameters, HTTP Request (Empty request — always), and HTTP Response.
DELETE:
The HTTP DELETE request method deletes the specified resource.
It contains Path parameters, Request parameters, HTTP Request, and HTTP Response.
PATCH:
The HTTP PATCH request method applies partial modifications to a resource.
It contains Path parameters, Request parameters, HTTP Request, and HTTP Response.
PUT:
The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
It contains Path parameters, Request parameters, HTTP Request, and HTTP Response.
Binding URL
A REST binding URL is a web address that identifies an endpoint. Flows are uniquely identified by their URLs. These URLs typically consist of a base URL followed by a path that identifies the specific endpoint.
If necessary, the URL can be supplemented with path and request parameters.
A path parameter is a placeholder in a URL path that is used to match a value in the request. Path parameters are typically used to identify a specific resource in the URL.
For example:
The URL can include:/users/123. The 123 parameter is a path parameter.
A request parameter is a value that is included in the request string of a URL. Request parameters are added to the end of the URL after a ? character, and multiple request parameters are separated by & characters.
For example:
The URL can include:/search?q=java&page=1. The q and page parameters are request parameters.
Binding URL has a default state: /+{flow name}. For example: /flow. Available for editing.
Adjust the URL to correspond with the particular request.
For example:
Path parameters should be in curly brackets “{}”. For example: /{companyId}
Request parameters should be added after “?“ also in curly brackets “{}”. For example: /api/v1/customers?search={search}
The maximum length of a URL should not exceed 2048 characters.
Each URL should be distinct and not duplicated in the Project.
The URL path parameters must match the parameters in the Path parameters block, and the request parameters in the URL must match the Request parameters.
If you enter parameters correctly in the URL, they will appear as path or request parameters in the corresponding fields when you move away from the Binding URL field.
To obtain a complete URL, please refer to the Swagger documentation section.
Path parameters
Path parameters are variable parts of a URL path. They are typically used to point to a specific resource within a collection, such as a user identified by ID. A URL can have several path parameters, each denoted with curly braces { }.
Each path parameter that is added in the URL binding as a path parameter is displayed in this field.
Add the Path parameters and select their type, if needed.
If you add a new parameter manually, you should also add it as a path parameter to the Binding URL field.
If there is a mistake, the error indicator will be displayed, the field borders will be highlighted in red. When the error is fixed, the red highlight disappears.
Request parameters
Request parameters are the most common type of parameters. They should be placed at the end of the request URL after a question mark (?), with different key-value pairs separated by ampersands (&). Request parameters are optional.
Each path parameter that is added in the URL binding as a request parameter is displayed in the Requests parameters section.
If you enter a new parameter manually, you should also add it as a request parameter to the Binding URL field.
If there is a mistake, the error indicator will be displayed, the field borders will be highlighted in red.
Here are some tips for using path and request parameters:
Any required or mandatory attributes should be added as path parameters
Any optional attributes should be added as request parameters
Parameters used for filtering data are usually used as request parameters
HTTP Request
Indicate HTTP Request structure if needed.
Request bodies are typically used with “create” and “update” operations (POST, PUT, PATCH).
For example:
When creating a resource using POST or PUT, the request body usually contains the representation of the resource to be created.
GET method has an empty request.
You can change the properties type by selecting from the list of possible options:
String
Boolean
Integer
Float
Date
To select another structure, click the request body type field and select See All. You can select the desired structure by accessing the displayed structure selector.
HTTP Response
All API operations responses need to be specified. Each operation must have at least one response defined. A response is defined by its HTTP status code and the data returned in the response body and/or headers.
By default, the response body is specified as a String, but you can edit it if needed.
You can change the properties type by selecting from the list of possible options:
String
Boolean
Integer
Float
Date
To select another structure, click the response body type field and select See All. You can select the desired structure by accessing the displayed structure selector.
Additional operations with Path and Request parameters
By clicking the right mouse button on the parameter, a context menu opens through which several operations are available.
Add — allows you to add parameters with a default value.
Clone — allows you to create a clone parameter. The cloned parameter will have the same name as the Name of the parent parameter + Clone(n) and the same type.
Delete — allows you to delete the parameter.
How to Decide Which REST Channel Settings to Use
Here are some examples of how to adjust your REST channel settings:
If you require information on “id”, you can easily retrieve it by specifying the parameter “id” as an integer in the Path parameter and enclosing it in brackets {id} within the URL before the “?” sign. When using the method, the value of “id” will be automatically inserted into the URL when executing the method. In this case, the following settings should be set:
HTTP Method: GET
Binding URL: /api/v1/customers/{id}/data
Path parameters: id
Request Parameters: –
For example:
The table provides additional examples of how to fill out the settings.
Number
HTTP Method
Binding URL
Path Parameters
Request Parameters
1
GET
/api/v1/customers/{id}/data
id
–
2
GET
/api/v1/customers?search={search}
–
search
3
PUT
/api/v1/customers/{userId}/{customerId}
userId
customerId
–
4
POST
/api/v1/company_resources
–
After finishing the project, you can deploy it, and then export Swagger documentation. The REST channel settings are included in the documentation.
In this way, you will get the full list of endpoints and all information about its components. Full REST API URL can also be seen in the Swagger document.
There are two ways to get a complete REST URL:
The Base URL is located at the top of the document. To get a complete REST API URL add the transfer protocol before the base URL and the path for your method after.
For example:
Base URL: gateway.cloud.platform.com/deployment-phklyw95/
Path to the right of the HTTP method (Binding URL in the app): /api/v1/changeOrders
Complete REST URL: https://gateway.cloud.platform.com/deployment-phklyw95/api/v1/changeOrder
To “Call” the method click TRY IT OUT, then EXECUTE. You can see the method’s URL in the Request URL field.
The flow can be started by “calling” the REST API by external users after the project has been successfully deployed.
SOAP Request
The body contains mandatory information intended for the ultimate receiver of the message.
Indicate Request body structure if needed.
You can change the parameter type by selecting from the list of possible options:
Boolean — value “true” or “false”
String (default) — text, for example, “Peter Peterson”
Integer — number, for example, “22”
Float — floating-point or decimal number, for example, “0.1234”
Data — specify the date value in the format format yyyy-mm-dd, for example ‘’1993-05-31’’
To select another structure, click the request body type field and select See All. You can select the desired structure by accessing the displayed structure selector.
For SOAP flow input data in XML format, data located inside tags <data> </data>, should be wrapped in <![CDATA[…]]> tag.
CDATA Start section − CDATA begins with the nine-character delimiter <![CDATA[
CDATA End section − CDATA section ends with ]]> delimiter.
CData section − Characters between these two enclosures are interpreted as characters, and not as markup. This section may contain markup characters (<, >, and &), but they are ignored by the XML processor.
SOAP Response
By default the response body is specified as a String, but you can edit it if needed.
You can change the parameter type by selecting from the list of possible options:
Boolean – value “true” or “false”
String (default) – text, for example, “Peter Peterson”
Integer – number, for example, “22”
Float – floating-point or decimal number, for example, “0.1234”
Data – specify the date value in the format format yyyy-mm-dd, for example ‘’1993-05-31’’
To select another structure, click the response body type field and select See All. You can select the desired structure by accessing the displayed structure selector.
After finishing the project, you can deploy it. Then, export it in WSDL. The SOAP channel settings are included in WSDL.
You can see all the necessary information on created requests and use the WSDL file for further integration.
The flow can be started by “calling” the SOAP API by external users after the project has been successfully deployed.
Scheduled
The flow frequency of execution is customized according to your need using the cron component. Such types of flow have no input or output.
A cron expression is a string of five to six blocks of values separated by whitespace, which represents a set of times or dates when a job or task should be executed, eliminating the need for an external “call”. Each value represents a specific unit of time, such as minutes, hours, days, and so on. The Crown Expression Generator helps to generate a crown expression from selected data.
To open the Cron Expression Generator, click the "Schedule" input field.
The flow runs itself with the time-frequency specified with the "Schedule" field.
The subflow channel has input and output data. The flow runs when input data is received. This channel cannot be “called” from an external way such as REST or SOAP.
The subflow channel has the following additional settings:
Inputs parameter. Provide the necessary input parameters and their corresponding types required for the flow operation. This is the information the flow will take as input after the application is generated. Rename the input parameter as needed.
The input parameter’s name should be longer than 1 symbol and shorter than 255. It can contain letters (Latin a-z A-Z), numbers 0-9, $, and an underscore. Beginning from a letter character. The name of the input parameter must be unique within the flow.
You can change the variable type by selecting from the list of possible options:
Boolean
String
Integer
Float
Date
To select another structure, click the variable type field and select See All. You can select the desired structure by accessing the displayed structure selector.
Output parameter. Define the output parameters: this is the type of parameters that will be returned once the Flow has finished executing.
You can change the output type by selecting from the list of possible options:
Boolean
String
Integer
Float
Date
To select another structure, click the output type field and select See All. You can select the desired structure by accessing the displayed structure selector.
Select input parameters or local variables on Flow settings. By clicking the right mouse button, a context menu opens through which operations are available.
Let’s see what operations are possible here:
Add — allows you to add a new parameter or local variables.
Clone — allows you to create a clone of the parameter or local variables. The cloned parameter will have a name as the Name of the parent parameter or local variables + Clone(n).
Rename — allows you to rename the parameter or local variables.
Delete — allows you to delete the parameter or local variables.
Selection of a data type of the parameters or local variables — allows you to change the type of the parameter or local variables.
After creation, each flow contains 2 nodes:
IN — start point of flow,
OUT — endpoint of flow
The node panel is a vertical panel, located on the left, from where you can add new nodes to the diagram.
You can read which nodes are provided in the application in the corresponding section. The order of nodes and their number in one flow are not limited, so you can create processes of any complexity. A separate flow can be connected by a subflow node. The order of operations execution in a flow is determined by the order of nodes.
As new nodes are added to the flow, each next node gets access to the structures generated as a result of the work of the previous node.
The following operations can be performed over the flow nodes:
Add nodes.
Click on the required node on the vertical panel and drag it to the workspace. Place the node on the desired connection arrow or empty workspace.
Click on the arrow connecting nodes, then click on the emerged “plus” and select a desired node on the node panel. It will be added into the flow instead of “plus”.
Move nodes. Click on the required node on the ADE and drag it to the workspace.
Connect nodes. Click on the connector arrows present in most nodes. When a node is placed on a connector arrow that connects other nodes, the arrow interrupts, and the chain of nodes accepts the moved node if it has no connections with other nodes. All nodes except IN and OUT should have an incoming connection, and all nodes, except OUT, should have an outgoing connection.
Increase/decrease node scale. Scroll the mouse wheel.
Select node on ADE. By clicking the right mouse button, a context menu opens through which operations are available.
Extract Flow — allows you to create a new flow by extracting a selected node, which then becomes a Subflow node in the flow you are working on. The newly created flow will include extracted nodes.
Clone — allows you to create a clone of the node. The cloned node will have a name as the Name of the parent node + Clone(n).
Cut — allows you to cut nodes for transfer later.
Copy — allows you to copy the node for transfer later.
Paste — allows you to paste the node. It is not available unless you have previously used the Copy or Cut options.
Delete — allows you to delete the node.
Add Breakpoint – allows you to check the received values in a certain place in the flow during the debugging process.
Remove Breakpoint – allows you to remove Breakpoint from the node. It is not available unless you have previously added Breakpoints to your flow.
Switch Connections (for “If “node only) – allows you to switch Yes and No connections. This function is not available for the group of nodes.
You can do the same operation with the group of nodes. To select the necessary nodes, press Alt (Windows) or Option (Mac) and select the area of nodes, then click the right mouse button to open the context menu.
Select Flow in the left-hand panel of the project explorer. By clicking the right mouse button, a context menu opens through which operations are available.
Let’s see what commands are available in it:
Edit or double click on the name of the flow — allows you to open the Flow Builder with the properties of the flow. The flow will open in a new tab.
Copy — allows you to copy the flow for transfer it later.
Clone — allows you to create a clone of the flow. The cloned flow will have a name as the Name of the parent flow + Clone(n).
Cut — allows you to cut flow for transfer later.
Paste — allows you to paste flow. Is not available unless you have previously used the Copy or Cut options.
Rename — allows you to rename the flow.
Delete — allows you to delete the flow.
ctrl+q = move to the previously opened tab
ctrl+e = close current tab
The table contains possible shortcut actions with project elements.
N
Element
Actions
1
folder
copy, clone, cut, paste, rename, delete
2
flow
edit, copy, clone, cut, paste, rename, delete
3
flow node (ADE)
clone, cut, copy, delete
4
flow input/local variable/request parameters (rest flow)/path parameters (rest flow)
clone, delete
On a Windows platform, the keyboard shortcuts are:
Edit = enter
Copy = ctrl+c
Paste = ctrl+v
Cut = ctrl+x
Rename = ctr+r
Clone = ctrl+d
Delete = backspace
One a Mac platform, the keyboard shortcuts are:
Edit = enter
Copy =command
Paste = command-v
Cut = command-x
Rename = command-r
Clone = command-d
Delete =delete
Option #2: open the Flows section in the left-side panel of the project explorer. Optionally, create or open a folder where you want to add your flow. Now create a flow by clicking on the New Flow button located at the top of the panel. In the pop-up window, enter the flow name and click on the CREATE button.