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 have to go to the Runner folder.

1. Open Command Prompt.

2. Navigate to the Runner folder.

cd C:\Program Files (x86)\Pliant Framework\FlexRule Runner\8.0.217\Bin

It is not required to install the Runner separately. If you have installed the Designer, by default, the Runner will be installed in the same folder. You can go to that folder as well.

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> 

For example:

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

FlexRule.Runner.exe /home "C:\Users\user\Desktop\license\DeliveryCostCalclator\DeliveryCostCalculator" /logic "Calculator.xml" /param "parcel weight":45 /runtime "C:\Users\user\Documents.flexrule\8.0.298" /license "C:\Users\user\Documents.flexrule\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 June 1, 2020

Article Attachments

Was this article helpful?

Related Articles