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

  1. Click the Explore resources icon to open the Explorer pane.

  2. Hover over the Plus button.

  3. Select Create flow.

  4. Enter a unique name for your flow.

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


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

https://cdn.rulex.ai/docs/Factory/lockicon.webp

The flow is already opened through Rulex Platform GUI by another user, and it can not be accessed.

Dirty

https://cdn.rulex.ai/docs/Factory/versioningAsterisk.webp

The flow contains local modifications which are not pushed on the remote version.

Versioned

https://cdn.rulex.ai/docs/Factory/versioningTick.webp

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.


Flow Context Menu#

When right-clicking on a single flow or on a set of flows (press SHIFT to select multiple flows), a context menu opens. The context menu entries are:

  • Delete: it deletes the selected flows (available on multiple flow selection).

  • Rename: it renames the selected flow.

  • Permissions: it opens the permissions panel where flow permissions can be modified.

  • Execution parameters: it opens the Flow execution parameters panel where users can modify computation parameters and apply them to any flow execution (available on multiple flow selection).

  • Search Manager: it opens the Search Manager panel for the selected flow.

  • Export: it exports the selected flows on file (available on multiple flow selection). Available only if the user has Share permission on the resource.

  • Versioning: it opens the available versioning options for the selected flow. The available versioning options change according to the versioning status of the selected flow.

  • Copy: it copies the selected flow, and allows to subsequently paste it in a different environment location (available on multiple flow selection).

  • Cut: it cuts the selected flow, and allows to subsequently paste it in a different environment location (available on multiple flow selection).

  • Plan schedule: it opens the Plan schedule panel to plan the schedule for the current flow. In this panel it is possible to schedule automatic execution of flows or events using OS internal scheduler (Task Scheduler on Windows).

  • Flow Review Tool: it opens the Flow Review Tool panel to review the selected flows. It allows to configure an input set of rules the selected flow needs to respect and to save a report containing the result of the analysis (available on multiple flow selection).

A flow can be imported in an environment by clicking on the plus button in the Explorer panel as described in its general introduction.

In Rulex Factory, the presence of the primary resource flow leads to some modifications in the environment context menu adding some flow dedicated entries. Here’s a general overview about context menu actions of environments in Rulex Platform. The additional available entries are:

  • Option Manager: it changes options of different tasks in different flows of the selected environment in bulk. To perform this operation all the selected tasks need to belong to the same task category.

  • Search Manager: it opens the Search Manager for the list of flows belonging to the selected environment.

  • Export flows: it exports the flows belonging to the selected environment in a single bulk operation each one on a different file.

  • Plan Schedule: it opens the Plan schedule panel to schedule a list of flows or for macro resources belonging to the selected environment.

Note

Plan schedule entry available only on Rulex Platform Standalone Version.


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.

  • 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

  1. Click the Explore resources icon to open the Explorer pane.

  2. Hover over the Plus icon.

  3. Select Import Flow.

  4. Select if you want to import a flow from a Filesystem or a Repository.

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

  6. In the Repository case provide the hash name and eventually the tag name of the desired flow remote version.

  7. Enter a new name for the flow, if required in the Insert desired flow name text box.

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

  9. 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).

  • 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

  1. Click on the Explore Resources icon to open the Explorer panel.

  2. Select the flow you want to export.

  3. Right-click the flow you want to export or click on the three-dotted icon next to it.

  4. Click Export.

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

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

  7. Click Select button and browse to the location of the folder where you want to export.

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

  9. 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 other tasks in the process continue the execution, except those directly downstream of the task that raised the error.

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