Bug 1121396

Summary: JobExecutor: User registered callbacks are ignored.
Product: [Retired] JBoss BPMS Platform 6 Reporter: Marek Baluch <mbaluch>
Component: jBPM CoreAssignee: Alessandro Lazarotti <alazarot>
Status: CLOSED EOL QA Contact: Marek Baluch <mbaluch>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.0   
Target Milestone: DR2   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
BPMS 6.1.0.DR1
Last Closed: 2020-03-27 20:05:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marek Baluch 2014-07-20 11:37:05 UTC
*** Description of problem
Currently when a user command registers a new callback then this callback will be ignored by the job executor.

The main reason is that the callback classes are read from the context prior the execution of the command (in the AvailableJobsExecutor#executeJob() method). It would be nice if a user could add his own callback along side the AsyncWorkItemHandlerCmdCallback).

*** How to reproduce
1) implement a new command and do the following

String callbacks = (String) ctx.getData("callbacks");
ctx.setData("callbacks", callbacks + ",com.bpms.functional.jobexec.UserCommandCallback");

*** Actual result
com.bpms.functional.jobexec.UserCommandCallback will not be executed

*** Expected result
com.bpms.functional.jobexec.UserCommandCallback will be executed

Comment 2 Maciej Swiderski 2014-07-24 18:07:55 UTC
fixed by ensuring that callbacks are created after command execution

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/e876ba5efdc9847ce1cc1f76b900c08dc8c9f954

Comment 3 Marek Baluch 2014-09-10 08:06:01 UTC
Verified on 6.1.0.DR2