Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-2503

Exclude unnecessary elements (results) in the rest JaxbWorkItem reply

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 6.0.1
    • Business Central
    • None

      Description of problem:

      When you issue following rest query
      [GET] /runtime/

      {deploymentId}

      /workitem/

      {workItemId}

      the reply looks similar to this:
      <work-item>
      <id>5</id>
      <name>Human Task</name>
      <state>0</state>
      <parameters>
      <entry>
      <key>ActorId</key>
      <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">anton</value>
      </entry>
      <entry>
      <key>TaskName</key>
      <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">callbacktask</value>
      </entry>
      <entry>
      <key>NodeName</key>
      <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">callback task</value>
      </entry>
      </parameters>
      <results/>
      <processInstanceId>5</processInstanceId>
      </work-item>

      Is it necessary to include element <result> ? To my understanding this attribute will always be empty. If the workitem is still active, the results are not filled in yet. They are being filled in upon complete(result) method if I am not mistaken. However, when you query this workitem after completing it is not available anymore. Which simply makes me think that <result> will always be empty no matter what, therefore it seems unnecessary to include it in the reply.

      Version-Release number of selected component (if applicable):

      6.0.0 GA

      How reproducible:
      always

      Steps to Reproduce:
      1. Create process with one human task in the business-central, deploy and start the process
      2. execute http://localhost:8080/business-central/rest/runtime/deploymentid/workitem/workitemid

      I just used "1" on a clean installation, wasn't really sure how to retrieve the actual workitemid besides using method "try&fail".
      3. Observe the output - <results/> element is always empty.

      Actual results:

      The output for runtime/deploymentid/workitem/workitemid includes element <results/> which will always be empty

      Expected results:
      the output does not include <results> element at all.

      Additional info:

      In case there is some way how to actually retrieve content of results using Rest API, please do let me know how before marking this as NOTABUG.

              marco.rietveld Marco Rietveld (Inactive)
              rhn-support-agiertli Anton Giertli
              Ivo Bek Ivo Bek
              Ivo Bek Ivo Bek
              Anton Giertli, Ivo Bek, Kris Verlaenen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: