[jboss-user] [jBPM] - jbpm5:Failed to set process variables
jack pan
do-not-reply at jboss.com
Mon Jun 13 09:16:21 EDT 2011
jack pan [http://community.jboss.org/people/timerule] created the document:
"jbpm5:Failed to set process variables"
To view the document, visit: http://community.jboss.org/docs/DOC-16912
--------------------------------------------------------------
Customize rest method in gwt-console-server.war:
@PUT
@Path("instance/{id}/addInstanceData")
@Consumes("multipart/form-data")
public Response addInstanceData(
@PathParam("id")
String instanceId,
Map<String, String> processVars){
try {
Map<String,Object> params = new HashMap<String, Object>();
params.put("testkey", "testValue");
getProcessManagement().setInstanceData(instanceId, params);
return Response.ok().build();
} catch (Throwable t) {
throw new WebApplicationException(t, 500);
}
}
private ProcessManagement getProcessManagement() {
if (null == this.processManagement) {
ManagementFactory factory = ManagementFactory.newInstance();
this.processManagement = factory.createProcessManagement();
log.debug("Using ManagementFactory impl:"
+ factory.getClass().getName());
}
return this.processManagement;
}
Throws the following error:
2011-06-13 20:17:35,468 INFO [STDOUT] (http-0.0.0.0-8080-4) Hibernate: select processins0_.InstanceId as InstanceId54_0_, processins0_.lastModificationDate as lastModi2_54_0_, processins0_.lastReadDate as lastRead3_54_0_, processins0_.processId as processId54_0_, processins0_.processInstanceByteArray as processI5_54_0_, processins0_.startDate as startDate54_0_, processins0_.state as state54_0_, processins0_.OPTLOCK as OPTLOCK54_0_ from ProcessInstanceInfo processins0_ where processins0_.InstanceId=?
2011-06-13 20:17:35,484 INFO [STDOUT] (http-0.0.0.0-8080-4) Hibernate: update ProcessInstanceInfo set lastModificationDate=?, lastReadDate=?, processId=?, processInstanceByteArray=?, startDate=?, state=?, OPTLOCK=? where InstanceId=? and OPTLOCK=?
2011-06-13 20:17:35,500 INFO [STDOUT] (http-0.0.0.0-8080-4) 20:17:35,484 ERROR [SynchronousDispatcher] failed to execute
javax.ws.rs.WebApplicationException: java.lang.NullPointerException
at org.jboss.bpm.console.server.CustomFacade.addInstanceData(CustomFacade.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at org.jbpm.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:67)
at org.jbpm.process.instance.impl.ProcessInstanceImpl.getContextInstance(ProcessInstanceImpl.java:127)
at org.jbpm.integration.console.CommandDelegate.setProcessInstanceVariables(CommandDelegate.java:270)
at org.jbpm.integration.console.ProcessManagement.setInstanceData(ProcessManagement.java:96)
at org.jboss.bpm.console.server.CustomFacade.addInstanceData(CustomFacade.java:88)
... 38 more
Any idea anyone?
Thanks
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16912]
Create a new document in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110613/df8e73dd/attachment.html
More information about the jboss-user
mailing list