I could register the workitemhandler and the confusion was about the work item definition.

So Let me confirm what I understood about the work definition.

A work definition for example ,

import org.drools.process.core.datatype.impl.type.StringDataType;

[

// the Notification work item

[

"name" : "Notification",

"parameters" : [

"Message" : new StringDataType(),

"From" : new StringDataType(),

"To" : new StringDataType(),

"Priority" : new StringDataType(),

],

"displayName" : "Notification",

"icon" : "icons/notification.gif"

]

]

Is just a template used by the editor to show the properties of a domain specific task. Internally workdefintion is used to map the parameters, results to the BPMN format. As BPMN format is used by the processing engine, It doesn't want a reference to the work definition .

If you take a look at my examples in my github account you will see that none of them defines those templates, because the engine doesn't care. Those definitions are right now only used by Eclipse and the Web Designer.

The engine has no interests on item definitions, but the info that you passed to item definitions is available in BPMN (generated by web-based/ide-based editors). As far as i see, the key used to register WorkItemHandler must identical to the value in "name" field. In other words, to link ServiceTask named "Notification" with a NotificationWorkItemHandler via programatical registration, we have to use the code