◷ Reading Time: 12 minutes
These commands handle the logic of a flow. A flow logic may have some rule parameters defined by a Declaration command.
Common
Selection
To select a node in the flow
Note
To create a note/memo related to the flow.
- Allows the creation of a note in the workspace.
- Notes can be related to the flow/memo/anything that the user should know when running the process.
- It does not require any connection/transition to any other node in the workflow.
Connections
Straight
Add a straight line to connect two nodes.
When two nodes are connected, you can create a straight line in between to connect them.

Bezier
Add a curved line to connect two nodes.
When two nodes are connected, you can create a curved line in between to connect them.

Right Angle
Add a right-angled line to connect two nodes.
When two nodes are connected, you can create a right-angled line in between to connect them.

LifeCycle
Start
Every flow must have a Start node that shows the beginning of the flow life cycle.
A flow consists of multiple steps. Every flow requires a starting point. The Start node denotes the initial step of the flow.
Transitions
- Incoming: 0 (start node cannot have any incoming transitions)
- Outgoing: 1 (start node can have only one transition)
Properties
- Info
- Name: The name of the node in the IRD which must be unique and is corresponding to a Parameters.
- Node Type: Shows the type of node.
- Display (Appearance)
- Text: The text that is displayed on the node
- Font: Style of the text on the node
- Border: Style of the node’s boarder
- FillColorFrom: Gradient starting background color
- FillColoeTo: Gradient ending background color
- Metadata
- Description: The description of the activity node.
- Attribute Types: Allows to associate a metadata form to the node and will extra structured metadata about the node.
- name
- Description: Name of the node
- Mandatory: Yes
- Type: String
A simple Start tool with an End tool
Every flow has a start as part of its normal life cycle. This command defines the start of the flow. Every flow’s Node collection must have this command. Execution is started from this command and carries on by activating different outgoing transactions.
No transition in the flow can set this node as its target node. This node cannot have any incoming transitions.
Sample
<Start name="flowStartNode"> <Transition name="tr0" to="pause"/> </Start>
End
This ends the flow and is the flow execution terminator. No further action will take place after reaching this node.
Every flow’s Node collection must have this command. The engine finishes the execution upon reaching this node.
Transitions
- Incoming: 1 (End node can have only one incoming transition)
- Outgoing: 0 (End node cannot have any outgoing transitions)
Properties
- Info
- Name: The name of the node in the IRD which must be unique and is corresponding to a Parameters.
- Node Type: Shows the type of node.
- Display (Appearance)
- Text: The text that is displayed on the node
- Font: Style of the text on the node
- Border: Style of the node’s boarder
- FillColorFrom: Gradient starting background color
- FillColoeTo: Gradient ending background color
- Metadata
- Description: The description of the activity node.
- Attribute Types: Allows to associate a metadata form to the node and will extra structured metadata about the node.
Multi end nodes in flow
- name
- Description: Name of the node
- Mandatory: Yes
- Type: String
A simple End tool with an Start tool
Sample
<Activity name="activity1> <Transition name="tr1" to="flowEndNode" /> </Activity> <End name="flowEndNode"/>
Restart
Re-runs the flow from the beginning in the same context.
The process restarts once it reaches a Restart node.
Transitions
- Incoming: 1 (Restart node can have only one incoming transition)
- Outgoing: 0 (Restart node cannot have any outgoing transitions)
Properties
- Info
- Name: The name of the node in the IRD which must be unique and is corresponding to a Parameters.
- Node Type: Shows the type of node.
- Display (Appearance)
- Text: The text that is displayed on the node
- Font: Style of the text on the node
- Border: Style of the node’s boarder
- FillColorFrom: Gradient starting background color
- FillColoeTo: Gradient ending background color
- Metadata
- Description: The description of the activity node.
- Attribute Types: Allows to associate a metadata form to the node and will extra structured metadata about the node.
Terminate
This ends the flow and is the flow execution terminator. A flow might have multiple terminate nodes.
Terminates the process at any stage of the flow. No outgoing transition is allowed for this node.
Transitions
- Incoming: 1 (Terminate node can have only one transition)
- Outgoing: 0 (Terminate node cannot have any outgoing transitions)
Properties
- Info
- Name: The name of the node in the IRD which must be unique and is corresponding to a Parameters.
- Node Type: Shows the type of node.
- Display (Appearance)
- Text: The text that is displayed on the node
- Font: Style of the text on the node
- Border: Style of the node’s border
- FillColorFrom: Gradient starting background color
- FillColoeTo: Gradient ending background color
- Metadata
- Description: The description of the activity node.
- Attribute Types: Allows to associate a metadata form to the node and will extra structured metadata about the node.
- In this example,
- If (input=1), terminate the process
- If (input=0), end the process
- Terminate is a useful tool when you want to end a process without reaching the end.
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 to the rule address.
An Activity node allows you to define a step in the flow and execute it as part of the flow or workflow run. The Activity can either:
- Be linked to a procedural logic and execute the logic
- Have an Expression associated and execute the expression
- Become a empty (null) activity that allows multiple transitions to join from multiple routes to a single step.
Transitions
- Incoming: at least 1 incpming node
- Outgoing: at least 1 (If there are multiple outgoing transitions defined, then each transition can set its Condition and Priority properties.)
Properties
- Action
- Expression: An Expression associated to the Activity that will be executed when the engine reaches it.
- Procedure
- Uri: When set, the Activity node will be linked to a procedural logic document by address
- Context Mode: When the linked procedure is executed, it allows you to use the parent (flow) context or has its own context.
- Result Copy Mode: When a linked procedure is executed, this copies the procedure’s parameters to the parent (flow) execution context based on this setting.
- Parameters: When the context is New, it allows the flow to specify the value for the input parameters on the Procedure.
- Handler: allows the linking of a custom handler to this node by an Assembly and Type name. The custom handler is the interface that is implemented by code to customize the Activity behaviour.
- Info
- Name: The name of the node in the IRD which must be unique and is corresponding to a Parameters.
- Node Type: Shows the type of node.
- Display (Appearance)
- Text: The text that is displayed on the node
- Font: Style of the text on the node
- Border: Style of the node’s boarder
- FillColorFrom: Gradient starting background color
- FillColoeTo: Gradient ending background color
- Metadata
- Description: The description of the activity node.
- Attribute Types: Allows to associate a metadata form to the node and will extra structured metadata about the node.
- Create an activity to calculate 1+1 and show the result by storing the value in the result variable.
Properties
- Expression: result=1+1
Multi Expression
This is similar to Activity but allows flow to evaluate multiple expressions as a group on the execution of a node.
A MultiExpression node allows you to define steps in the flow and execute them as part of the flow or workflow run. It is similar to running multiple Activity nodes within one node. The MultiExpression can:
- Be linked to a procedural logic and execute the logic
- Have one or more expressions
Transitions
- Incoming: minimum of 1 node
- Outgoing: 1 node
Properties
- Action
- Expressions: Expressions associated with the MultiExpression node that will be executed when the engine reaches it.
- Info
- Name: The name of the node in the IRD which must be unique and is corresponding to a Parameters.
- Node Type: Shows the type of node.
- Display (Appearance)
- Text: The text that is displayed on the node
- Font: Style of the text on the node
- Border: Style of the node’s boarder
- FillColorFrom: Gradient starting background color
- FillColoeTo: Gradient ending background color
- Metadata
- Description: The description of the activity node.
- Attribute Types: Allows to associate a metadata form to the node and will extra structured metadata about the node.
- Create a MultiExpression to calculate 2+2 and 3+3 to show the result by storing the value in result_1 and result_2 variables.
Properties
- Expressions:
- result_1=2+2
- result_2=3+3
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.
Split is used for complex decision-making regarding case routing. When a complex parallel execution scenario is involved, you can use the Split node. It has five types, the outgoing transitions of which are sorted based on priority. Then the engine tries to find a path to continue the execution flow.
This node has a prioritized conditional transition type (ConditionalTransition), and the priority of the transition is required. However, if the type of the split node is “All,” no condition is required. It is also possible not to provide the condition and to handle the decision using the engine event handler on the host application side, using the Calling event of the flow engine via CallbackEventArgs.
Properties
- Name: Name of the node
- Type: Split type
- All: No validation occurs for transitions of this type. All transitions would be triggered.
- HighestPriority: Only the transition with the highest priority that could be validated will be triggered.
- OneOrMore: Each transition that can be validated will be triggered.
- First: The first transition that validates the condition will be triggered.
- Custom: This needs a handler to manage the flow routing.
Transition properties. (Each node’s Transition should have a priority)
- The example shows how to split three Activities.
- Once the process starts it will go to each activity based on the priority defined in each Transition.
- As we have selected the type All, it will go to all three nodes.
Properties
Split node properties:
- Type: All
Transition properties:
- Set Priority of each transition to 1,2,3
<Split name="split0" type="All"> <Transition name="tr1" to="nodeCalcWeight" priority="1" /> <Transition name="tr2" to="nodeCalcDiscount" priority="2" /> </Split>
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.
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.
Properties
- Name: Name of the node
- Type: Join type
- AnyOf: At least one of the incoming transitions has been triggered
- AllOf: All of the incoming transitions have been triggered
- The example shows how to join three Activities.
- The process will continue only after once it finishes with all the three Activities
Properties
- Type: AllOf
Sample
<Join name="calcDone" type="AllOf"> <Transition name="tr5" to="calcSubTotal" /> </Join>
Decision
This is when the node acts like an If command but can be used in flow logic.
In a flow, you sometimes need to control the routing mechanisms and the execution path. This can be achieved using the Decision node. A Decision node in a flow has Diamond shape.
This node has conditional transitions (ConditionalTransition) providing routing conditions using the condition attribute of the transition node.
Transitions
- Incoming: 1+
- Outgoing: 1+
Each outgoing transition from a Decision node has a Condition property that can be set. If the expression of the condition is evaluated to true that route is taken.
Properties
- Priority: When a Decision node has multiple outgoing transitions, priority will manage the order of the condition’s evaluation on a transition to select the route. Priority is an integer number.
- Condition: The Condition’s expression allows conditional routing based on the evaluation of its expression. When it is evaluated to true, that route (transition) will be selected.
- Expression: When a execution is transitioning to a target (destination) node, the Transition’s Expression will be evaluated. This is when evaluation of an expression (i.e. assigning a new value, creating an object, etc.) is required, before executing the next node.
- name
- Description: Name of the node
- Mandatory: Yes
- Type: String
Which has two outgoing transitions (arrows):
- If input==0 –> result=No
- If input==1 –> result=Yes
Therefore, conditions should be added to each outgoing transition separately, by clicking on the arrows.
Properties for transition named ”input==0”
- condition: input==0
Properties for transition named ”input==1”
- condition: input==1
Sample
<Decision name="Decision1"> <Transition name="TransitionYes" to="task1" condition='age ge 18' /> <Transition name="TransitionNo" to="task2" /> </Decision>
Assign
Assigns a value to a defined variable. This node also acts like a Var command in Procedural Tree.
This node sets a value by running the given expression when it is reached by the execution.
Properties
- Name: Name of the tool
- Type: Type of the tool
- Variable
- Name: Name of the variable in which the value is assigned
- Value: Value to assign
Assign 1 as the value of a variable.
Properties
- Variable
- Name: result
- Value: 1
Sample
<Assign name="Assign1"> <Var name="StarQty" value="3" /> <Transition name="Transition17" to="split0" /> </Assign>
Wait
Waits a given number of milliseconds.
This command allows you to define a waiting period in the process. Wait time should be given in milliseconds.
Properties
- Time: Waiting period in millisecond
- Copy Result To: Copy the results of the command
- The process will wait two seconds (2000 milliseconds)
Properties
- Time: 2000
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 the initial node. When the execution reaches the final node, the container’s outgoing transition will be activated.
Scope
This command logically groups different sets of nodes. No extended behaviour is applied.
Different sets of nodes can be grouped together to have a better understanding of the nodes groups and there will be no specific behaviour.
- Name: Name of the node
- Initializer: The starting node inside the Scope
- FInalizer: The ending node inside the scope
The example shows how to group a set of Activity nodes using Scope tool.
Properties
- Initializer: <Starting node inside the Scope>
- Finalizer: <Ending node inside the Scope>
Sample
<Scope name="transactionGroup1" initialNode="ActivityA" finalNode="ActivityB"> <Nodes> … </Nodes> <Transition name="tr2" to="end"/> </Scope>
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 and databases, and that does not require any connection to each other or their order.
Collects data from different sources to create a data pool.
Properties
- Name: Name of the tool
- Enable: Whether the tool is active or inactive during the runtime
- The example shows how to group a set of data sources using Pool.
- It will collect data from an Excel file, database, and another file and create a pool of data that can be accessed by other nodes.
- There is no need of connecting them with each other or specify an order
Properties
- Enable: True
Transaction
This command is used when there are several database calls need to be queried in a transaction. All the database calls inside the transaction need to be successful in order to complete the complete transaction. If any of them fails, it will roll-back the successful transactions and finally, it will not be completed.
Properties

