Announcement

Collapse
No announcement yet.

Problem with PDF Template variables are not being rendered

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with PDF Template variables are not being rendered

    Hi, I'm trying to generate a PDF from an HTML template in a Document Writer.

    My channel receives a JSON object like { "patient" : {...}, "claim": {...} }

    If I try to access the rawMessage.claim from the PDF template, I get just that code in the PDF:

    ${message.rawData.claim}

    The field is not correctly resolved.

    Also, if I try to iterate on an array contained in claim, I get an empty result in the PDF. This is my iteration:

    #foreach ($line in $message.rawData.claim.lines)
    $line.item_code
    <br/>
    #end


    Not sure why this is not working. Any pointers are welcome.

  • #2
    rawData is a string, not an object. You'll have to store the object in the connectorMap or channelMap in your transformer to be able to access the properties.

    Comment

    Working...
    X