Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 973885 - User Task Content and other variables relation should be stated in document
User Task Content and other variables relation should be stated in document
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kris Verlaenen
Radovan Synek
Depends On:
  Show dependency treegraph
Reported: 2013-06-12 23:51 EDT by kylin
Modified: 2015-07-08 13:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
jBPM User Task snapshot (16.78 KB, image/png)
2013-06-12 23:51 EDT, kylin
no flags Details

  None (edit)
Description kylin 2013-06-12 23:51:29 EDT
Created attachment 760426 [details]
jBPM User Task snapshot

Description of problem:
As attached usertask.png show, if we define Content, then Content value will replace all other perams(Name, Actor(s), Groups(s), etc), we can use the following code test:
                List<TaskSummary> list = localTaskService.getTasksAssignedAsPotentialOwner("john", "en-UK");
                TaskSummary task = list.get(0);
                Task taskDef=localTaskService.getTask(task.getId());
		Content content = localTaskService.getContent(taskDef.getTaskData().getDocumentContentId());
		ByteArrayInputStream bais = new ByteArrayInputStream(content.getContent());
		ObjectInputStream ois =null;
		HashMap taskinfo = null;
		try {
			ois = new ObjectInputStream(bais);
			Object obj = ois.readObject(); 
			System.out.println("Extract via API: " + obj);
		} catch (ClassNotFoundException e) {
		} catch (IOException e) {
If Content has been defined, above code will output only Content value as a String;
If no Content defined, all perams(Name, Actor(s), Groups(s), etc) will output as a HashMap.

This not a bug verify by JBoss SEG, but no document refer to this, I do think this should be included in the API (java) documents or user guide.

One of Develop said, this also shuld not be bug, as below:

"after a salaboy commit some time ago, now, the input of the task will be get from the “content” variable. If you want to send many separate variables, you can omit (send it blank) the content variable, and add other variables. If the human task work item handler  does not find anything in content variable, it will send a map with all the task variables as input."

Expected results:
This be state in  API (java) documents or user guide

Note You need to log in before you can comment on or make changes to this bug.