- Timeout: How long should it wait to complete all the transactions
- Mode:
- Required:
- RequiresNew:
- Suppress:
- Initializer: Starting node
- Finalizer: Ending node

In this example, there are two databases. If the query in database A succeeded and B fails, in the end, it will roll-back database A query and the complete transaction will be marked as failed.
Properties
- Timeout: 00:00:02 (2 seconds)
- Mode: Required
- Initializer: <Select starting activity from the drop-down list>
- Finalizer: <Select starting activity from the drop-down list>
CriticalSection
This command defines a section where 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 before being used by the second process.
When the same resource is used to be two processes, it locks the resource until the first process is finished using the resource.
Properties
- Name: Name of the node
- Type: Type of the node
- Scope: Locking method around the critical section
- SystemWide
- Distributed
- Scope Name: Name of the scope to acquire the lock for
- Connection: Connection string to the central server (if the resource is a database)
The example shows how to group a set of Activity nodes using Scope tool.
Properties
- Scope: SystemWide
- Scope Name: test_addition
To test the example,
- Open the same project twice
- Start running one project
- Once you get to the Activity node on the first project, start running the second opened project (You will see, in the second project, it will not be able to go inside the CriticalSection node)
- Stop the first project (It will automatically go inside the second project’s CriticalSection node.)
How to test CriticalSection tool by running the same project simultaneously.
Loop
If you want to recursively go through a given set of activities, the loop can be used.
Properties

