William Timpany [https://community.jboss.org/people/wtimpany] created the 
discussion

"Re: JBPM 5.1 Final Release with jboss-5.1.0.GA - Human Task taskId"

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

--------------------------------------------------------------
I am not sure if this will be of use, but we do a similar thing.  

We create a relation between a "Human Task" and our own Application Model.  
Since the Task ID does not exist before the Task is persisted, we pass our own 
Model Object ID to the Task.  I did not want to extend the Task Object to hold 
our FK, so I decided to use the "Priority" field in the Task to store the 
reference (this may have to change in the future if we need to use 
priorities).     The reason for not extending the Task, was that I wanted to 
use the vanilla JBPM code.

We have a Script Task before the Human Task to inject our Model FK ID into the 
context, then use this context variable in the Task.

Script Task: not the real code but it gives the idea.
  // -- getBeanId returns Integer
  kcontext.setVariable("myExternalModelID", MyExternalModelBean.getBeanId() ); 

Human Task:
  Priority property: #{myExternalModelID}

Doing it this way alows us to then Join our Model Bean to the JBPM Task:  
MyExternalModelBean.beanId == Task.priority
--------------------------------------------------------------

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

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

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to