1 Reply Latest reply on Jul 24, 2014 11:37 AM by Jose Miguel Loor

    Task info in remote api does not retrieve the latest content

    Jose Miguel Loor Apprentice

      I have found a strange behavior in the bpms business-central / remote API; i am currently testing the 6.0.2.GA distribution

      These are the steps i am taking:

      1. deploy a jar with the attached bpmn file (Solicitud.bpmn)
      2. create a deployment unit for that jar (groupId, artifact, version); the kjar is started successfully and the process definition is also created (it can be seen under Process Management > Process Definitions)
      3. start a new process instance from that process definition
      4. login as a user that can perform the user tasks defined; at this point i can also check the task content with this url: http://localhost:8080/business-central/rest/task/14/content
      5. the result is something like this:
        <content><id>22</id><serializedContent>......</serializedContent></content>
      6. i can also use the remote api of the kie remote client and see content of the task (variables and such) with the same content id (22)
      7. i go to Tasks > Tasks List and claim the task; after that i view the Details and click in the work button, fill the data i want in the Outputs and click the save button; the console displays that the Content id 23 has been created ( this is the exact message: Task Id: 14 State was Saved! ContentId : 23)
      8. after that i can logout the console and when i log back in i see the data that was saved in the task
      9. the problem is that if i go to this url again (http://localhost:8080/business-central/rest/task/14/content) the result is this
        <content><id>22</id><serializedContent>......</serializedContent></content>
      10. i was expecting to see the latest content (Content id 23) but the api is giving me the previous content
      11. this is also happening when i use the remote kie api; this call task.getTaskData().getDocumentContentId() is giving me 22 instead of 23

       

      Is this a bug in the kie internal API ?? how is the business central console obtaining the correct content ??

      thanks for your help