# 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

  1. Log in to Nimbus

  2. Click on Rules on the left hand menu

  3. Locate the rule you want to download

  4. Click the download icon

# Importing a rule

If you have been provided a rule package to import, perform the following steps;

  1. Log in to Nimbus

  2. Click on Rules on the left hand menu

  3. Click the Upload Rule button at the top of the screen

  4. Click Browse\Choose File and select the package file

  5. Click Upload

# Creating a rule

  1. Log in to Nimbus

  2. Click on Rules on the left hand menu

  3. Click the New Rule button at the top of the screen

  4. Enter a rule name that identifies this rule

  5. (Optional) Enter a rule description to provide additional information about this rule

  6. (Optional) Tick the interval that you would like this rule triggered at

  7. (Optional) Tick the Enable Rule checkbox

  8. Click the Globals tab

  9. (Optional) Add the applicable using statements for your rule, note you can come back and do this later

  10. (Optional) Add the global variables required for your rule, note you can come back and do this later

  11. Click the Definition tab

  12. Add the code for your rule into the code area

  13. Click the Test tab

  14. (Optional) Add unit tests for your rule

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

  1. Log in to Nimbus

  2. Click on Rules on the left hand menu

  3. Locate the rule you want to apply the SDK for

  4. Click the pencil icon

  5. Click the SDKs button at the top of the screen

  6. A window will appear showing the SDKs that have been uploaded previously

  7. Click Upload at the bottom of the window

  8. Click Browse\Choose File and select the SDK you want to use

  9. Click Upload

# Running unit tests

  1. Log in to Nimbus

  2. Click on Rules on the left hand menu

  3. Locate the rule you want to run the tests for

  4. Click the test tube icon to run the tests

  5. Wait for the tests to run (this will take some time, depending on the test complexity)

  6. A window will be displayed with the test results

# Viewing rule execution history

  1. Log in to Nimbus

  2. Click on Rules on the left hand menu

  3. Locate the rule you want to view the history for

  4. Click the clock icon with the arrow around it

  5. You will be taken to a page with the execution history

# Deleting a rule

  1. Log in to Nimbus

  2. Click on Rules on the left hand menu

  3. Locate the rule you want to delete

  4. Click trash can

  5. Confirm you want to delete the rule by clicking OK