beda-software/sdc-ide

Optional launch context parameter cases jute error

Opened this issue · 0 comments

If not required launch context variable is used in Mapping the variable will be empty so when it used in calculations an error is displayed but extraction works correctly

Example. Using optional variable Practitioner in Mapping

body:
    $let:
        practitioner: $ Practitioner
    .... 
    
    - request:
                  url: /Provenance
                  method: POST
      resource:
                  resourceType: Provenance
                  agent:
                      - who:
                            id: $ practitioner.id
                            resourceType: $ practitioner.resourceType
                            display: $ practitioner.name.0.given.0 + ' ' + practitioner.name.0.family

the error:

java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "x" is null While evaluating JUTE template at @.$body.entry.1.resource.agent.0.who.display (exception)