Bug 1188592 - Mapping Message from Receive Task to process variable
Summary: Mapping Message from Receive Task to process variable
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Eclipse Tooling
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Kris Verlaenen
QA Contact: Jozef Marko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-03 10:39 UTC by Jozef Marko
Modified: 2020-03-27 19:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:44:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
receive task project (29.08 KB, application/zip)
2015-02-23 13:26 UTC, Jozef Marko
no flags Details

Description Jozef Marko 2015-02-03 10:39:06 UTC
*** Description of problem:
For the 'Receive Task' element, there is a option in properties to specify 'Message' and 'Map Incoming Data Message To' on tab 'Receive Task'. If I fill these two fields on this tab, fields on tab 'I/O Parameters' are filled automatically. The problem is, that field (Output Data Mapping Details / From / Name) will be filled with something like 'output1'. But If I want run created process, only way, when mapping works is when (Output Data Mapping Details / From / Name) equals to 'Message'.


*** Version-Release number of selected component (if applicable):
jbds-8.0.2.GA_jbdsis-8.0.0.CR1.earlyaccess

*** Steps to Reproduce:
1. Run attached project as JUnit test.
2. Method testReceiveTaskOk() ends with success.
   Method testReceiveTaskNok() ends with failure.
3. Change (Output Data Mapping Details / From / Name) in BPMN2-ReceiveTaskNok.bpmn2 to 'Message' and rerun project.
4. Both tests will pass.

*** Expected results:
If I fill message and variable on 'Receive Task' tab, (Output Data Mapping Details / From / Name) on 'I/O Parameters' tab should be automatically set to 'Message'.

Comment 1 Robert (Bob) Brodt 2015-02-12 20:28:22 UTC
Is there a similar requirement for SendTask? Are there any other hard-coded DataInput or DataOutput element names for any other Activities that I should know about?

Comment 2 Jozef Marko 2015-02-23 13:26:47 UTC
Created attachment 994372 [details]
receive task project

Comment 3 Jozef Marko 2015-02-23 15:30:03 UTC
Bob, I am sorry but I am not engine developer. I think, it is question for Kris or Maciej.

Comment 4 Marek Baluch 2015-02-24 12:41:13 UTC
Jozef, I think what Bob means is that you should test other activities for this behaviour.

Comment 5 Robert (Bob) Brodt 2015-02-26 15:06:01 UTC
Yes, sort of ;) but this would go a lot quicker if I knew about other activities that needed special treatment like this.

Jozef, I'm unable to run the attached project as a JUnit test; I'm getting a RuntimeException: The requested KieBase "kbase" does not exist. I do have other projects that I created using the New Project wizard, added all of the required jBPM jars, and that seems to work. Any idea what I'm missing?

Comment 6 Robert (Bob) Brodt 2015-02-26 15:33:05 UTC
Never mind - I simply copied your JbpmTest java class and bpmn2 process files into one of my projects that works and now I'm able to run the JUnit test.

Comment 7 Robert (Bob) Brodt 2015-02-26 15:59:02 UTC
OK, I think I figured this out: the ReceiveTask is actually just a specialized WorkItemDefinition and as such, the ReceiveTaskHandler subclasses WorkItemHandler. There are other specialized WorkItemHandler classes that have hard-coded input/output parameters as follows:

HumanTask:
  TaskName (in)
  ActorId (in)
ReceiveTask:
  Message (out)
  MessageId (in)
SendTask:
  Message (in)
ServiceTask:
  Interface (in)
  Operation (in)
  ParameterType (in)
  Parameter (in)
  Result (out)

Looks like these activities may require specialized Property tabs, similar to UserTask, for these hard-coded I/O parameters. Coding these up will take about a week.

Comment 8 Robert (Bob) Brodt 2015-02-26 17:56:07 UTC
BTW, it looks like the Web Designer has a similar issue: if the user does not specifically name the Receive Task output parameter as "Message", it will cause the same problem at runtime.

Comment 9 Robert (Bob) Brodt 2015-12-07 18:22:21 UTC
See also https://bugzilla.redhat.com/show_bug.cgi?id=1213445

Comment 10 Robert (Bob) Brodt 2016-01-21 17:56:31 UTC
OK, this is done now. Does anyone know why there are both "Message" and "MessageId" parameters?

Comment 11 Jozef Marko 2016-02-24 13:31:53 UTC
Bob, sorry, I do not know what is 'MessageId' input good for, but jBPM engine is able to run process containing 'Receive Task' without this input. 

Problem is, that when is now added 'Receive Task' on the canvas, appears error about missing data type for MessageId, even if is MessageId filled.

reproduced on:
jbds-9.1.0.Beta2_jbdsis-9.0.0.Beta1

and also on latest BPMN2 Modeler:
BPMN2 Modeler - 1.2.3.Final-v20160223-1918-B93

Comment 12 Robert (Bob) Brodt 2016-02-24 13:40:59 UTC
Hmm, ok....I found these parameters being referenced in the engine code and assumed they were needed somewhere :-/

I will remove MessageId since Web Designer doesn't reference it.

Comment 13 Jozef Marko 2016-02-24 13:56:35 UTC
I am fine with it. I see it as the fastest way how to fix this issue.

Comment 14 Robert (Bob) Brodt 2016-03-23 13:55:13 UTC
Fixed in BPMN2 Modeler versions for
Luna: 1.1.6.CR1-v20160318-1403-B1303
Mars: 1.2.4.CR1-v20160318-1302-B107
Neon: 1.3.0.Beta1-v20160318-1302-B41

Comment 15 Jozef Marko 2016-04-05 14:09:56 UTC
Verified on:
jbtis-4.3.0.CR1
BPMN2 Modeler - 1.2.4.Final-v20160330-1625-B110


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