Runner in Command-line

◷ Reading Time: 4 minutes

You can use the command-line Runner to run your projects. Thre are two ways you can run your project.

  1. Without creating a package file (.frdp)
  2. With the package file

For both ways, first, you will need Runner installed. If Runner has not already been installed then it can be downloaded and installed from My Portal.

Once installed, navigate to the Runner folder. Unless the file path was changed at install, by default the Runner can be found here:

C:\Users\[USER FOLDER]\AppData\Local\Programs\FlexRule

1. Open Command Prompt.

2. In Command prompt navigate to the Runner Bin folder, for example:

cd C:\Users\[USER FOLDER]\AppData\Local\Programs\FlexRule\Runner
\[x.x.xxx]\Bin

Without creating a package file

You can run the project without building a package file. You simply have to direct the Runner to run the project you built using FlexRule Designer.

Use the following command.

FlexRule.Runner.exe /home <project folder> /logic <logic file> /runtime <runtime folder> /license <runtime license file path> /output <channel>

For example:

Try the example attached at the end of this page, DeliveryCostCalculator.zip.

FlexRule.Runner.exe /home "C:\Users\[USERFOLDER]\Documents\FlexRule\Projects\Delivery Cost Calculator" /logic "Calculator.xml" /param "parcel weight":45 /runtime "C:\Users\[USERFOLDER]\Documents\.flexrule\9.1.131" /license "C:\Users\[USERFOLDER]\AppData\Local\FlexRule\Runtime License\flexrule.license.lic" /output console

With a package file

If you have the package file (.frdp), that you built using the Designer, you can directly run it.

Use the following command.

FlexRule.Runner.exe /runtime <runtime folder> /license <runtime license file path> /logic <logic file>

For example:

Try the example attached at the end of this page, SupplierAssessmentPackage.zip.

FlexRule.Runner.exe /logic "C:\Users\user\Desktop\SupplierAssessmentPackage\SupplierAssessment.frdp"  /inputFile "D:\SamplePackages\eligible-supplier.jc.json" /runtime "C:\Users\user\Documents.flexrule\8.0.298" /license "C:\Users\user\Documents.flexrule\flexrule.license.lic" 

Arguments

Mandatory arguments

  • /runtime: Points to FlexRule Runtime installed folder.
  • /license: Points to FlexRule Runtime license file.
  • /logic: Specifies the main logic to run.
  • /home: Directory of the logic file. This is mandatory only when you run without the package file.

Optional arguments

  • /param: To specify the value of the input parameter of a logic.
    Use /param name: <value> where name is the parameter name and value is the parameter value.
    Eg: /param position:'developer' /param emailAddress:'email@gmail.com' /param password:'password'
  • /showElapsed: Displays the total elapsed time once the execution is finished.
  • /extension: Add extension assembly (DLL) file name.
    Eg: /extension FlexRule.Extensions.MailBox.dll
  • /output: Writes the value of the output parameters on the ‘console’ or a file.
  • /log: Enables the output of Log on the ‘console’ or a file.
  • /notification: Enables the output of notifications on the ‘console’ or a file.
  • /inputFile: Input JSON file

To see command-line help FlexRule.Runner.exe /?

Updated on December 8, 2023

Article Attachments

Was this article helpful?

Related Articles