All,

I'm trying to comprehend the methods used in JBpm.  I'm building a helpdesk for 
my company using JBoss, and JBpm will really help me out.

My confusion is in the ProcessDefinition and ProcessInstance.  In the tutorial 
for JBpm3.0 (Chapter 3.2 Database Example), a processDefinition is deployed 
with the name "Hello World".

Easy enough.

Where I fall short on, is how do you "attach" a java object instance to a 
specific instance in JBpm?  The tutorial loads it as:

  | JbpmSession jbpmSession = jbpmSessionFactory.openJbpmSession();
  | jbpmSession.beginTransaction();
  | jbpmSession
  |         .getGraphSession()
  |         .saveProcessDefinition(processDefinition);
  | ..... close the session and transaction ....
  | 
How does JBpm know that my, lets say, HolidayRequest#1234 is the object that is 
attached to that session?

It goes on, mimicking a seperate request:

  | ProcessDefinition processDefinition = 
  |         jbpmSession
  |           .getGraphSession()
  |           .findLatestProcessDefinition("hello world");
  | ProcessInstance processInstance = 
  |         new ProcessInstance(processDefinition);
  |     
  |     Token token = processInstance.getRootToken(); 
  | 
Okay, so I loaded up the process-definition "hello world" which is my workflow 
"map" so-to-speak, that all my HolidayRequests use.  But, again, how does JBpm 
know that I'm talking about HolidayRequest#1234 when I "getRootToken()" ?

Obviously, HolidayRequest#1234 could be in the "pending" state, while 
HolidayRequest#567 could be in the "approved" state.  How does JBpm know which 
object I'm talking about, when all I see is "findLatestProcessDefinition" and 
"getRootToken".

The HolidayRequest object is fictitious, but I could just as well be saying, 
TroubleTicket, or DocumentApproval objects.  Any objects that would be defined 
to flow through the specific Process Definition.

I hope I'm clear on my confusion.  I'm still scouring the docs, as I'm sure the 
answer is there somewhere.

Can anyone elaborate for me?

Thanks!
Aaron

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3919945#3919945

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919945


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to