[jboss-user] [jBPM] - WRONG PACKAGEs

7ab3rn4t3 7ab3rn4t3 do-not-reply at jboss.com
Fri Apr 12 03:43:10 EDT 2013


7ab3rn4t3 7ab3rn4t3 [https://community.jboss.org/people/7ab3rn4t3] created the discussion

"WRONG PACKAGEs"

To view the discussion, visit: https://community.jboss.org/message/807953#807953

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/807953#807953]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130412/2275e00b/attachment.html 


More information about the jboss-user mailing list