ProcessMIX User Guide
Categories

Flows builder

Updated on September 28, 2023
Print

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

How to create the first 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.

Note:

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.

How to work with Flow?

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.

How to use Flow settings to build flow?

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:

  1. 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.
  2. 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.
  3. Description. Description (optional) will help you to understand the purpose and function of the process.
  4. 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.
Note:

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:

  • Boolean — value “true” or “false”
  • String — text, for example, “Peter Peterson”
  • Integer — number, for example, “22”
  • Float — floating-point or decimal number, for example, “0.1234”
  • Date — specify the date value in the format yyyy-mm-dd, for example ‘’1993-05-31’’

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.

How to set up REST flow settings?

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:
  1. Path parameters should be in curly brackets “{}”. For example: /{companyId}
  2. Request parameters should be added after “?“ also in curly brackets “{}”. For example: /api/v1/customers?search={search}
Note:
  1. The maximum length of a URL should not exceed 2048 characters.
  2. Each URL should be distinct and not duplicated in the Project.
  3. 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.

Note:

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.

Note:

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.

Note:

Here are some tips for using path and request parameters:

  1. Any required or mandatory attributes should be added as path parameters
  2. Any optional attributes should be added as request parameters
  3. 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.

Note:

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.

  1. Add — allows you to add parameters with a default value.
  2. 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.
  3. Delete — allows you to delete the parameter.

How to fill in the REST channel settings

For example:

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  

 

Swagger Documentation for Your Deployed Project’s REST API

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:

  1. 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:
  1. Base URL: gateway.cloud.processmix.com/deployment-phklyw95/
  2. Path to the right of the HTTP method (Binding URL in the app): /api/v1/changeOrders
  3. Complete REST URL: https://gateway.cloud.processmix.com/deployment-phklyw95/api/v1/changeOrder
  1. To “Call” the method click TRY IT OUT, then EXECUTE. You can see the method’s URL in the Request URL field.
Note:

The flow can be started by “calling” the REST API by external users after the project has been successfully deployed.

How to set up SOAP flow settings?

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.

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.

WSDL for Your Deployed Project’s SOAP API

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.

Note:

The flow can be started by “calling” the SOAP API by external users after the project has been successfully deployed.

How to set up Scheduled flow settings?

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.

Note:

The flow runs itself with the time-frequency specified with the ‘Schedule’ field.

How to set up Subflow flow settings?

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:

  1. Input 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.
Note:

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.

  1. 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.

Operations with input parameters and local variables

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:

  1. Add — allows you to add a new parameter or local variables.
  2. 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).
  3. Rename — allows you to rename the parameter or local variables.
  4. Delete — allows you to delete the parameter or local variables.
  5. Selection of a data type of the parameters or local variables — allows you to change the type of the parameter or local variables.

How to build a Flow and work with nodes?

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.

Operations with nodes

Let’s see what operations are possible here:

  1. Add nodes.
  • Click 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 the arrow connecting nodes, then click the emerged “plus” and select a desired node on the node panel. It will be added into the flow instead of “plus”.
  1. Move nodes. Click on the required node on the ADE and drag it to the workspace.
  2. 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.
  3. 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.

  1. 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.
  2. 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).
  3. Cut — allows you to cut nodes for transfer later.
  4. Copy — allows you to copy the node for transfer later.
  5. Paste — allows you to paste the node. It is not available unless you have previously used the Copy or Cut options.
  6. Delete — allows you to delete the node.
  7. Add Breakpoint – allows you to check the received values in a certain place in the flow during the debugging process.
  8. Remove Breakpoint – allows you to remove Breakpoint from the node. It is not available unless you have previously added Breakpoints to your flow.
  9. 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.

Operations with Flow

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:

  1. 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.
  2. Copy — allows you to copy the flow for transfer it later.
  3. 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).
  4. Cut — allows you to cut flow for transfer later.
  5. Paste — allows you to paste flow. Is not available unless you have previously used the Copy or Cut options.
  6. Rename — allows you to rename the flow.
  7. Delete — allows you to delete the flow.

Available shortcuts for Tab

ctrl+q = move to the previously opened tab

ctrl+e = close current tab

Available shortcuts for IDE elements

The table contains possible shortcut actions with elements.

NElementActions
1foldercopy, clone, cut, paste, rename, delete
2flowedit, copy, clone, cut, paste, rename, delete
3flow node (ADE)clone, cut, copy, delete
4flow input/local variable/request parameters (rest flow)/path parameters (rest flow)clone, delete

Let’s see Windows keyboard shortcuts:

  • Edit = enter
  • Copy = ctrl+c
  • Paste = ctrl+v
  • Cut = ctrl+x
  • Rename = ctrl+r
  • Clone = ctrl+d
  • Delete = backspace

Let’s see Mac keyboard shortcuts:

  • Edit = enter
  • Copy =command
  • Paste = command-v
  • Cut = command-x
  • Rename = command-r
  • Clone = command-d
  • Delete =delete