public class ScenarioRunner extends Object
Constructor and Description |
---|
ScenarioRunner(org.kie.api.runtime.KieSession ksession)
This constructor is normally used by Guvnor for running tests on a users
request.
|
ScenarioRunner(org.kie.api.runtime.KieSession ksession,
int maximumAmountOfRuleFirings) |
public ScenarioRunner(org.kie.api.runtime.KieSession ksession) throws ClassNotFoundException
ksession
- A populated type resolved to be used to resolve the types in
the scenario.
For info on how to invoke this, see
ContentPackageAssemblerTest.testPackageWithRuleflow in
guvnor-webapp This requires that the classloader for the
thread context be set appropriately. The PackageBuilder can
provide a suitable TypeResolver for a given package header,
and the Package config can provide a classloader.ClassNotFoundException
public ScenarioRunner(org.kie.api.runtime.KieSession ksession, int maximumAmountOfRuleFirings) throws ClassNotFoundException
ksession
- A populated type resolved to be used to resolve the types in
the scenario.maximumAmountOfRuleFirings
- Limit for amount of rules that can fire. To prevent infinite loops.ClassNotFoundException
public void run(Scenario scenario) throws ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException, InvalidClockTypeException
Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.