# Rules
Rules are pieces of code that can be run at specific times during a transfer. These may be used for generating notifications, sending acknowledgement confirmations, forwarding a file or many many other uses.
A rule is a small C# program that is created in the Nimbus user interface. A rule can be unit tested.
TIP
Rules should be written by an experience software developer. Nimbus support can assist you in writing rules if required.
WARNING
Rules may cause harm to your computer. Rules should be reviewed and run with caution.
# When can a rule run?
Rules can be run at the following intervals;
- Outbound Start - When your Nimbus installation starts sending a file
- Outbound End - Once your Nimbus installation has finished sending a file
- Inbound Start - When your Nimbus installation starts receiving a file
- Inbound End - Once your Nimbus installation has finished receiving a file
- Lite Account Inbound Start - When Nimbus starts receiving a file from a lite account
- Lite Account Inbound End - When Nimbus finishes receiving a file from a lite account
# Downloading a rule
Log in to Nimbus
Click on Rules on the left hand menu
Locate the rule you want to download
Click the download icon
# Importing a rule
If you have been provided a rule package to import, perform the following steps;
Log in to Nimbus
Click on Rules on the left hand menu
Click the Upload Rule button at the top of the screen
Click Browse\Choose File and select the package file
Click Upload
# Creating a rule
Log in to Nimbus
Click on Rules on the left hand menu
Click the New Rule button at the top of the screen
Enter a rule name that identifies this rule
(Optional) Enter a rule description to provide additional information about this rule
(Optional) Tick the interval that you would like this rule triggered at
(Optional) Tick the Enable Rule checkbox
Click the Globals tab
(Optional) Add the applicable using statements for your rule, note you can come back and do this later
(Optional) Add the global variables required for your rule, note you can come back and do this later
Click the Definition tab
Add the code for your rule into the code area
Click the Test tab
(Optional) Add unit tests for your rule
Click Save
# Uploading a software development kit (SDK)
WARNING
Only SDKs provided by Nimbus support can be used. If you have a SDK that you require, please let us know.
Log in to Nimbus
Click on Rules on the left hand menu
Locate the rule you want to apply the SDK for
Click the pencil icon
Click the SDKs button at the top of the screen
A window will appear showing the SDKs that have been uploaded previously
Click Upload at the bottom of the window
Click Browse\Choose File and select the SDK you want to use
Click Upload
# Running unit tests
Log in to Nimbus
Click on Rules on the left hand menu
Locate the rule you want to run the tests for
Click the test tube icon to run the tests
Wait for the tests to run (this will take some time, depending on the test complexity)
A window will be displayed with the test results
# Viewing rule execution history
Log in to Nimbus
Click on Rules on the left hand menu
Locate the rule you want to view the history for
Click the clock icon with the arrow around it
You will be taken to a page with the execution history
# Deleting a rule
Log in to Nimbus
Click on Rules on the left hand menu
Locate the rule you want to delete
Click trash can
Confirm you want to delete the rule by clicking OK
← Profile Health Check →