[jboss-user] [jBPM] - Re: Error starting process instance - getting HTTP 500: Unknown error
Senthil Sathiya
do-not-reply at jboss.com
Fri Aug 2 15:58:15 EDT 2013
Senthil Sathiya [https://community.jboss.org/people/skumar0105] created the discussion
"Re: Error starting process instance - getting HTTP 500: Unknown error"
To view the discussion, visit: https://community.jboss.org/message/831217#831217
--------------------------------------------------------------
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
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/831217#831217]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130802/de950b54/attachment.html
More information about the jboss-user
mailing list