config.setOption( TimerJobFactoryOption.get(TimerJobFactoryType.JPA.getId()) );
config.setOption( TimerJobFactoryOption.get(TimerJobFactoryType.JPA.getId()) );
private KieSession marsallStatefulKnowledgeSession(KieSession ksession) throws IOException, ClassNotFoundException { Globals globals = ksession.getGlobals(); KieBase kbase = ksession.getKieBase(); ByteArrayOutputStream out = new ByteArrayOutputStream(); MarshallerFactory.newMarshaller( kbase ).marshall( out, ksession ); KieSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(); ksconf.setOption( TimerJobFactoryOption.get("trackable") ); ksconf.setOption( ClockTypeOption.get( "pseudo" ) ); Environment env = EnvironmentFactory.newEnvironment(); env.set( EnvironmentName.GLOBALS, globals ); ksession = MarshallerFactory.newMarshaller( kbase ).unmarshall( new ByteArrayInputStream( out.toByteArray() ), ksconf, env ); return ksession; }
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = createKnowledgeSession(kbase, ksconf);
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = kBase.newKieSession( ksconf, null );
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = kBase.newKieSession( ksconf, null );
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = createKnowledgeSession(kbase, ksconf);
private KieSessionConfiguration mergeConfig(KieSessionConfiguration configuration) { KieSessionConfiguration merged = ((SessionConfiguration) configuration).addDefaultProperties( configProps ); merged.setOption(TimerJobFactoryOption.get("jpa")); return merged; }
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = kBase.newKieSession( ksconf, null );
ksconf.setOption( ClockTypeOption.get( ClockType.PSEUDO_CLOCK.getId() ) ); ksconf.setOption( TimedRuleExecutionOption.YES ); ksconf.setOption(TimerJobFactoryOption.get("trackable")); ksconf.setOption(ClockTypeOption.get("pseudo"));
return TimerJobFactoryOption.get(legacyOption.getTimerJobType());
private KieSession marsallStatefulKnowledgeSession(KieSession ksession) throws IOException, ClassNotFoundException { Globals globals = ksession.getGlobals(); KieBase kbase = ksession.getKieBase(); ByteArrayOutputStream out = new ByteArrayOutputStream(); MarshallerFactory.newMarshaller( kbase ).marshall( out, ksession ); KieSessionConfiguration ksconf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(); ksconf.setOption( TimerJobFactoryOption.get("trackable") ); ksconf.setOption( ClockTypeOption.get( "pseudo" ) ); Environment env = EnvironmentFactory.newEnvironment(); env.set( EnvironmentName.GLOBALS, globals ); ksession = MarshallerFactory.newMarshaller( kbase ).unmarshall( new ByteArrayInputStream( out.toByteArray() ), ksconf, env ); return ksession; }
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = kBase.newStatefulKnowledgeSession( ksconf, null );
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = createKnowledgeSession(kbase, ksconf);
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = kBase.newStatefulKnowledgeSession( ksconf, null );
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = createKnowledgeSession(kbase, ksconf);
ksconf.setOption( TimerJobFactoryOption.get("trackable") ); KieSession ksession = kBase.newStatefulKnowledgeSession( ksconf, null );