Меню

MASTER - PROCESSES
Process is an entity in which tasks, conditions, data/message queues and operations can be combined.
In the "Processes" section you can see the list of created processes.
To add a new process, click the [+ Add Process] button.
When you add a new process the "Process Builder" interface will open. There you can specify the process name and create a process diagram from blocks by dragging them from the blocks panel.

In the block panel, the items are grouped by sections: Tasks, Queues, Mail, etc.
An overview of the workspace (canvas):

To add a block to the canvas, drag it with the mouse from the blocks panel.
To configure a block, double-click it to open the settings window.
The Delete button deletes blocks and links.
The canvas can be scaled with the Shift + Mouse Wheel.

You can link the output of a block to one of the inputs of a subsequent block.
The connection with the arrow shows the transfer of control and, sometimes, data flow.
A block may have several inputs. For example, a Task block may have three inputs - left, top, bottom of the block.
Output(s) are located to the right. There are two types of outputs: Output (OK) if the task completes without errors, and Output (Error):
1. Blocks in the "Base" group

1.1 "Task" block

Set a name for a task, select the task from the drop-down list of tasks.
If the Data parameters are configured for the task, they will be displayed in the Parameters section.
Parameters - this setting allows you to override which parameter values will be sent to the robot for execution. The source of parameter values can be data from Master (Data option) or values from a previous blocks (Block).
When a Task timeout is reached:
- the task is stopped with the TimedOut status,
- the red branch is triggered for the task block:

1.2 "Condition" block
This block is responsible for checking if the condition is True or False.
In this block you can select the process path: if all the conditions are fulfilled, the path is True, otherwise the path is False.
In the Condition block properties, you can add conditions with a comparison operation:

= - equal to
!= - not equal to
\> - more than
< - less than
Contains - contains entity
Starts with - starts with entity
End with - ends with entity
The parameters for the conditions are taken from the results of the previous blocks. This can be the result of the task block (the resulting parameter values) or the result of the queue block (the resulting queue element).
1.3 "Parallel Tasks" block
Runs tasks inside a block in parallel.
For the parallel tasks to work correctly, each task must have different agent.
Only blocks that have no links with other blocks can be added to this block. The block is considered finished when all the task blocks inside it are finished.
1.4 "HTTP Request" block
This block is used to retrieve data via an HTTP request.
These fields must be set:
- Request URL
- Request method: select from (Get / Post / Put / Delete)
- Request timeout (in seconds)
- Content type: select from (application/json or application/xml or text/xml)
- Request body
- Parameters of the request. Name and Value must be set for each parameter. Specify whether to get data from the current block (Value type) or from the previous block (Block type).
1.5 "Counter" block
Сounts the number of runs through a process branch.
  • Connection created by the "Create a database connection" activity;
  • Name of the database schema;
  • Name of the table in the database where the data will be put;
  • A data containing table which would be inserted in the database;
  • Clear table - if true, the original table in the database will be deleted;
  • Name of the variable holding modified records is the result of a DataTable save.
1.6 "Counter setting" block
Sets the counter to a certain value (usually to reset it to zero before starting a new cycle/iteration). Here is an example of a process for setting up multiple attempts to execute a Task::

  • If the task resulted in an error (Task block exited through False output) (F), the process executes the counter block (A), which adds +1 to the Counter variable (initial value = 0). After executing the counter the variable is checked by the condition block. This directs the process to execute the task again after waiting (B) If the counter value is reached the process executes the [Task|Change status] block and then [Counter reset] (С).
  • If the task has worked correctly (Task block exited through the True output) (O), the Counter (С) is reset to zero to start a new task cycle with the specified number of attempts.
Note. When setting the [Counter Setting] block (D), you must select for which Counter block you do it (there may be several in the process).

2. "Queue" group blocks
2.1 "Get queue element" block

Waits for the element to appear in the specific queue. If it appears, the block passes the current value of the queue item onward through the process. This value can then be used in a task or condition block.
2.2 "Push queue element" block
Adds an element with (Key - Value) parameters to the specified queue.

