Hi Maciej,
Thanks for your reply. I went through the documentation and followed the steps . First , created a sampleprocess.bpmn with - start ---> task (CustomHandler) -> and end event .
2) Wrote a CustomHandler.java workItem handler class
package com.sample.bpmn.project;
import org.apache.log4j.Logger;
import org.drools.runtime.process.WorkItemHandler;
import org.drools.runtime.process.WorkItem;
import org.drools.runtime.process.WorkItemManager;
public class CustomHandler implements WorkItemHandler {
static Logger log = Logger.getLogger(
CustomHandler.class.getName());
//@Override
public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
// extract parameters
System.out.println("aborting *****");
}
//@Override
public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
System.out.println("The custom work handler is successfully invoked");
log.info("The custom work handler is successfully invoked");
manager.completeWorkItem(workItem.getId(), null);
}
}
and packaged it into a .jar and copied it into ..\jboss-as-7.1.1.Final\standalone\deployments\jbpm-gwt-console-server.war\WEB-INF\lib\ and ..\jbpm-installer\jboss-as-7.1.1.Final\standalone\lib directories.
3) In guvnor, created a workitem defintion CustomWorkItemHandler ( Not sure if this is required )
import org.drools.process.core.datatype.impl.type.ObjectDataType;
import org.drools.process.core.datatype.impl.type.StringDataType;
[
[
"name" : "CustomHandler",
"parameters" : [
"MyFirstParam" : new StringDataType(),
"MySecondParam" : new StringDataType(),
"MyThirdParam" : new ObjectDataType()
],
"results" : [
"Result" : new ObjectDataType()
],
"displayName" : "CustomHandler",
"icon" : "",
]
]
Successfully packaged and deployed the sampleprocess and wid into the GWT console server via guvnor.
4) Modified the CustomWorkItemHandlers.conf file and added the following entry
[
"Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
"CustomHandler": new com.sample.bpmn.project.CustomHandler(),
]
5) Restarted the server . I was able to see the SampleProcess in the webconsole , but when I tried to start it , blew up again with the same error message .
I am really frustrated :( , not sure what I am missing here. . Any help would be highly appreciated .
Thanks
Senthil