RuleAPI:Flow commands

From FlexRule Wiki
Jump to: navigation, search

Common

Selection

To select a node on the flow

Note

To create a note/ memo related to the flow.

View signature

Flow commands

These commands handle the logic of a flow. A flow logic may have some rule parameters defined by a Declaration command.

LifeCycle


Start

Every flow must have a Start node that shows the beginning of the flow life cycle.

View signature

End

This ends the flow and is the flow execution terminator. No further action will take place after reaching this node.

View signature

Suspend

When there is a long-running process, this node in the flow will cause the process to get suspended. Your application will be able to resume the flow from this point onwards.

View signature

Restart

Re-runs the flow from the beginning in the same context.

View signature

Terminate

This ends the flow and is the flow execution terminator. A flow might have multiple of terminate nodes.

View signature

Steps


Activity

This is the actual action that will occur in a flow logic. It is the extension point of the flow rules. You can extend this node to accomplish different tasks during the flow execution. Out of the box, you can execute a Procedural rule by referring the rule address.

View signature

MultiExpression

This is similar to Activity, but allows flow to evaluate multiple expressions as a group on the execution of a node.

View signature

Split

When there are a couple of options in the flow logic that may or may not be executed by the rule, this node will help you to design the decision based on the priority of nodes or evaluating the node`s transition condition. Each split command may contain one or more nodes.

View signature

Join

Join node is a required synchronization point for each Split node. Every Split node must have a corresponding Join node, and the outgoing transitions of a Join node is triggered based on its Type.

View signature

Decision

This is when the node acts like an If command, but can be used in flow logic.

View signature

Assign

This node acts like a Var command and assigns a value to a defined variable.

View signature

Wait

Waits a given number of milliseconds

View signature

Exception Handling


Try

This node defines a scope such that if an exception happens, based on the exception type, a different route can be taken. It uses a custom prioritized transition to define the exception type. If no exception is defined in the transition, then it will try to execute the path that does not give any error and show exceptions.

View signature

Throw

This node in the flow will throw an exception and makes the executing flow go to a Fault state. You may use this command in the flow to terminate the flow execution for a specific reason.

View signature

General


Notification

Allows to create notifications and save in a database

View signature

CallDecisionTable

Allows a call to a Decision Table (DT) document.

View signature

CallDRD

Allows a call to a Decision Requirement Diagram (DRD) document.

View signature

SubFlow

A sub flow is a way to run an external Flow as part of a running flow by referring to the address of the external flow.

View signature

CallNaturalLanguage

Allows a call to a Natural Language (NL) document.

View signature

Group

Group commands in the flow are a set of nodes that are the containers for other nodes. They can contain one or more nodes and pass the execution to initialNode. When the execution reaches the finalNode, the container`s outgoing transition will be activated.

Try

This node defines a scope such that if an exception happens, based on the exception type, a different route can be taken. It uses a custom prioritized transition to define the exception type. If no exception is defined in the transition, then it will try to execute the path that does not give any error and show exceptions.

View signature

Loop

This command can be used if repetition is required in the flow. An enter and exit condition is required for this command. However, the enter condition can be set to “true,” and the execution path passes through to the initialize node without checking any condition.

View signature

Transaction

When a transaction is required, this node can be used. It determines the transaction in which to participate. Once determined, the scope always participates in that transaction. The transaction is applied to all the child nodes inside this group.

View signature

Scope

This command logically groups different sets of nodes. No extended behaviour is applied.

View signature

Pool

Pool can be used to group nodes without any specific order and connection. This is mainly used for collecting data from different sources such as files, databases and that does not require any connection to each other or order.

View signature

CriticalSection

This command defines a section that only one execution can be active inside the section. If an activity/ resource inside a CriticalSection is being used by one process, and if another process tries to use the same activity/ resource, it locks it for the first process to finish it to be used by the second process.

View signature

Data Sources

Database

When loading data from a database is required, you can use this node. It can be any standard or a custom database.

The Database command in Flow is the same command that is used by Procedural logic.

View signature

Spreadsheet

This node allows loading of data from a Spreadsheet and CSV files.

View signature

REST Client

This command (CallREST) in flow allows you to communicate with any REST end point.

View signature

File

This node allows the loading of different files (text, binary, lines, XML and JSON) from a location.

View signature

Internet

Send Email

To send emails.

View signature

FTP


Check File Exists

To check whether the file exists in a given FTP server.

View signature

List File and Folder

List the files and folders in a given FTP server.

View signature

Download

Allow to download files from a fiven FTP server.

View signature

Upload

Allow to upload files to a fiven FTP server.

View signature

Processes

Run

To run an executable file

View signature

List

List the currently running processes in the machine.

View signature

Kill

Kill the process of any given PID

View signature

IO

Files


Write File

Create a file with its content in a given location

View signature

Append File

Append a file with its content to another given file

View signature

File Exists Check

Check whether the file exists in a given location

View signature

Delete File

Delete a given file

View signature

Folders


Create Folder

Create a folder in a given location

View signature

Folder Exists Check

Check whether the folder exists in a given location

View signature

Current Folder

Get the path od current folder

View signature