You can define optional fields for an element:
- "Priority" ("Low", "Medium", "High"), which matters when processing queue items. The default setting is "Medium" priority.
The time window for processing the data queue element:
- "Postpone date" - do not process until Date-Time.
- "Deadline date" - do not process after Date-Time. If the queue element was not processed before the deadline, its status will be changed to Status = "TimeOut".
- "Reference", which is taken into account when processing queue elements; it can be used for linking transactions performed by a robot to entities/transactions of another system, as well as for grouping/selecting queue details and other purposes defined by the developer of the robot. If the "Reference should be unique" attribute is set, the system will check if the link is unique when it is added to the queue. The system won't add an element to the queue if it's not unique, recording an error in the log.
- "Comment" is a string field that can be set as the developer of the robot sees fit.
2.3 "Get RabbitMQ Message" block
Retrieves data from the RabbitMQ message queue
Parameters:
  • Host name - RabbitMQ host without port: http://10.10.10.10
  • Порт: 5672 - standard RabbitMQ port
  • User name and password – login and password for RabbitMQ
  • Virtual host - in the drop-down list at the top right (optional)
  • Queue name - the name of the queue from RabbitMQ
The "Get RabbitMQ Message" block has the ability to use an encrypted connection via AMQPS. For this in the block settings set the following:
  • "Use SSL" checkbox;
  • "Disable Certificate Verification" checkbox;
  • port = 5671.

It is also possible to get the headers and properties of a message.
These properties are accessed in the Process via the $ tag (P), or by configuring block parameters - for example, in the "Task" block (T).


2.4 "Get Kafka message" block
Designed to retrieve data from the Kafka message broker.
Parameters:
  • Broker servers
  • Client group ID
  • Topic
3. Mail group blocks
Note: IMAP must be enabled in the mail settings.
3.1. "Confirmation" block
Parameters: Recipient email, Email subject, Email body and fields with answer options are added.
3.2. "Email monitoring" block
The block is used to filter incoming emails in the specified folder.
The "Mail folder" field and filtering conditions are configured in the block:
  • From contains
  • To contains
  • Copy containsт
  • Subject contains
  • Message contains
  • Sent since (date)
  • Sent before (date)
  • Attachments contain (file names mask)
3.3. "Send email" block
This block is used to send emails.
Parameters:
  • Recipient email
  • Email subject
  • Email body
"Wait" block
In the "Base" process group there is a "Wait" (W) block to set a delay before the next process block is executed.
The "Waiting time (sec.)" parameter is set in seconds (T).
You can set the value in the field with the arrow control or enter it manually.

"Queue processing distributor" block
This block distributes data queue items (D) for processing by tasks (T) from the task queue. This block is taking into account the new parameter in the task [Max. number of unprocessed task queue elements] (M).


The parameter [Max. number of unprocessed task queue elements] = 1 in the task can be used to limit the creation of new task queue elements if an item with the same task and "New" status already exists in the queue. This function is not related to the processing of data queues, but can be useful for task queues management in general.
Scaling the data queue processing.

Suppose there is a process containing triggers and parallel processing of the data queue by a task queue.

The process diagram includes:
  • [Number of elements > N] block - to get the number of unprocessed queue elements
  • and two [Queue processing distributor] blocks. The [Distibute 1] block is triggered if there are unprocessed queue elements, the [Queue processing distributor 2] is triggered by the condition [if the number of data queue elements is greater than the specified parameter]. [Queue processing distributor 2] forms the task queue elements with a Task different from the [Distibute 1] block

Thus, when the threshold for the number of unprocessed items is reached, the second task starts processing them as well.

[Number of elements > N] block (Q) returns:
  • the number of elements in the data queue;
  • ID of the data queue.
The "Add a False branch if the condition is not met" (G) setting, adds a False port for the process path if the condition (Number of data queue items greater than specified) is not met.

This setting can be used to stop the process if inside the block [Number of elements > 0] there are 0 elements.

There are two modes of operation available for the "Number of elements > N" block:
Mode-1. Checking for N items in the waiting data queue - checkbox [Add a False branch if the condition is not met ☑] (G) not ticked.
In this case the process works as before, the "False" connector is black (E) and the branch "No" does not work.

Mode-2 (new). Checking for N items in the non-waiting data queue - checkbox [Add a False branch if the condition is not met ☑] ticked.
If the number of elements in the data queue is greater than specified, the process is executed on the "Yes" branch; otherwise it is executed on the "No" branch (F). Note that if no block is attached to the "False" connector, the process will be aborted.


COMPATIBILITY: For processes created with PIX Master versions earlier than 1.25 to work properly, the [Add a False branch if the condition is not met] checkbox is not ticked by default ☐. The block will check the number of elements in the queue after a specified amount of time and wait until the condition [Number of items > N] is TRUE.
Group Access Control
It is possible to assign Groups to processes. This allows you to restrict access to the display of elements in the process list:
  • If a Group is specified for a Process, it will be displayed in the interface for the users of that Group;
  • If a Group for Process is not empty then the Process is visible to all users.