[jBPM] - JBPM5 - usage approaches/patterns question
by darren hartford
darren hartford [https://community.jboss.org/people/dhartford] created the discussion
"JBPM5 - usage approaches/patterns question"
To view the discussion, visit: https://community.jboss.org/message/748023#748023
--------------------------------------------------------------
Hey all,
I've been having some difficulty trying to track down JBPM5 (or, in general, BPM engine) approaches/patterns/architectual mode/deployment model, or some other term I haven't figured out yet ;-)
So, example of what I'm looking for, and I'm hoping someone can help guide towards existing blogs/documentation around this area:
* [master workflow server] JBPM as a separate server, managing many workflows for many 'applications' (application defined as a single domain product, but may have shared components/workflow/subprocesses with other applications). Workflows are created and managed by the server, and 'applications' only make hooks -- an 'application' will not function without the master workflow server.
* [application workflow] JBPM integrated within the server of a N-tier system, focused on only one application.
* [embedded workflow] JBPM integrated in an offline thick client, potentially syncing with a parent system.
* ??? any others I haven't thought of
And then, of course, the pros/cons that people have experienced in each of those approaches, as well as any I may have missed or if I completely mis-understood JBPM's approach. As an older example, when learning BPEL 5-10-odd years ago there was heavy focus on webservices and leaned very much to 'master workflow server' kind of approach as the 'only way', but required a lot of investment before you got any gains. Trying to identify other approaches that may be more lightweight for gradual adoption, or may be better for certain scenarios.
Thanks for any feedback!
-D
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/748023#748023]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 9 months
[jBPM] - Re: jBPM 5.1 in a real world web application
by Krishna Pitla
Krishna Pitla [https://community.jboss.org/people/krishnapitla] created the discussion
"Re: jBPM 5.1 in a real world web application"
To view the discussion, visit: https://community.jboss.org/message/748004#748004
--------------------------------------------------------------
hi ashutosh,
try out this code kbuilder.add(ResourceFactory.+newClassPathResource+(
"simplerule.drl"), ResourceType.++DRL++);
in your code where you try to start the process .
Sample code pasted below :
***package
**
* com.sample;
***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;
/**
* 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();
// start a new process instance
ksession.startProcess(
"com.sample.bpmn.hello");ksession.insert(
**new** Account());ksession.fireAllRules();
}
**private** **static** KnowledgeBase readKnowledgeBase() **throws** Exception {KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.+newKnowledgeBuilder+();
kbuilder.add(ResourceFactory.+newClassPathResource+(
"simplerule.drl"), ResourceType.++DRL++);
kbuilder.add(ResourceFactory.+newClassPathResource+(
"sample.bpmn"), ResourceType.++BPMN2++);
**return** kbuilder.newKnowledgeBase();} }
*******
Hope this helps . Though i am still new to jbpm and drools. So if i have missed something then please pardon me.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/748004#748004]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 9 months