The ProcessMIX Flow component is a workflow process engine. The flow describes the order in which a series of steps must be executed. They are depicted using nodes. It 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 set up a specific node in the flow, edit their properties such as node name, and other specific parameters, such as assigning value to the input/output/local variable, choosing an asset to work with, and its parameters, functions to execute, etc. Node settings are available by clicking on the node.
Advanced Diagram Editor (ADE) is used to build a flow from the provided nodes.
Video tutorial about how the flow works here 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 Integrated Development Environment (IDE). Here you can see the project working environment. Use it to create a model of decision-making and manage your solutions.
When you start a project, you can create your first flow in three ways:
The first way. Create a flow by clicking on New Flow in the central part of IDE.
The second way. Go to Flows on the Project Explorer panel — left panel. Make sure you are in the Flows section. Now create a flow by clicking on the New Flow button on the top of the Explorer panel. To create a flow in a folder, you need to select the desired folder and then click on the New Flow button. In the pop-up window, enter the flow name and click on the CREATE button.
The third way. Go to Flows on the Project Explorer panel — left panel. Make sure you are in the Flows section. Right-click to open the context menu on the Explorer panel. Clicks New Flow. In the pop-up window, enter the flow name and click 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.
Now your first flow has been created.
Every Flow is a set of nodes. A Node is the basic computing element of ProcessMIX, and with its help, information processing is executed.
ProcessMIX has different types of nodes, each responsible for a particular type of information processing logic. By combining nodes, you make processes that handle incoming and outgoing values.
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:
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 change the variable type by selecting from the list of possible options:
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.
Other 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:
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.
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.
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.
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:
HTTP Request
Indicate HTTP Request structure if needed.
Request bodies are typically used with “create” and “update” operations (POST, PUT, PATCH).
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:
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:
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.
How to fill in the REST channel settings
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:
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 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:
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.
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:
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. This 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:
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:
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.
You can change the output type by selecting from the list of possible options:
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:
After creation, each Flow consists of 2 nodes:
IN — start point of flow,
OUT — endpoint of flow
The node panel is a vertical panel, located on the left, where you can add nodes to the ADE.
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.
Let’s see what operations are possible here:
Select node on ADE. By clicking the right mouse button, a context menu opens through which operations are available.
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 on the Project Explorer panel — left end panel. By clicking the right mouse button, a context menu opens through which operations are available.
Let’s see what operations are possible here:
ctrl+q = move to the previously opened tab
ctrl+e = close current tab
The table contains possible shortcut actions with 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 |
Let’s see Windows keyboard shortcuts:
Let’s see Mac keyboard shortcuts: