0 Replies Latest reply on Feb 16, 2017 11:47 AM by fernandocantu

    Using Rest Service Task

    fernandocantu

      Hello, I am trying to learn how to use Rest service task so I followed https://access.redhat.com/webassets/avalon/d/Red_Hat_JBoss_BPM_Suite-6.4-User_Guide-en-US/Red_Hat_JBoss_BPM_Suite-6.4-Us…  and FXApps: Using the REST Task from jBPM 6

      So I am making the Rest service task to do a POST call to one of my containers (http://localhost:8080/kie-server/services/rest/server/containers/Test/processes/testingRest.test/instances ) to start an instance.

      I am just trying to pass a Json Object with this information {"num": 123}, however when I run the application I get the following error:

       

      10:54:57,097 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-127.0.0.1/127.0.0.1:8080-4) SQL Error: 50200, SQLState: HYT00

      10:54:57,098 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-127.0.0.1/127.0.0.1:8080-4) Timeout trying to lock table "PROCESSINSTANCEINFO"; SQL statement:

      insert into ProcessInstanceInfo (InstanceId, lastModificationDate, lastReadDate, processId, processInstanceByteArray, startDate, state, OPTLOCK) values (null, ?, ?, ?, ?, ?, ?, ?) [50200-168] ....

       

      I confirm that the problem is not in my container that I am calling as I was able to start an instance by using the Advance Rest Client Application.

       

      Additional I am able to send a Rest Call if it is a GET one. So the trouble comes when I make it into a POST one and try to send a Json Object.

       

      I have attached my REST project and my Test project (the one that receives the call if you would like to take a look). Just change the url as the url that is currently using is the one for my container.

       

      Also is there any way to specify which type of information the Rest Service Task can accept? Such as Accept only Json format.

       

      Thanks,

      Fernando Pena