- Enter: The condition to enter the loop if the Behaviour type is While
- Exit: The condition to exit the loop if the Behaviour type is While
- Behaviour:
- Iterator: List Source and Item Name should be provided to iterate through a given list
- While: Enter and Exit conditions should be provided
- Queue: List Source should be provided and it will loop through until the list is empty
- List Source: List of items to loop through
- Item Name: Name of the parameter to be set on each round of iterate with the element list
- Index Name: Name of the parameter to be set on each round of iterate index of the list
- Initializer: Starting node in the group
- Finalizer: Ending node in the group

In this example, it will loop through a list named input ( input = [1,2,3] ) and add each item to result in each round (result=result+i).
round 1: result = 0 + 1 = 1
round 2: result = 1 + 2 = 3
round 3: result = 3 + 3 = 6
finally, the value of the variable result is 6.
Properties
- Behaviour: Iterator
- List Source: input
- Item Name: i
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.
See Exception Handling to know how you can catch exceptions without the Try node.
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.
Properties
Try Node Properties:
- Name: Name of the node
- Initializer: Starting node inside Try
- Finalizer: Ending node inside Try
Transition Node Properties:
- Type: The exception type to catch, use ‘System.Exception’ or ‘object’ to catch all exceptions. Use any other exception type for catching specific issues, for instance, Syste,.Data.SqlClient.SqlException. When left blank it becomes the successful transition when there is no issue.
- In the given example, an activity is trying to do the calculation 1/0 (divide 1 by 0) which gives an exception.
Properties
Try Node Properties:
- Initializer: <Starting node inside Try node>
- Finalizer: <Ending node inside Try node>
Transition Properties:
This is the transition that connects the Try node and the Notification node.
- Type: Object
Sample
<Try name="tryGroup1" initialNode="ActivityA" finalNode ="ActivityB"> <Nodes> … </Nodes> <Transition name="tr2" to="ActivityC" priority="1" exceptionType="FlexRule.FlexRuleException" exceptionAssembly="FlexRule.Core.Library.dll"/> <Transition name="tr3" to="ActivityC" priority="2" exceptionType="System.Exception"/> <Transition name="trFinal" to="ActivityD" priority="3"/> </Try>
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.
This node throws an exception for a specific reason and code when the execution reaches it. This causes the running flow (process) to be set into a Fault state, thereby ending the execution. The type of exception that will be thrown is ProcessErrorException.
Properties
- Name: Name of the node
- Code: Any code that can be used as a reference later
- Reason: Any reason for the throwing of the exception
When the process is started, it will give an exception once it reaches the Throw node.
Properties
- Code: 11001
- Reason: Example reason to throw an exception
Popup window that appears once the process reaches the Throw node
Sample
<Thrown name="expcetion1" code="-1003" reason="User not identified" />
General
Validator
Allows you to create add validation documents to the flow.
Properties

