public Object getObject() throws Exception { return new KnowledgeStoreServiceImpl(); }
protected void setDefaultImplementations() { setCommandServiceClass( PersistableRunner.class ); setProcessInstanceManagerFactoryClass( "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory" ); setWorkItemManagerFactoryClass( JPAWorkItemManagerFactory.class ); setProcessSignalManagerFactoryClass( "org.jbpm.persistence.processinstance.JPASignalManagerFactory" ); }
public KnowledgeStoreServiceImpl() { setDefaultImplementations(); }
public StatefulKnowledgeSession newKieSession(KieBase kbase, KieSessionConfiguration configuration, Environment environment) { if ( configuration == null ) { configuration = SessionConfiguration.newInstance(); } if ( environment == null ) { throw new IllegalArgumentException( "Environment cannot be null" ); } ExecutableRunner runner = (ExecutableRunner) buildCommandService( kbase, mergeConfig( configuration ), environment ); return new CommandBasedStatefulKnowledgeSession( runner ); }
private CommandExecutor buildCommandService(Long sessionId, KieBase kbase, KieSessionConfiguration conf, Environment env) { try { Class< ? extends CommandExecutor> serviceClass = getCommandServiceClass(); Constructor< ? extends CommandExecutor> constructor = serviceClass.getConstructor( Long.class, KieBase.class, KieSessionConfiguration.class, Environment.class ); return constructor.newInstance( sessionId, kbase, conf, env ); } catch ( SecurityException e ) { throw new IllegalStateException( e ); } catch ( NoSuchMethodException e ) { throw new IllegalStateException( e ); } catch ( IllegalArgumentException e ) { throw new IllegalStateException( e ); } catch ( InstantiationException e ) { throw new IllegalStateException( e ); } catch ( IllegalAccessException e ) { throw new IllegalStateException( e ); } catch ( InvocationTargetException e ) { throw new IllegalStateException( e ); } }
public StatefulKnowledgeSession loadKieSession(int id, KieBase kbase, KieSessionConfiguration configuration, Environment environment) { if ( configuration == null ) { configuration = SessionConfiguration.newInstance(); } if ( environment == null ) { throw new IllegalArgumentException( "Environment cannot be null" ); } ExecutableRunner runner = (ExecutableRunner) buildCommandService( new Long( id), kbase, mergeConfig( configuration ), environment ); return new CommandBasedStatefulKnowledgeSession( runner ); }
private CommandExecutor buildCommandService(KieBase kbase, KieSessionConfiguration conf, Environment env) { Class< ? extends CommandExecutor> serviceClass = getCommandServiceClass(); try { Constructor< ? extends CommandExecutor> constructor = serviceClass.getConstructor( KieBase.class, KieSessionConfiguration.class, Environment.class ); return constructor.newInstance( kbase, conf, env ); } catch ( SecurityException e ) { throw new IllegalStateException( e ); } catch ( NoSuchMethodException e ) { throw new IllegalStateException( e ); } catch ( IllegalArgumentException e ) { throw new IllegalStateException( e ); } catch ( InstantiationException e ) { throw new IllegalStateException( e ); } catch ( IllegalAccessException e ) { throw new IllegalStateException( e ); } catch ( InvocationTargetException e ) { throw new IllegalStateException( e ); } }
public static KieStoreServices createKieStore() throws Exception { return new KnowledgeStoreServiceImpl(); }
public StatefulKnowledgeSession loadKieSession(Long id, KieBase kbase, KieSessionConfiguration configuration, Environment environment) { if ( configuration == null ) { configuration = SessionConfiguration.newInstance(); } if ( environment == null ) { throw new IllegalArgumentException( "Environment cannot be null" ); } ExecutableRunner runner = (ExecutableRunner) buildCommandService( id, kbase, mergeConfig( configuration ), environment ); return new CommandBasedStatefulKnowledgeSession( runner ); }
public Object getObject() throws Exception { return new KnowledgeStoreServiceImpl(); }
public Object getObject() throws Exception { return new KnowledgeStoreServiceImpl(); }
public Object getObject() throws Exception { return new KnowledgeStoreServiceImpl(); }
public Object getObject() throws Exception { return new KnowledgeStoreServiceImpl(); }
public static KieStoreServices createKieStore() throws Exception { return new KnowledgeStoreServiceImpl(); }