[jboss-user] [jBPM] - Re: jBPM5 running via a Web Interface

Khaleel Shaik do-not-reply at jboss.com
Fri Jul 13 10:40:38 EDT 2012


Khaleel Shaik [https://community.jboss.org/people/shaikkhaleel] created the discussion

"Re: jBPM5 running via a Web Interface"

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

--------------------------------------------------------------
Hi,

I hope now I am able to find out  a way and understand the scenario,  if any body can provide more details it would be great.

1.  Build your Process in Eclipse.
2.  Register this process with Drools repository  (see how to do it in the Chapter 16  http://docs.jboss.org/jbpm/v5.3/userguide/ch.process-repository.html http://docs.jboss.org/jbpm/v5.3/userguide/ch.process-repository.html ).
          (Right click on   your  Evaluation.bpmn process choose  Guvnor and then add   (provide the host and port and authentication credentials.)
3. Now you can browse the to see your deployed process at  bpmn-console   http://localhost:8080/jbpm-console/ http://localhost:8080/jbpm-console/
4. Also you can see the same process in the govnor   http://localhost:8080/drools-guvnor http://localhost:8080/drools-guvnor
5. Invoke the process from the Web application Copy all the process  in some folder say  html-public/jbpmflows/ <Evalution.bpmn>  (you can copy all others flows here)
6. Use the following code with the URL that you can point to the process file as a simple static file 

     private static KnowledgeBase readKnowledgeBase() throws Exception {
                    KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
                    //kbuilder.add(ResourceFactory.newClassPathResource("Evaluation.bpmn"), ResourceType.BPMN2);
                    //kbuilder.add(ResourceFactory.newUrlResource("file:///D:/Evaluation.bpmn"), ResourceType.BPMN2);
                    kbuilder.add(ResourceFactory.*newUrlResource*(new java.net.URL(" http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav/packages/defaultPackage/Evaluation.bpmn http://<yourwebhost>:8080/webcontextroot/jbpm/Evaluation.bpmn")),         ResourceType.BPMN2);
                    return kbuilder.newKnowledgeBase();
          }
 7. submit your flow request to the host system where your flows were registered

      private static StatefulKnowledgeSession createKnowledgeSession(KnowledgeBase kbase) {
                    StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
                    HornetQHTWorkItemHandler humanTaskHandler = new HornetQHTWorkItemHandler(ksession);
                    humanTaskHandler.setIpAddress("127.0.0.1");  //govnor host
                    humanTaskHandler.setPort(5445); //govnor port
                    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
                    return ksession;
          }


Thanks
-- Khaleel
--------------------------------------------------------------

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

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/20120713/e6e19ef5/attachment.html 


More information about the jboss-user mailing list