- Copy Results To: Boolean variable name to copy the result of validation into
- Uri: Validation file path
- Dynamic Routing:
- True: The Uri is an expression
- False: The Uri is a string
- Name: Logic name if required
- Name Reference: A variable that logic name is stored to
- Parameters: Parameters to pass to the validation logic
- Context Mode: It sets the way of having a context for the called decision table
- Facts Check: List of facts to be checked against the defined constraints

In this example, it will call an Input Validation Document called Validation.xml and copy the final result to isValid variable mentioning whether it passed the validation.
Properties
- Copy Results To: isValid
- Uri: Validation.xml
- Dynamic Routing: False
- Parameters: age
Notification
Allows you to create notifications and save these in a database.
This command allows you to create notifications in a process. It can also automatically create a table named FlexRuleEventLog to store all the notification messages instead of creating separate log files. Notification message types can be defined and these are:
- Information
- Warning
- Error
- Fatal
Properties
- Name: Notification node Name
- Notices Collection: Collection of notifications (Notification type can be selected from Information, Warning, Error, or Fatal)
- Message: Simple text message that can be a Parameterized String.
- Type: Error, Info, Warning, Fatal
- Tag: When a tag is set to a GUID value, it will be used as an EventId if stored in Database.
- Storage
- Dynamic Connection String: State whether the connection string is defined dynamically
- Connection String: Connection String to connect to the database
- Database Type: Type of the database
In this example, the notification will be stored in a database.
FlexRuleEventLog table that stores notifications
Properties
- Notices Collection:
- Message: Error_Notification
- Type: Error
- Tag:
- Storage
- Dynamic Connection String: False
- Connection String: Data Source=.\SqlExpress;Initial Catalog=Car-Insurance;User ID=sa;Password=123;MultipleActiveResultSets=True
Decision Table
Allows a call to a Decision Table (DT) document.
CallDecisionTable can be used inside a process flow, if it requires to connect a Decision Table.
Properties
- Context Mode: It sets a way of having a context for the called DRD
- New
- Shared
- Uri: Connected DRD file name
- Dynamic Routing:
- True: The Uri address will be resolved at runtime. This allows you to decide what model to execute on-the-fly.
- Flase: Bounded to a model statically
- Parameters: Parameters connected to the flow
- A Decision Table is connected.
Properties
- Context Mode: Shared
- Uri: DecisionTable.xml
- Dynamic Routing: False
DRD
Allows a call to a Decision Requirement Diagram (DRD) document.
Inside a process flow, if it requires to connect a DRD (Decision Requirement Diagram) file, DRD can be used.
Properties
- Context Mode: It sets the way of having a context for the called DRD
- New
- Shared
- Uri: Connected DRD file name
- Dynamic Routing:
- True: The Uri address will be resolved on the runtime. This allows you to decide what model to execute on-the-fly.
- Flase: Bounded to a model statically
- Parameters: Parameters connected to the flow
- A DRD file is connected to the process.
Properties
- Context Mode: Shared
- Uri: DRD.xml
- Dynamic Routing: False
IRD
IRD connects an IRD document to a flow.
Properties

