in 6.0.1 there was an issue with use of proper classloader when registering handlers via kmodule.xml and it required MVEL base syntax e.g. to create handler of class org.jbpm.handler.CustomHandler you would need to use new org.jbpm.handler.CustomHandler().
That was already fixed in master and will be available in 6.1.0 (both classloader issues and limitation to use MVEL syntax). So for now the only way is to use actually cdi producers for work item registration. Note that you can filter based on identifier given to the methods like getWorkItemHandlers to be able to provide handlers for given deployments. Identifier is the id of deployment unit.
Thanks for your quick reply.
As I understand your answer, you are telling me that I can't get a custom handler to work when it is deployed inside the kjar (due to the issue you mention). Was this issue introduced with 6.0.1 - does it work with 6.0.0 or should I wait for 6.1.0? Do you have an release date for 6.1.0? What do you recommend 6.0.0 or 6.1.0?
the issue was in both 6.0.0 and 6.0.1 so you'll need to wait for another release. 6.1.0 should be out in June but in like 2 weeks there will be beta released so you can pick that up and try to see if all is working as expected. As there will be still time to fix outstanding issues before final goes out.