本文整理汇总了Java中org.kie.internal.runtime.manager.RuntimeEnvironment类的典型用法代码示例。如果您正苦于以下问题:Java RuntimeEnvironment类的具体用法?Java RuntimeEnvironment怎么用?Java RuntimeEnvironment使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RuntimeEnvironment类属于org.kie.internal.runtime.manager包,在下文中一共展示了RuntimeEnvironment类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRuntimeManager
import org.kie.internal.runtime.manager.RuntimeEnvironment; //导入依赖的package包/类
private RuntimeManager getRuntimeManager(KieBase kbase) {
// load up the knowledge base
JBPMHelper.startH2Server();
JBPMHelper.setupDataSource();
Properties properties= new Properties();
properties.setProperty(TASK_USER, TASK_GROUP);
UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties);
RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault()
.userGroupCallback(userGroupCallback)
.knowledgeBase(kbase)
.get();
RuntimeManagerFactoryImpl factory = new RuntimeManagerFactoryImpl();
return factory.newSingletonRuntimeManager(environment);
}
示例2: getRuntimeManager
import org.kie.internal.runtime.manager.RuntimeEnvironment; //导入依赖的package包/类
private RuntimeManager getRuntimeManager(String process) {
// load up the knowledge base
JBPMHelper.startH2Server();
JBPMHelper.setupDataSource();
Properties properties= new Properties();
properties.setProperty(USER, GROUP);
UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties);
RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault()
.userGroupCallback(userGroupCallback)
.addAsset(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2)
.get();
RuntimeManagerFactoryImpl factory = new RuntimeManagerFactoryImpl();
return factory.newSingletonRuntimeManager(environment);
}
示例3: get
import org.kie.internal.runtime.manager.RuntimeEnvironment; //导入依赖的package包/类
/**
* Inits and returns the RuntimeEnvironment.
* @return the RuntimeEnvironment
*/
public RuntimeEnvironment get() {
_runtimeEnvironment.init();
return _runtimeEnvironment;
}
示例4: get
import org.kie.internal.runtime.manager.RuntimeEnvironment; //导入依赖的package包/类
/** Inits and returns the RuntimeEnvironment.
*
* @return the RuntimeEnvironment */
public RuntimeEnvironment get() {
_runtimeEnvironment.init();
return _runtimeEnvironment;
}