- Context Mode: It sets the way of having a context for the called IRD
- Uri: Path to IRD document
- Dynamic Routing:
- True: If the Uri is an expression
- False: If the Uri is a string
- Parameters: Parameters to pass to IRD

In this example, it connects an Information Requirement Diagram called IR Diagram.xml to the flow.
Properties
- Context Mode: Shared
- Uri: IR Diagram.xml
- Dynamic Routing: False
Sub-Flow
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.
Sub-Flow allows calling a flow with another flow. When there is a complex flow with many nodes, the flow can be divided into separate flows and combine all in one flow using Sub-Flow node.
Properties
- Context Mode: It sets the way id having a context for the called Sub-Flow
- New
- Shared
- Uri: Name of the connected file
- Dynamic Routing: When true, the Uri address will be resolved on the runtime. This allows you to decide what model to execute on-the-fly. Otherwise false, which means it is bound to model statically.
- Parameters: Parameters related to the Sub-Flow
The example is the main flow of a set of sub-flows. Therefore, once the process starts to run, it will automatically call the two sub-flows, Assign.xml and Activity.xml.
Properties
Assign node:
- Context Mode: Shared
- Uri: Assign.xml
- Dynamic Routing: False
Activity node:
- Context Mode: Shared
- Uri: Activity.xml
- Dynamic Routing: False
<Flow name="Mainflow" version="1.0.0.0"> <Declaration> <Define name="a" direction="in"/> </Declaration> <Nodes> <Start name="Start1"> <Transition name="Transition8" to="Activity1" /> </Start> <End name="End1" /> <Activity name="Activity1"> <CallFlow contextMode="Shared"> <FlowSource uri="Subflow.xml" /> </CallFlow> <Transition name="Transition3" to="End1" /> </Activity> </Nodes> </Flow>
Natural Language
Allows a call to a Natural Language (NL) document.
Inside a process flow, if it requires to connect a Natural Language file, CallNaturalLanguage can be used.
Properties
- Context Mode: It sets the way of having a context for the called DRD
- New
- Shared
- Uri: Connected DRD file name
- Dynamic Routing:
- True: The Uri address will be resolved on the runtime. This allows you to decide what model to execute on-the-fly.
- Flase: Bounded to a model statically
- Parameters: Parameters connected to the flow
A Natural Language file is connected.
Properties
- Context Mode: Shared
- Uri: NaturalLanguage.xml
- Dynamic Routing: False
Directory Service
Data Sources
Spreadsheet
This node allows the loading of data from a Spreadsheet and CSV files.
This command enables you to read Spreadsheet files below as a data source:
- Xlsx
- Xls
- CSV
Properties
- Type: File Type
- Xlsx
- Xls
- CSV
- Omit Object Index: By default, ObjectIndex property is created. When this is set to be true, no index property is created.
- Trim Values: By default, all values are trimmed (no White character). Set to false, to disable it.
- Sheet Name: Sheet name of the spreadsheet to load.
- Return: Parameter name to store once data is retrieved from a spreadsheet
- CSV Separator: The CSV separator character. (i.e. , or |)
- [space]
- [tab]
- [single quote]
- [double quote]
- [null character]
- [form feed]
- [vertical tab]
- Rows: Filter rows on reading the document/ sheets. The comma (,) separated patterns to include rows inside the active sheet. Use a dash (-) to set range or single number to the individual row address. i.e. 2, 4-6 will include rows number 2,4,5 and 6.
- Uri: Path to the spreadsheet
- Dynamic Uri: Threats the Uri as an expression that is going to be evaluated at runtime.
- Maps: A set of collection that maps columns to a resulting property name of each object as a row.
Parameters of Maps:
- Column: Column of the excel to map to
- Property: name of the object property to be created
- Type: Type of data to be read from a column
The example shows how to load data from a spreadsheet.
Properties
- Type: CSV
- Return: result
- CSV Separator: ,
- Uri: sp.csv
- Dynamic Uri: False
Sample
<Activity name="Activity1"> <Spreadsheet return="trans"> <DataSource uri="D:\excels\diversity.xlsx" /> <Map> <Add property="ScenarioID" column="A" type="int" /> <Add property="PortfolioID" column="B" type="int" /> <Add property="IssuerID" column="C" type="int" /> <Add property="Portfolio" column="D" type="string" /> <Add property="Issuer" column="E" type="string" /> <Add property="IndustryID" column="G" type="int" /> <Add property="MoodysIndustry" column="H" type="string" /> <Add property="TradeDate" column="I" type="datetime" /> <Add property="Amount" column="J" type="decimal" /> </Map> </Spreadsheet> </Activity>
DataSource with more with rows
<Activity name="Activity2"> <Spreadsheet return="list"> <DataSource uri="employee.csv" separator="," trim="false" rows="2, 4-5"/> </Spreadsheet> <Transition name="Transition3" to="End1" /> </Activity>
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.
See this article to read more.
This command defines the database to execute TSQL or a Stored Procedure against a data store. It supports built-in database types as well as custom databases (e.g., PostgreSQL). If your database is not built-in:
- Ms SQL
- Access
- Oracle
- ODBC
then you should provide a type address to IDbconnection and the related assembly.
Properties
- Connection String: Connection String of the database
- Dynamic Connection String: When true, the Connection String will be resolved on the runtime. This allows you to resolve the database connection string on the execution on-the-fly. Otherwise, false.
- Database Type: Type of the database
- MsAccess
- MySQL
- Oracle
- Odcb
- Custom (Alternatively, the type can be the CLR Type name including namespace that has the IDbConnection implementation.)
- Custom Database Type: If you select Custom option from the above list, you have to provide the database type here
- Custom Database Assembly: External assemply that the connection type implementation
- Queries: Database queries
Internal Commands
SelectRow, SelectValue, SelectList, ExecuteNonQuery, ExecuteScalar
In this example, it will connect to a MySQL database named sample_db and select all the data from table test_table.
Properties
- Connection String: Server=localhost\SQLEXPRESS;Database=sample_db;Trusted_Connection=True
- DynamicConnection String: false
- Database Type: MySQL
- Queries: select * from test_table
Standard Database Type
<Database connection="Data Source=.\SqlExpress;Initial Catalog=Car-Insurance;User ID=sa;Password=123;MultipleActiveResultSets=True" type="MsSql"> <SelectList command="select ([Made]+'-'+[Model]) Car from [dbo].[HighRiskCars]" return="probList1" multi="True" /> </Database>
Custom Database Type
<Var name="cnn" value='"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ Directory.GetCurrentDirectory()+ "\\DatabaseSample.mdb"' process="true"/> <Database connection-ref="cnn" type="System.Data.OleDb.OleDbConnection" assembly="system.data.dll"> <SelectValue command="select FName from person where id = @id" return="name"> <Param name="id" type="System.Int32" value="1"/> </SelectValue> </Database>
REST Client
This command (CallREST) in flow allows you to communicate with any REST endpoint.
Allows collecting data through a REST API.
Properties
- Address: Url and the Url Parameters for the REST API endpoint
- Url: The target URL of the REST endpoint
- Parameters: Url parameters of the REST API call. Use { and } to bind them to execution context Parameters.
- Selector: Selector of the REST API
- Headers: Header of the REST API
- Verb: Method to call the API (GET, POST, PUT, DELETE, PATCH, HEAD, CONNECT, OPTIONS, TRACE)
- Body: Expression as the Body payload to be sent by the REST call
- Authorization: Credential of the API
- Username: The username for the service authorization header
- Password: Password for the service authorization header
- Token: Access token of the client to communicate to a service endpoint
- Results
- Multiple: True selects multiple results (multiple objects)
- Result Path: Property’s path expression
- Copy Value To: Refers to a Variable parameter that the call result will be stored into it
In this example, A set of data will be retrieved through a given REST API and store in result variable parameter.
Properties
- Url: http://services.groupkt.com/state/get/IND/all
- Verb: GET
- Multiple: True
- Copy Value To: result
Internal Commands
Header
This command sets the headers of the request by using Param with name and value.
<Header> <Param name="..." value="..." /> <Param name="..." value="..." /> ... </Header>
Monad
The monad name must be select and allows to select specific attributes from the result and map them accordingly.
<Monad localName="" name="select"> <Param name="..." value="..." /> <Param name="..." value="..." /> ... </Monad>
Sample
<Activity name="Activity2"> <CallREST url="https://ap2.salesforce.com/services/data/v20.0/query/?q={soql}" verb="GET" return="leads" resultPath="records" bearerToken="{token.access_token}"> <Header> <Param name="accept" value="application/json" /> <Param name="Content-Type" value="applcation/json" /> </Header> <Monad localName="" name="select"> <Param name="Name" value="FirstName" /> <Param name="Family" value="LastName" /> <Param name="Email" value="Email" /> <Param name="Country" value="Country" /> <Param name="Company" value="Company" /> </Monad> </CallREST> <Transition name="Transition9" to="End1" /> </Activity>
File
This node allows the loading of different files (text, binary, lines, XML and JSON) from a location.
See Reading Files and Files to know more about reading files.
This tool can be used to retrieve a content of a file. The location can be a static address or a dynamic and be resolved at runtime.
Properties
- Type: File type
- Text
- Lines
- Binary
- JSON
- XML
- Return: Name of the veriable parameter to store retreieved file content
- Uri: File path
- Dynamic Uri: Specify whether the Uri is predefined or dynamically taken at runtime
- True
- False
- uri
- Description: Fixed/static path to a file path (location)
- Mandatory: No
- Type: String (path of a file)
- uri-ref
- Description: A parameter that has the path value to a file location. This is an expression that is
evaluated at runtime. - Mandatory: No
- Type: Expression
- Description: A parameter that has the path value to a file location. This is an expression that is
Note – only one of uri or uri-ref must be specified.
Data will be retrieved from a file named File.txt and store in a variable parameter, result.
Properties
- Type: Text
- Return: result
- Uri: File.txt
- Dynamic Uri: False
Inside each File command, the source of the file to be retrieved must be specified. The source location can be static or dynamic.
This node has to be a child of File.
Sample
<Activity name="Activity1"> <File return="content"> <FileSource type="Json" uri-ref="path" /> </File> <Transition name="Transition2" to="End1" /> </Activity>
Internet
Send Email
To send emails.
This tool can be used to send emails. It also has the facility to create a list of email addresses.
Properties
- Recipients: List of email addresses
- From
- To
- Cc
- Bcc
- Content: Content of the email
- Body
- Subject
- Html
- Attachments
- Server: Email server details
- Host
- Port
- SSL
- Timeout
- Credential: Server Credential
- User
- Password
An email will be sent from the given From email address to To email address.
Properties
- Recipients
- From: Add your email address
- To: Add a receiver’s email address
- Content
- Body: Message to send
- Subject: Subject of the email
- Server: Email server details
- Credential: Credentials of the server
Tutorial
FTP
Check File Exists
To check whether the file exists in a given FTP server.
The ‘Check File Exists’ tool in toolbox allows you to check the existence of a file on the remote FTP server. This Flow shows how to check if a file already exists on an FTP Server (depending on the result of this Flow, a notification can be generated).
Properties
- FTP Connection: FTP connection details in the format, ftp://<username>:<password>@domain (eg: ftp://testuser:123@127.0.0.1)
- Remote File Address: File path (It should always start with a ‘/’)
- Copy Result To: Copy the result (true if the file exists, false if not) to an output variable.
result will be true if the file exists.
Properties
- FTP Connection: ftp://testuser:@127.0.0.1
- Remote File Address: /FC_Start_example.png
- Copy Result To:result
List File and Folder
List the files and folders in a given FTP server.
List the files and folders of a given location in an FTP server
Properties
- FTP Connection: FTP connection details in the format, ftp://<username>:<password>@domain (eg: ftp://testuser:123@127.0.0.1)
- Remote File Address: File path (It should always start with a ‘/’)
- Copy Result To: Copy the result (true if the file exists, false if not) to an output variable.
List of files and folders will be copied to result variable parameter.
Properties
- FTP Connection: ftp://testuser:@127.0.0.1
- Remote File Address: /
- Copy Result To: result
List File and Folder result
Download
Allow the download of files from a given FTP server.
Properties
- FTP Connection: FTP connection details in the format, ftp://<username>:<password>@domain (eg: ftp://testuser:123@127.0.0.1)
- Remote File Address: File path (It should always start with a ‘/’)
- Save File Locally As: Local file path and name to same the downloaded file
- Copy Result To: Copy the result (true if the file exists, false if not) to an output variable.
- File will be downloaded to the given path
- File details will be copied to result variable
Properties
- FTP Connection: ftp://testuser:@127.0.0.1
- Remote File Address: /1.txt
- Save File Locally As: copied_1.txt
- Copy Result To:result
Downloaded file details
Upload
Allow the upload of files to a given FTP server.
Properties
- FTP Connection: FTP connection details in the format, ftp://<username>:<password>@domain (eg: ftp://testuser:123@127.0.0.1)
- Local File Address: Local file path and name that requires to be uploaded
- Save File Remotely As: Remote file path and address (It should always start with a ‘/’)
- Copy Result To: Copy the result (true if the file exists, false if not) to an output variable.
- File will be uploaded to the given path in the server
- File details will be copied to result variable
Properties
- FTP Connection: ftp://testuser:@127.0.0.1
- Local File Address: copied_1.txt
- Save File Remotely As: /1.txt
- Copy Result To:result
Uploaded file details
Processes
Run
To run an executable file
Properties
- Command: File name/ full file path of an executable file or command to execute
- Command Arguments: A string that is passed as the argument of the command
- Copy Result To: Copy the result of the command
- Run a bat file named ‘sample.bat’
Properties
- Command: sample.bat
- Copy Result To: result
List
List the processes currently running on the machine.
Properties
- Copy Result To: Copy the result of the command
- Get a list of currently running processes and copy results to result variable parameter
Properties
- Copy Result To: result
Kill
Allows terminating a running process in the machine with its PID.
Properties
- Process Id: PID or the ID of the running process you want to terminate
- Copy Result To: Copy the result of the command
- Kills a process using a given PID and copy results to result variable parameter
Properties
- Process Id: <PID of the running process you want to kill>
- Copy Result To: result
IO
Files
Write File
Create a file with its content in a given location
Properties
- Path: File name and path to create the file
- Content: File content
- Copy Result To: Copy the result of the command
- Creates a file named test.txt and copy results to result variable parameter
Properties
- Path: pathCombine(pathCurrent(),’SampleFiles\\test.txt’) (Value Type should be Expression for this example)
- Content: test content
- Copy Result To: result
Append File
Append a file with its contents to another given file.
Properties
- Path: File name and path to append the new content
- Content: New file content
- Copy Result To: Copy the result of the command
- Append ‘Appending New Content’ to a file named test.txt and copy results to result variable parameter
Properties
- Path: pathCombine(pathCurrent(),’SampleFiles\\test.txt’) (Value Type should be Expression for this example)
- Content: Appending New Content
- Copy Result To: result
File Exists Check
Check whether the file exists in a given location
The ‘Check File Exists’ tool in toolbox allows you to check the existence of a file on the remote FTP server. This Flow shows how to check if a file already exists on an FTP Server (depending on the result of this Flow, a notification can be generated).
Properties
- FTP Connection: FTP connection details in the format, ftp://<username>:<password>@domain (eg: ftp://testuser:123@127.0.0.1)
- Remote File Address: File path (It should always start with a ‘/’)
- Copy Result To: Copy the result (true if the file exists, false if not) to an output variable.
result will be true if the file exists.
Properties
- FTP Connection: ftp://testuser:@127.0.0.1
- Remote File Address: /FC_Start_example.png
- Copy Result To:result
Delete File
Delete a given file.
Properties
- Path: File name and path to delete
- Copy Result To: Copy the result of the command
- Delete a file named test.txt and copy results to result variable parameter
Properties
- Path: pathCombine(pathCurrent(),’SampleFiles\\test.txt’) (Value Type should be Expression for this example)
- Copy Result To: result
Folders
Create Folder
Create a folder in a given location.
Properties
- Path: Full path of the folder to be created
- Copy Result To: Copy the result of the command
- Creates a folder named NewFolder and copy results to result variable parameter
Properties
- Path: pathCombine(pathCurrent(),’SampleFiles\\NewFolder’) (Value Type should be Expression for this example)
- Copy Result To: result
Folder Exists Check
Check whether the folder exists in a given location.
Properties
- Path: Full path of the folder to check
- Copy Result To: Copy the result of the command
- Checks whether a folder named NewFolder exists and copy true or false to result variable parameter
Properties
- Path: pathCombine(pathCurrent(),’SampleFiles\\NewFolder’) (Value Type should be Expression for this example)
- Copy Result To: result
Current Folder
Get the path of the current folder
Properties
- Copy Result To: Copy the current folder path
- Gets the current folder location and copy the path to result variable parameter
Properties
- Copy Result To: result