0 Replies Latest reply on Apr 12, 2013 3:43 AM by 7ab3rn4t3 7ab3rn4t3

    WRONG PACKAGEs

    7ab3rn4t3 7ab3rn4t3 Newbie

      Hi

       

      I was wondering how do something and how and I notice that I import in my class wrong packages because on other iseeues other package

      are used

       

      example

      this is my class

       

      package com.sample;

       

       

      import java.util.HashMap;

      import java.util.Map;

       

       

      import org.drools.KnowledgeBase;

      import org.drools.builder.KnowledgeBuilder;

      import org.drools.builder.KnowledgeBuilderFactory;

      import org.drools.builder.ResourceType;

      import org.drools.io.ResourceFactory;

      import org.drools.runtime.StatefulKnowledgeSession;

      import org.drools.runtime.process.ProcessInstance;

       

       

       

       

      /**

      * This is a sample file to launch a process.

      */

      public class ProcessMain {

       

       

                public static final void main(String[] args) throws Exception {

                          // load up the knowledge base

                          KnowledgeBase kbase = readKnowledgeBase();

                          StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();

       

                          Map<String, Object> params = new HashMap<String, Object>();

                          params.put("name", "Arthur");

                          //start a new process instance

                          ProcessInstance is = ksession.startProcess("com.sample.bpmn.hello", params);

       

                          System.out.println(is.getProcess().getMetaData());

                }

       

       

                private static KnowledgeBase readKnowledgeBase() throws Exception {

                          KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

                          kbuilder.add(ResourceFactory.newClassPathResource("sample.bpmn"), ResourceType.BPMN2);

                          return kbuilder.newKnowledgeBase();

                }

      }

       

      which use drool in import as you can see, but to do what I need , I should import org.jbpm......ProcessInstance

       

      what JBPM and where can I download ?

       

      Thanks