Package org.kie.api.runtime.manager

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


        Properties auth = new Properties();
        auth.setProperty("max", "Standard");

        UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(auth);

        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault()
                .entityManagerFactory(emf)
                .userGroupCallback(userGroupCallback)
                .addAsset(ResourceFactory.newClassPathResource("jbpm/processes/sample1.bpmn2"), ResourceType.BPMN2)
                .addEnvironmentEntry(EnvironmentName.TRANSACTION_MANAGER, aptm)
                .get();
View Full Code Here


    }

    @Test
    public void testJbpmRuntimeManager() {
        refresh();
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newEmptyBuilder()
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
            .get();
        RuntimeManager runtimeManager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
View Full Code Here

        props.setProperty("krisv", "IT");
        props.setProperty("john", "HR");
        props.setProperty("mary", "PM");
        EntityManagerFactory emf = (EntityManagerFactory) applicationContext.getBean("myEmf");
        PlatformTransactionManager txManager = (PlatformTransactionManager) applicationContext.getBean("txManager");
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder()
          .entityManagerFactory(emf)
          .addEnvironmentEntry(EnvironmentName.TRANSACTION_MANAGER, txManager)
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
View Full Code Here

public class KieRuntimeManagerFactoryBean {

    public static Object createRuntime(String type, String asset, String assetType){

        RuntimeEnvironmentBuilder builder;
        RuntimeEnvironment environment;
        RuntimeManager manager;

        if ("empty".equalsIgnoreCase(type)) {
            builder = RuntimeEnvironmentBuilder.Factory.get().newEmptyBuilder();
        } else if ("default".equalsIgnoreCase(type)) {
View Full Code Here

    }

    @Test
    public void testJbpmRuntimeManager() {
        refresh();
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newEmptyBuilder()
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
            .get();
        RuntimeManager runtimeManager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
View Full Code Here

        props.setProperty("krisv", "IT");
        props.setProperty("john", "HR");
        props.setProperty("mary", "PM");
        EntityManagerFactory emf = (EntityManagerFactory) applicationContext.getBean("myEmf");
        PlatformTransactionManager txManager = (PlatformTransactionManager) applicationContext.getBean("txManager");
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder()
          .entityManagerFactory(emf)
          .addEnvironmentEntry(EnvironmentName.TRANSACTION_MANAGER, txManager)
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
View Full Code Here

        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

    }

    @Test
    public void testJbpmRuntimeManager() {
        refresh();
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newEmptyBuilder()
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
            .get();
        RuntimeManager runtimeManager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
View Full Code Here

        props.setProperty("krisv", "IT");
        props.setProperty("john", "HR");
        props.setProperty("mary", "PM");
        EntityManagerFactory emf = (EntityManagerFactory) applicationContext.getBean("myEmf");
        PlatformTransactionManager txManager = (PlatformTransactionManager) applicationContext.getBean("txManager");
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder()
          .entityManagerFactory(emf)
          .addEnvironmentEntry(EnvironmentName.TRANSACTION_MANAGER, txManager)
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
View Full Code Here

    }
   
    @Test
    public void testJbpmRuntimeManager() {
        refresh();
        RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newEmptyBuilder()
            .addAsset(
            KieServices.Factory.get().getResources().newClassPathResource(
            "Evaluation.bpmn",getClass().getClassLoader()), ResourceType.BPMN2)
            .get();
        RuntimeManager runtimeManager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
View Full Code Here

TOP

Related Classes of org.kie.api.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.