Red Hat Bugzilla – Bug 1001229
RegisterWorkItemHandlerCommand is unable to serialize a WorkItemHandler object.
Last modified: 2016-09-20 01:04:57 EDT
Created attachment 790654 [details]
Description of problem:
When using a remote runtime engine (e.g. REST) then the call to getWorkItemManager().registerWorkItemHandler fails on WorkItemHandler serialization with:
"class XYZ nor any of its super class is known to this context."
(I used org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler).
See attached log for full stack.
Not sure that this is a method that can easily be used remotely, as this will probably not have the expected result (if it would be successful, it would only register the listener for the duration of the life cycle of that ksession, not for all sessions, and also not persistent. Configuring work item handlers is probably something that needs to be done by a system administrator, for example by dropping in a work item handler configuration file into the application server classpath.
Marco, could you exclude this one as one of the AcceptedCommands?
Fixed with this commit:
This commit makes sure that an error is thrown when the RegisterWorkItemHandlerCommand command is used.
I added some client/api side checks as well - the checks on the server side already exist.
Verified in BPMS 6.0.0.ER4
the registerRegisterWorkItemHandler() throws:
java.lang.UnsupportedOperationException: The .registerWorkItemHandler(..) method is not supported on the remote api.