Skip to content
Alexey O. Shigarov edited this page Dec 15, 2018 · 10 revisions

Usage

Use the following command to run TabbyXL:

java -jar TabbyXL.jar <params>

Params:
-input <path>                      specify a path to an input excel workbook (*.xlsx)
-sheets <sheet indexes>            specify sheet indexes in the input excel workbook (e.g. "0-2,4,5,7-10")
-ruleset <path>                    specify a path to a ruleset file (e.g. *.crl (CRL), *.drl or *.dslr (Drools), or *.clp (Jess))
-categorySpec <path>               specify a path to a directory with category specifications in YAML files (*.cat)
-output <path>                     specify a path to a directory for outputting results
-ignoreSuperscript <true|false>    specify true to ignore superscript text in cells (false used by default)
-useCellText <true|false>          specify true to use cell values as text (false used by default)
-useShortNames <true|false>        specify true to use short names (just sheet names) for output files (false used by default)
-debuggingMode <true|false>        specify true to turn on debugging mode (false used by default)
-ruleEngineConfig <path>           specify optionally a path to a configuration file (*.properties) of a rule engine you prefer to use (e.g. Drools, Jess)
                                   (CRL-to-Java translation is used by default instead of a rule engine)
-help                              print this usage

Only two parameters are mandatory

  • -input <path>
  • -ruleset <path>

We recommend you to use JDK 8 or more

Run with CRL2J

Do not specify -ruleEngineConfig param if you choose to use CRL2J option.

Note that, with this option, you should run java included in JDK, not JRE. Otherwise, you get the following message:

Exception in thread "main" java.lang.IllegalStateException
        at ru.icc.td.tabbyxl.crl2j.compiler.CharSequenceCompiler.<init>(CharSequenceCompiler.java:44)
        at ru.icc.td.tabbyxl.crl2j.RuleCodeGen.compileAllRules(RuleCodeGen.java:38)
        at ru.icc.td.tabbyxl.TabbyXL.loadCRL2J(TabbyXL.java:638)
        at ru.icc.td.tabbyxl.TabbyXL.runRulesetWithCRL2J(TabbyXL.java:648)
        at ru.icc.td.tabbyxl.TabbyXL.main(TabbyXL.java:487)

If you see this message, then, please, check that you run java included in JDK. You also can try to use %JAVA_HOME%/bin/java instead of java.

Run with Drools-DSL

Create the configuration file (drools-dsl.properties) with Drools-DSL settings as follows:

RULE_SERVICE_PROVIDER = http://drools.org/
RULE_SERVICE_PROVIDER_IMPL = org.drools.jsr94.rules.RuleServiceProviderImpl
SOURCE = dslr
DSL = <specify the path to crl2.dsl file>

Note that the configuration file contains the path to the DSL-specification of CRL-dialect in DSL attribute. Make sure that this path is correct.

Specify the path to this configuration file in -ruleEngineConfig param to run the rule execution with Drools-DSL.

Run with Drools

Create the configuration file (drools.properties) with Drools settings as follows:

RULE_SERVICE_PROVIDER = http://drools.org/
RULE_SERVICE_PROVIDER_IMPL = org.drools.jsr94.rules.RuleServiceProviderImpl
SOURCE = drl

Specify the path to this configuration file in -ruleEngineConfig param to run the rule execution with Drools.

Run with Jess

Install Jess firstly. Download it from the official site. Unpack the library file jess.jar from the downloaded archive (Jess71p2.zip) and into a directory.

Create the configuration file (jess.properties) with Jess settings as follows:

RULE_SERVICE_PROVIDER = jess.jsr94
RULE_SERVICE_PROVIDER_IMPL = jess.jsr94.RuleServiceProviderImpl
SOURCE = clp

Specify the path to this configuration file in -ruleEngineConfig param to run the rule execution with Jess.

Note that you also need to specify the path to jess.jar file in -cp as follows on Linux:

java -cp <specify the path to jess.jar file>:TabbyXL.jar <params>

or on Windows:

java -cp <specify the path to jess.jar file>;TabbyXL.jar <params>
```*
Clone this wiki locally