Publish through CLI

◷ Reading Time: 4 minutes

Publish command will run a process of selecting specific documents from a FlexRule project and copying them to a specific destination. Publish command requires the below settings:

fr.exe publish --project <value>  -- method <value>  --destination <value>   --includeAssemblies <value> --runtime <value>  --logic|profile <value> --packageidentifier <value> --packageversion <value> --serviceversion <value> 
  • project: This is path to the project file existing on your local computer. The extension of the project file is .frpj located inside a folder containing all of the project artifacts.
  • method: The <value> can be either Folder or Package. If the method is Folder, the publish will copy all the documents into a destination folder. If the method is Package, the publish will create a Deployment Package file (.frdp) in the destination folder.
  • destination: This is the target destination file or folder. Depends on the method of the publish command. If the publish –method is set to Folder, the destination must be an existing folder where publish will copy the documents into. If the publish –method is set to Package, the destination is the path to .frdp file where the path to the .frdp file must exist.
  • includeAssemblies: The can be either True or False. This specifies whether or not to copy all the assemblies in the bin folder of the project to the destination.
  • runtime: This specifies the location where FlexRule Runtime is installed.

The publish process can be based on a Publish Profile or a Logic document.

  • profile: The <value> specifies the name of Publish Profile document. Do not include the path to the file. It is the relative address based on what –project specifies.
  • logic: The <value> specifies the path to the Logic document. e.g. Flow, Workflow, DecisionGraph and etc. Do not include the path to the file. It is the relative address based on what –project specifies.

The below settings will specify the package information. They are needed if –method is set to Package. All the below settings are required when the –method is set to Package.

  • packageidentifier: To specify the Package Identifier.
  • packageversion: To specify the Package Version.
  • serviceversion: To specify the Service Version.

You can also use help function as a guide.

fr.exe --help publish

Examples

Publish Profile (method:package):

fr.exe publish --project "D:\Repo\Publish-Profile-with-Delivery-Cost-Calculator\Delivery Cost Calculator.frpj" --method package --destination "D:\Testing\Publish profile\NewProfile.frdp" --includeAssemblies True --runtime "C:\Users\<user-name>\Documents\.flexrule\9.0.201" --profile "Profile.xml" --packageidentifier "DeliveryCost" --packageversion "1" --serviceversion "1"

Publish Logic Document (method:package):

fr.exe publish --project "D:\Repo\Publish-Profile-with-Delivery-Cost-Calculator\Delivery Cost Calculator.frpj" --method package --destination "D:\Testing\Publish profile\DeliveryCost.frdp" --includeAssemblies True --runtime "C:\Users\<user-name>\Documents\.flexrule\9.0.201" --logic "Calculator.xml" --packageidentifier "DeliveryCost" --packageversion "1" --serviceversion "1"

Publish Profile (method:Folder):

fr.exe publish --project "D:\Repo\Publish-Profile-with-Delivery-Cost-Calculator\Delivery Cost Calculator.frpj" --method Folder --destination "D:\Testing\Publish profile" --includeAssemblies True --runtime "C:\Users\<user-name>\Documents\.flexrule\9.0.201" --profile "Profile.xml" 

Publish Logic Document (method:Folder):

fr.exe publish --project "D:\Repo\Publish-Profile-with-Delivery-Cost-Calculator\Delivery Cost Calculator.frpj" --method Folder --destination "D:\Testing\Publish profile" --includeAssemblies True --runtime "C:\Users\<user-name>\Documents\.flexrule\9.0.201" --logic "Calculator.xml" 
Updated on December 2, 2022

Was this article helpful?

Related Articles