Bug 1001229 - RegisterWorkItemHandlerCommand is unable to serialize a WorkItemHandler object.
RegisterWorkItemHandlerCommand is unable to serialize a WorkItemHandler object.
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity unspecified
: ER4
: 6.0.0
Assigned To: Marco Rietveld
Ivo Bek
: TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-26 15:39 EDT by Marek Baluch
Modified: 2016-09-20 01:04 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Community CR2.
Last Closed: 2014-08-06 16:09:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
stack-trace (3.91 KB, text/plain)
2013-08-26 15:39 EDT, Marek Baluch
no flags Details

  None (edit)
Description Marek Baluch 2013-08-26 15:39:20 EDT
Created attachment 790654 [details]
stack-trace

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.
Comment 1 Kris Verlaenen 2013-09-03 09:14:06 EDT
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?

Kris
Comment 2 Marco Rietveld 2013-09-04 06:32:37 EDT
Fixed with this commit: 

https://github.com/droolsjbpm/droolsjbpm-integration/commit/117ec2b2926f5c9f932a2a412724e0c6cb6d7e9a

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.
Comment 6 Ivo Bek 2013-10-16 08:21:37 EDT
Verified in BPMS 6.0.0.ER4

the registerRegisterWorkItemHandler() throws:

java.lang.UnsupportedOperationException: The .registerWorkItemHandler(..) method is not supported on the remote api.

Note You need to log in before you can comment on or make changes to this bug.