Package org.kie.internal.runtime.manager

Examples of org.kie.internal.runtime.manager.RuntimeEnvironment


        runtimeManager.disposeRuntimeEngine(runtimeEngine);
        runtimeManager.close();
    }

    private static RuntimeManager getRuntimeManager(String process) {
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getEmpty()
                .addAsset(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2)
                .get();
        return RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
    }
View Full Code Here


            final String deploymentId = getDeploymentId();
            final RuntimeManagerRegistry runtimeManagerRegistry = RuntimeManagerRegistry.get();
            if (runtimeManagerRegistry.isRegistered(deploymentId)) {
                runtimeManagerRegistry.remove(deploymentId);
            }
            RuntimeEnvironment runtimeEnvironment = new BPMRuntimeEnvironment(session.getStateful(), _entityManagerFactory, _userGroupCallback, getLoader());
            AbstractRuntimeManager runtimeManager = new AbstractRuntimeManager(runtimeEnvironment, deploymentId) {
                private RuntimeEngineImpl _runtimeEngine = null;
                @Override
                public void init() {
                    _runtimeEngine = new RuntimeEngineImpl(kieSession, _taskService) {
View Full Code Here

    /**
     * Initializes process engine by creating <code>RuntimeEngine</code> instance will all assets deployed.
     */
    public void init() {
        if (runtimeManager == null) {
            RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault()
                    .entityManagerFactory(Persistence.createEntityManagerFactory("org.jbpm.sample"))
                    .userGroupCallback(new JBossUserGroupCallbackImpl("classpath:/usergroup.properties"))               
                    .addAsset(ResourceFactory.newClassPathResource("customtask.bpmn"), ResourceType.BPMN2)
                    .addAsset(ResourceFactory.newClassPathResource("humanTask.bpmn"), ResourceType.BPMN2)
                    .get();
            // this way you can add mode work item handlers to the default registerable items factory
            // Alternatively you can add your own implementation of RegisterableItemsFactory
            ((SimpleRegisterableItemsFactory)environment.getRegisterableItemsFactory()).addWorkItemHandler("Log", SystemOutWorkItemHandler.class);
            runtimeManager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
        }
    }
View Full Code Here

TOP

Related Classes of org.kie.internal.runtime.manager.RuntimeEnvironment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.