Discovering Factory Flows¶
Flows are the primary resources of Rulex Factory and to their construction, testing and execution is devoted the whole user experience of the Factory component.
Flows share the general features described in the Exploring Rulex Platform section. Here’s a sum-up:
A set of permissions can be defined to manage the resource itself (who can view, share, delete etc.).
Variables can be used to parametrize features and options of a flow.
Versioning operations can also be performed on flows.
To create a new flow:
Procedure
Click the Explore resources icon to open the Explorer pane.
Hover over the Plus button.
Select Create flow.
Enter a unique name for your flow.
Click Create.
Once the flow has been created, you will enter automatically in the just created flow to modify its internal structure. All the created flows can be visualized in the Explorer pane and can also be organized into environments inheriting their specific features. If the Flow filter located in the top right side of the Explorer is switched on, only the primary resource, flows in this case, and the environments within the current environment will be displayed in the Explorer. The internal properties of a flow are controlled by a unique User Interface called stage.
To open an already created flow, navigate through the Explorer, open the environment the flow belongs to, and click on it, so the flow stage opens. If the View permission for a flow is set to allow, then the user can open it.
Note
The flow path is the path of the flow within the user environment. The format of the path is "/RulexDesktop/Env_username/flowname"
.
Flow Status¶
When a flow is selected for modification its usage is limited to a single user. The access for all the other users is prevented or limited to read-only operations. In particular:
when a user opens a flow through the GUI, then any other concurrent access is locked. In the Explorer pane, a lock icon next to the flow entry line communicates to other users that the flow cannot be opened.
when performing a flow computation through CLI/API interface, a physical user can open that flow using the GUI as read-only. As the stage background is green, and the computation is progressing.
Other status icons located next to the flow entry line in the Explorer are used to show the versioning state of the considered resource. Refer to the versioning general overview for further information.
Status |
Icon |
Description |
---|---|---|
Locked |
The flow is already opened through Rulex Platform GUI by another user, and it can not be accessed. |
|
Dirty |
The flow contains local modifications which are not pushed on the remote version. |
|
Versioned |
The flow is versioned. No local modifications are present with respect to the last pull operation. |
Important
In this section the term user refers to user session. This means that a flow cannot be opened simultaneously by the same physical user on two different devices.
Importing Flows¶
Instead of creating flows from scratch, you can also import them into Rulex Factory. This is useful when you want to work on flows that have been previously created by other users on different machines.
The import process is very easy and user-friendly, but you must have the Create permission on the selected environment.
Prerequisites
You must have created an environment (or use the default environment) and to have the Create permission on it.
You must have a supported flow file.
The following formats can be imported in Rulex Factory:
Files in RFL format, which are flows exported from the Factory;
Files in PRCX format, which are Rulex 4’s processes.
Warning
PRC exported from Rulex 3 are no longer supported in Rulex Factory, and to import them, you must first convert them to PRCX.
Open the environment where you want to import your flow, click on the plus button at the bottom right-side of the Explorer panel, select Import Flow, and the Import flow pane opens allowing specific configuration options for the current import process.
Flows can be imported from two different sources:
Filesystem, local or remote containing a flow in one of the supported file formats.
Repository where a remote version of the flow file representation is selected and cloned into the system.
Once the connection to the filesystem has been established, the user needs to insert the desired connection to be used (here linked further information about filesystem connection configuration, which could be Saved or Custom as well as the relative path to the imported flow file).
Once the connection to the repository has been imposed, you need to provide the unique hash name corresponding to the desired remote flow to be imported and an optional tag name, if you do not want to import the latest version.
In the Import flow panel, once the flow has been selected, users can configure general characteristic about import operation:
Desired Flow Name: in case of single importation - if more than one file is considered the name will be automatically assigned by the system - you can define the name of the flow once imported in the environment. By default, it is filled with the .rfl file name.
Module Conversion Policy: available only if the selected file is in PRCX format, and a module conversion policy needs to be established to manage any internal Rulex Process File Source or Execute Rulex Process File tasks. Available options are:
Empty - if left blank, only the flow itself is converted from PRCX to RFL, and any modules contained within the flow are in no way changed. If you select this option, you must then manually update the paths of any referenced modules, once they have been converted.
Only Options - if selected, this option converts the flow itself, and then updates the path to any modules used within the flow from PRCX to RFL, so they are correctly referenced. However, it does not convert the module itself. This option is the recommended choice, unless you are the owner of the modules, with Modify permissions.
Option and Module - this final option converts both the flow and any modules it contains, creating new RFL versions of files. To use this option, you must have Modify permissions for the flow and all its modules, and should be used only if you are the owner of both.
Danger
Differently by Rulex 4, Rulex Platform does not convert PRCX at runtime during module execution. Therefore, any internal module needs to be converted either manually or with the automatic routine explained above, before the first flow execution; otherwise an error will be returned by the not converted module tasks.
Summarizing, to import a flow in a selected environment you can follow this:
Procedure
Click the Explore resources icon to open the Explorer pane.
Hover over the Plus icon.
Select Import Flow.
Select if you want to import a flow from a Filesystem or a Repository.
In the Filesystem case:
From the SOURCE slider, select whether the imported flow is coming from a previously saved location, or from a custom location you are going to specify following the instructions at this page.
Click the Select button and browse to the location of the flow file you want to import.
In the Repository case provide the hash name and eventually the tag name of the desired flow remote version.
Enter a new name for the flow, if required in the Insert desired flow name text box.
If the imported file is in PRCX format, open the Module Conversion policy drop down list and pick up one of the option described above.
Click Import to complete the import operation.
Exporting Flows¶
If you want to save a copy of your flow to send it to other users or to store it, you can export an entire flow in RFL format.
This exported file can then be imported on any machine where Rulex Platform is installed.
The Export Flow panel, opened from the Explorer context menu or directly from the toolbar for the current opened flow, allows the configuration of export options, e.g. to decide its destination.
Exporting operations can be performed both to Local filesystem (i.e. your machine disk) or to any Remote filesystem supported. To configure the selected destination, you need to insert the desired connection you want to use (further information about Filesystem connection configuration available at this link), which could be Saved or Custom as well as the relative path of the destination folder.
Other important options you can configure from the Export flow panel are:
Desired file name: the base name of the file you want to create (if empty, the flow name will be used). By default, this field is filled with the .rfl file name.
Flow content: it’s a drop-down list defining the type of information to store in the exported file:
Flow and data - meaning both the tasks and links topology, the data/computation status of any task and the additional information (variables, events, etc.) related to the flow will be exported in file.
Only Flow - meaning only the tasks and links topology and the additional information (variables, events, etc.) related to the flow will be exported in file.
Empty Flow (additional info only) - meaning only the additional information (variables, events, etc.) related to the flow will be exported in file.
Additional Information: it defines which additional information related to the exported flow needs to be included in the final file. It accepts any of these: Code variables, Vault variables, Events, Documentation and Graphic Elements.
Export options: it defines the following general export options:
Selected tasks only - instead of exporting the whole set of flows, it considers only the selection performed on the stage when exporting.
Add current date and time as prefix - it adds a timestamp prefix to the file name produced.
Add current date and time as suffix - it adds a timestamp suffix to the file name produced.
Add the last tag if the flow has been versioned - it adds the tag name (if present in the latest commit) as suffix to the file name produced.
Export externally used resources (share permissions on external resources are required) - it converts all Saved connections to Custom connections before the exportation on file.
Note
When importing a flow which has specific Saved sources used for its external connection, and it has been exported from another environment, make sure to have the same Saved source within your environment, otherwise the next computation is going to return en error. If you want to produce an environment-independent flow, please select Export externally used resources during exporting process. Take into account that to complete correctly the exporting operation, the Share permissions need to be available on any Saved resource used in the flow.
To export a flow to a file make sure to have the following:
Prerequisites
You must have created an environment (or use the default environment).
You must have a flow within your environment, and own the Share permission.
Then follow these steps.
Procedure
Click on the Explore Resources icon to open the Explorer panel.
Select the flow you want to export.
Right-click the flow you want to export or click on the three-dotted icon next to it.
Click Export.
From the DESTINATION slider, select whether the exported flow should be sent to a previously saved location, or to a custom location you are going to specify following instructions at this page.
Choose from the DESTINATION drop-down list if you want to export the flow to your computer or to a remote connection (see filesystem description). If you are exporting to a remote connection, choose it from the list and then click on the pencil button to set the connection information required.
Click Select button and browse to the location of the folder where you want to export.
Write the file name in the Desired file name edit box, define the Flow content, the Additional options and the Export options according to the description above.
Click Export. When the progress bar reaches 100%, your exported flow will be saved in the specified location.
Flow execution parameters¶
Users can modify the flow execution parameters according to their needs in the Flow Execution parameters menu. You can access to this window from the flow context menu in the Explorer or directly from the toolbar by clicking Execution Parameters.
Parameters you can control from this menu are:
Number of parallel tasks: The maximum number of tasks that can be executed in parallel at once.
Warning
In Factory Lite license, the number of parallel computations cannot be more than 1.
- Fail policy: it defines how to manage any failed tasks. The possible options are:
Continue: all tasks in the flow continue to execute, and it stops only child tasks directly linked to the task that raised the error. You can see its effects with Import from Task tasks, which are computed even if the father task has raised an error, and Import from Task tasks might raise an error unless you’ve selected the Use old computation if the source file is not available option.
Stop neighbors: the tasks in the same subtree, and who are connected to the task that raised the error, change from pending to ready status. Any other subtree will continue to run and can be successfully computed. This is the default value.
Stop process: it stops the whole flow from executing.
- Priority policy: it defines the order of task execution when there are conflicting priority orders:
Parent first: in cases of ambiguity, the hierarchical position of tasks will be considered to have a higher priority than the priority number itself. This is the default value.
Priority first: in cases of ambiguity, the priority number of the task will be considered to have a higher priority than the hierarchical position of the task.
No. decimals (casting): it defines the number of decimal digits considered when implicitly or explicitly casting a continuous data type to a nominal data type.
Cache Vault Var: if enabled, it forces any vault variable to store a cached value in the working area to be used in case of fail vault connection.
See also
Priority resolution is not trivial when priority are not homogeneous moving from the parent to the child of the same branches. See discussion about Priority policies.