*** 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'.
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?
Created attachment 994372 [details] receive task project
Bob, I am sorry but I am not engine developer. I think, it is question for Kris or Maciej.
Jozef, I think what Bob means is that you should test other activities for this behaviour.
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?
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.
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.
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.
See also https://bugzilla.redhat.com/show_bug.cgi?id=1213445
OK, this is done now. Does anyone know why there are both "Message" and "MessageId" parameters?
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
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.
I am fine with it. I see it as the fastest way how to fix this issue.
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
Verified on: jbtis-4.3.0.CR1 BPMN2 Modeler - 1.2.4.Final-v20160330-1625-B110