Abhitocode opened a new pull request, #4184:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4184
Process execution fails if process has event subprocess with
TimerStartEvent.
Error:
```
Caused by: java.lang.IllegalStateException: Process could not be validated
![Process 'scripts' [scripts]: Node 'Start'
[_D7F366D7-ABE9-41E8-A3C0-CC1C7A37C1F1] Start in Event SubProcess 'Event
Sub-process' [_BC671924-5590-42CC-A8FA-EC1A4FB50869] must contain a trigger
(event definition).]
at
org.jbpm.ruleflow.core.RuleFlowProcessFactory.validate(RuleFlowProcessFactory.java:245)
at org.acme.travels.ScriptsProcess.process(ScriptsProcess.java:171)
```
**Root cause as I understood:**
The code generation path was missing logic to add a trigger to the StartNode
and register the timer on the EventSubProcessNode for timer start events. The
XML parsing path handles this correctly, but the code generation path did not,
causing validation to fail.
**Fix that seems to be working:**
Added trigger creation for timer events in StartNodeVisitor when StartNode
is inside an EventSubProcessNode
Added timer registration on EventSubProcessNode in EventSubProcessNodeVisitor
Addedtimer()method in EventSubProcessNodeFactory to support timer
registration
`Action is "null" error when the timer expires :`
for Event Subprocess timers, the Action is never compiled or wired during
process compilation, it's always null. The code was calling action.execute()
without a null check, causing the error.
Fix: Added null check
--
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]