Package org.jbpm.process.instance.impl.demo

Examples of org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler


    properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");
    KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
    StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);
        new JPAWorkingMemoryDbLogger(session);
        JPAProcessInstanceDbLog log = new JPAProcessInstanceDbLog(env);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
        long processInstanceId = session.startProcess("com.sample.ruleflow").getId();
       
        System.out.println("Checking process instances for process 'com.sample.ruleflow'");
View Full Code Here


    properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");
    KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
    StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);
        new JPAWorkingMemoryDbLogger(session);
        JPAProcessInstanceDbLog log = new JPAProcessInstanceDbLog(env);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
        session.startProcess("com.sample.ruleflow");
        session.startProcess("com.sample.ruleflow");
       
View Full Code Here

    properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");
    KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
    StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);
        new JPAWorkingMemoryDbLogger(session);
        JPAProcessInstanceDbLog log = new JPAProcessInstanceDbLog(env);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
        long processInstanceId = session.startProcess("com.sample.ruleflow2").getId();
       
        System.out.println("Checking process instances for process 'com.sample.ruleflow2'");
View Full Code Here

    properties.put("drools.processInstanceManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
    properties.put("drools.processSignalManagerFactory", "org.jbpm.process.instance.event.DefaultSignalManagerFactory");
    SessionConfiguration config = new SessionConfiguration(properties);
        StatefulSession session = ruleBase.newStatefulSession(config, EnvironmentFactory.newEnvironment());
        new WorkingMemoryDbLogger(session);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
        long processInstanceId = session.startProcess("com.sample.ruleflow").getId();
       
        System.out.println("Checking process instances for process 'com.sample.ruleflow'");
View Full Code Here

    properties.put("drools.processInstanceManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
    properties.put("drools.processSignalManagerFactory", "org.jbpm.process.instance.event.DefaultSignalManagerFactory");
    SessionConfiguration config = new SessionConfiguration(properties);
        StatefulSession session = ruleBase.newStatefulSession(config, EnvironmentFactory.newEnvironment());
        new WorkingMemoryDbLogger(session);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
        session.startProcess("com.sample.ruleflow");
        session.startProcess("com.sample.ruleflow");
       
View Full Code Here

    properties.put("drools.processInstanceManagerFactory", "org.jbpm.process.instance.impl.DefaultProcessInstanceManagerFactory");
    properties.put("drools.processSignalManagerFactory", "org.jbpm.process.instance.event.DefaultSignalManagerFactory");
    SessionConfiguration config = new SessionConfiguration(properties);
        StatefulSession session = ruleBase.newStatefulSession(config, EnvironmentFactory.newEnvironment());
        new WorkingMemoryDbLogger(session);
        session.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());

        // start process instance
        long processInstanceId = session.startProcess("com.sample.ruleflow2").getId();
       
        System.out.println("Checking process instances for process 'com.sample.ruleflow2'");
View Full Code Here

    }

  public void testEvaluationProcess() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-EvaluationProcess.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());
    ksession.getWorkItemManager().registerWorkItemHandler("RegisterRequest", new SystemOutWorkItemHandler());
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("employee", "UserId-12345");
    ProcessInstance processInstance = ksession.startProcess("Evaluation", params);
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }
View Full Code Here

  }

  public void testEvaluationProcess2() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-EvaluationProcess2.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", new SystemOutWorkItemHandler());
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("employee", "UserId-12345");
    ProcessInstance processInstance = ksession.startProcess("com.sample.evaluation", params);
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
  }
View Full Code Here

  }

  public void testExclusiveSplit() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-ExclusiveSplit.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ksession.getWorkItemManager().registerWorkItemHandler("Email", new SystemOutWorkItemHandler());
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("x", "First");
    params.put("y", "Second");
    ProcessInstance processInstance = ksession.startProcess("com.sample.test", params);
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
View Full Code Here

  }
 
  public void testExclusiveSplitDefault() throws Exception {
    KnowledgeBase kbase = createKnowledgeBase("BPMN2-ExclusiveSplitDefault.bpmn2");
    StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
    ksession.getWorkItemManager().registerWorkItemHandler("Email", new SystemOutWorkItemHandler());
    Map<String, Object> params = new HashMap<String, Object>();
    params.put("x", "NotFirst");
    params.put("y", "Second");
    ProcessInstance processInstance = ksession.startProcess("com.sample.test", params);
    assertTrue(processInstance.getState() == ProcessInstance.STATE_COMPLETED);
View Full Code Here

TOP

Related Classes of org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler

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.