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

A task content requested via REST API cannot be used outside Java

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 6.1.0
    • 6.0.1
    • Business Central
    • None

    Description

      Description of problem:

      When I request for a task content (http://localhost:8080/business-central/rest/task/content/2), I will get something like:

      XML:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?><content><id>2</id><class-name>java.util.HashMap</class-name><content-map><entry key="ActorId" class-name="java.lang.String">rO0ABXQABGliZWs=</entry><entry key="TaskName" class-name="java.lang.String">rO0ABXQACUhlbGxvVGFzaw==</entry><entry key="NodeName" class-name="java.lang.String">rO0ABXQABUhlbGxv</entry></content-map></content>

      JSON:

      {"id":2,"serializedContent":null,"contentMap":

      {"ActorId":"ibek","TaskName":"HelloTask","NodeName":"Hello"}

      ,"content":"rO0ABXoAAAJcCgYIBRAEGABKuQQIABJIb3JnLmRyb29scy5jb3JlLm1hcnNoYWxsaW5nLmltcGwuU2VyaWFsaXphYmxlUGxhY2Vob2xkZXJSZXNvbHZlclN0cmF0ZWd5GuoDrO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAAEdwQAAAAEdAAEaWJla3QACUhlbGxvVGFza3QABUhlbGxvc3IAEWphdmEudXRpbC5IYXNoTWFwBQfawcMWYNEDAAJGAApsb2FkRmFjdG9ySQAJdGhyZXNob2xkeHA/QAAAAAAADHcIAAAAEAAAAAN0AAdBY3Rvcklkc3IAN2NvbS5nb29nbGUucHJvdG9idWYuR2VuZXJhdGVkTWVzc2FnZUxpdGUkU2VyaWFsaXplZEZvcm0AAAAAAAAAAAIAAlsAB2FzQnl0ZXN0AAJbQkwAEG1lc3NhZ2VDbGFzc05hbWV0ABJMamF2YS9sYW5nL1N0cmluZzt4cHVyAAJbQqzzF/gGCFTgAgAAeHAAAAARCgdBY3RvcklkEAAaBAAAAAB0AC9vcmcuamJwbS5tYXJzaGFsbGluZy5pbXBsLkpCUE1NZXNzYWdlcyRWYXJpYWJsZXQACFRhc2tOYW1lc3EAfgAIdXEAfgAMAAAAEgoIVGFza05hbWUQABoEAAAAAXEAfgAOdAAITm9kZU5hbWVzcQB+AAh1cQB+AAwAAAASCghOb2RlTmFtZRAAGgQAAAACcQB+AA54eFIWCgx2YXJpYWJsZXNNYXAQABoEAAAAAw=="}

      Notice that the values of entries contain humanly unreadable content. I believe that the values are always strings, aren't they? So, it might be enough to change the return type from Map<String, Object> to Map<String, String>. If it is not possible to change the type, then it could be done by marshalling the content as it must be of type of class known for JAXB context.

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

      How reproducible:

      Steps to Reproduce:
      1.
      2.
      3.

      Actual results:

      Expected results:

      Additional info:

      Attachments

        Activity

          People

            marco.rietveld Marco Rietveld (Inactive)
            ibek1@redhat.com Ivo Bek
            Marco Rietveld (Inactive)
            Ivo Bek Ivo Bek
            Ivo Bek Ivo Bek
            Anton Giertli, Ivo Bek, Kris Verlaenen, Marco Rietveld (Inactive), Rajesh Rajasekaran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: