Abhitocode opened a new pull request, #6821:
URL: https://github.com/apache/incubator-kie-drools/pull/6821

   - **MessageHandler**:  message with no `itemRef` has no data, so only look 
up the itemDefinition when an `itemRef` is actually there (looking it up when 
it's missing is what caused the error). Still register the message so the event 
can find it, just with no type.
   
   - **ServiceTaskHandler**:  a Java service task uses a message to describe 
the method it calls (like the argument type). Now that a no-data message has no 
type, reading the type from it would leave the service task with nothing and 
break code generation. So when the message has no type, skip it and get the 
argument type from the service task's own data inputs instead.
   
   - **ProcessHandler** and **TriggerMetaData**: for a message event, code 
generation needs a real type. A no-data message doesn't have one, so it 
defaults to `java.lang.Object` in these two spots.
   
   **Tests**
   - `CodegenMessageStartEventTest`:  a message with no `itemRef`, and an 
itemDefinition with an empty `structureRef`.
   - `StartEventTest.testMessageStartWithoutDataMapping`:  sends the message 
with no payload and checks the process starts.
   
   
   closes: https://github.com/apache/incubator-kie-issues/issues/2377


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to