Chris Melas [
http://community.jboss.org/people/melc] created the discussion
"Re: Java code accessing task variables"
To view the discussion, visit:
http://community.jboss.org/message/603371#603371
--------------------------------------------------------------
If i'm not mistaken when using a task any variables i.e. comming from parammeter
mapping, or even entry actions etc should be placed in content then the content is
accessed like below,
long contentId = task.getTaskData().*getDocumentContentId*();
if (contentId != -1) {
BlockingGetContentResponseHandler getContentResponseHandler = new
BlockingGetContentResponseHandler();
client.getContent(contentId, getContentResponseHandler);
Content content = getContentResponseHandler.getContent();
all other arguments of task are access from the methods of TaskData , i.e.
task.getTaskData().getComments(); etc
Otherwise a custom workitem has method getParameter for the custom arguments specified for
this workitem.But again the variables from parameter mapping and entry actions will have
to be placed to the specific argument of that workitem.
Please correct me if there is a better approach....
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/603371#603371]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]