Compute Flow

Computes the flow identified with the ID {rflId}.

URI: compute/compute/flow/{rflId}


Parameters in bold are mandatory







The ID of the flow to be computed.

See Get Resource ID for further details on how to retrieve IDs.




The computation mode, which can be:

  • "flow", to compute the whole flow

  • "upto", to compute upstream of the selected tasks

  • "onwards", to compute downstream the selected tasks

  • "selected" to compute only the selected tasks.




Perform a one-time computation starting from a rfl file or a flow version on a repository. It can be true or false (default). Imported file is automatically disambiguated from the other flows on the working area to permit infinite parallel computation of the same flow. Flow at the end can be deleted according to an ad-hoc compute params entry.




The list of the tasks to be computed.

str, or list for multiple tasks



The computation parameters for the chosen flow, which can be:

  • "inmemory", in which case:

    • 0 is the default full computation

    • 1 is a in-memory computation,

    • 2 is an in-memory source saving computation.

  • "procvar": it contains a key/value dict with the list of process variables we want to overwrite for the current run. The values passed are not persistent.

  • “nparallel”: the maximum number of task which can be computed at the same time.

  • “failpolicy”: the policy to use if the computation fails: it can be "stopprocess", "stopneighbours" , "continue".

  • “prioritypolicy”: the policy to use to calculate the priorities: it can be "parentfirst" or "priorityfirst".

  • “failpolicymacro”: the policy to use if the macro fails.

  • “floatprec”: the precision of float values.

  • “cache_vault_var”: if True the vault variables' values are used.

  • “suppress_alert”: if True alerts are not used in computation.

  • “deleteFlow”, in which case:

    • 0 is the default flow is not cancelled at the end of the computation

    • 1 flow is cancelled only in case of successful run

    • 2 flow is cancelled in any case

The syntax for the procvar parameter is the GOLD syntax, with specific rules whether the variable is ordinal or a string:

  • For all the variables: the @ symbol is not required before them, the variable is written in json format.

  • For ordinal variables: numbers must be included into ". e.g. {"var1":"2"}

  • For nominal variables: the string must be included into ", and it must be further included in \". e.g. {"var2":"\"string\""}




The import information used in case of one-time computation (ignored in all other cases). Dictionary composed by:

  • “flowPath”: the internal path on the working area of Rulex Platform where to import the flow. The path is intended as environment path and base flow name. Suffix is automatically added to prevent name conflicts between parallel computations.

  • “origin”: The source where the flow to import is located. Possible values are '__local__', '__filesystem__'.

  • “params”: a dictionary composed by the internal information of the import. Possible entries are:

    • “path”: the path to the .rfl file used in the import (considered only in '__filesystem__' or '__local__' origins)

    • “components”: used to select which components of the flow are considered. A dictionary with the following entries:

      • topology: if true, the topology will be imported.

      • data: if true, the data will be imported.

      • doc: if true, the documentation will be imported.

      • graphics: if true, graphics will be imported.

      • events: if true, events will be imported.

      • modules: if true, modules will be imported.

      • var: if true, variables will be imported.

    • “source”: a dictionary formed by the internal information of the source used (considered only in '__filesystem__' case):

      • uri: the path of the Filesystem resource stored in the Rulex Platform working area.

To see details on possible response codes, go to API Responses.