Bug 973885 - User Task Content and other variables relation should be stated in document
Summary: User Task Content and other variables relation should be stated in document
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Kris Verlaenen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-13 03:51 UTC by kylin
Modified: 2025-02-10 03:27 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:27:56 UTC
Type: Bug
Embargoed:


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

Description kylin 2013-06-13 03:51:29 UTC
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) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
---
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:
http://www.plugtree.com/using-variables-in-jbpm5-human-tasks/

"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

Comment 2 Red Hat Bugzilla 2025-02-10 03:27:56 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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