0 Replies Latest reply on Sep 5, 2014 2:42 AM by carlo latasa

    Error triggering a process from a REST call

    carlo latasa Newbie

      Hi,

       

      I'm interested in calling the 'check weather' demo via curl/rest from the command line passing in the zipCode via URL parameter - but running into an issue.

       

      Here are the steps I'm following: (OS X - 10.9.4, java version "1.8.0_05", ant version "1.9.4")

       

      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

       

      I've just installed and started up jboss-bpms-brms-6.0.1.GA-redhat-4-src using the ant commands noted here: Chapter 2. Installer

       

      The server starts up and I'm able to get to: http://localhost:8080/jbpm-console

       

      Then I can go into: demo > jbpm-playground > async-examples and then build & deploy the 'check weather' example

       

      I then go and Start that process, fill in the user and zipCode and the resulting process instance gives me the weatherinfo I would expect:

      'Response is operation executed successfully:true City:Mill Valley State: CA Description: Partly Sunny Temperature :66 Wind: W14 Visibility:  Remarks : '

       

      ALL good so far!

       

      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------

       

      Then I try the following from the command line:

      > curl -X POST  "http://localhost:8080/jbpm-console/rest/runtime/org.jbpm.example:async-examples:1.0/process/CheckWeather/start?map_usZipCode=94941&map_user=carl"  -u krisv:krisv

       

      but when I look at the resulting process instance I see the following:

       

      usZipCode = 94941

      user = carl

      weatherinfo = (empty)


      and I see in the server.log a stack trace with info like this:


      2014-09-04 22:54:17,388 ERROR [stderr] (EJB default - 8)        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

      2014-09-04 22:54:17,391 ERROR [stderr] (EJB default - 8)        at org.jboss.as.ejb3.component.interceptors.AsyncFutureInterceptorFactory$1$2.runInvocation(AsyncFutureInterceptorFactory.java:9

      7)

      2014-09-04 22:54:17,395 ERROR [stderr] (EJB default - 8)        at org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:73)

      2014-09-04 22:54:17,398 ERROR [stderr] (EJB default - 8)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

      2014-09-04 22:54:17,401 ERROR [stderr] (EJB default - 8)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

      2014-09-04 22:54:17,403 ERROR [stderr] (EJB default - 8)        at java.lang.Thread.run(Thread.java:745)

      2014-09-04 22:54:17,405 ERROR [stderr] (EJB default - 8)        at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      2014-09-04 22:54:17,408 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (EJB default - 8) Interceptor for {http://ws.cdyne.com/WeatherWS/}Weather#{http://ws.cdyne.com/WeatherWS/}GetCityWe

      atherByZIP has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault

              at org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:107) [cxf-api-2.7.11.jar:2.7.11]

              at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:101) [cxf-rt-frontend-jaxws-2.7.11.jar:2.7.11]

              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) [cxf-api-2.7.11.jar:2.7.11]

              at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570) [cxf-api-2.7.11.jar:2.7.11]

              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479) [cxf-api-2.7.11.jar:2.7.11]

              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382) [cxf-api-2.7.11.jar:2.7.11]

              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335) [cxf-api-2.7.11.jar:2.7.11]

              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) [cxf-api-2.7.11.jar:2.7.11]

              at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:341) [cxf-api-2.7.11.jar:2.7.11]

              at org.jbpm.process.workitem.webservice.WebServiceCommand.execute(WebServiceCommand.java:81) [jbpm-workitems-6.1.0.Final.jar:6.1.0.Final]

              at org.jbpm.executor.impl.AvailableJobsExecutor.executeJob(AvailableJobsExecutor.java:122) [jbpm-executor-6.1.0.Final.jar:6.1.0.Final]

              at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source) [:1.8.0_05]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_05]

              at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0_05]

       

      I've attached the full stack trace.

       

      Any help would be appreciated - thanks in advance.