Syed Ahmed

Forum Replies Created

Viewing 4 replies – 1 through 4 (of 4 total)
  • Author
    Replies
  • in reply to: Send JSON payload segment from TCL script Xlate #120479
    Syed Ahmed
    Participant

      Thank you very much, guys. It worked!

      in reply to: Send JSON payload segment from TCL script Xlate #120477
      Syed Ahmed
      Participant

        Thanks, Paul,

        You can ignore this “set xlateOutVals $signer” line. It was one of my debugging lines.

        Quick question/clarification – “msgset $mh $signer” will send both messages to Xlate. How do I get the $signer data from Xlate?

        in reply to: Send JSON payload segment from TCL script Xlate #120474
        Syed Ahmed
        Participant

          Jim, here is my TCL script.

          I extract the $signer from the original payload. Now, I want to pass the $signer to Xlate. If I understand correctly, do I need to ‘lappend dispList “CONTINUE $signer”‘ instead of ‘lappend dispList “CONTINUE $mh”‘ at the end of the script?

          proc tps_signer_patient_index { args } {
          global HciConnName HciRoot
          global signer_index
          package require base64
          package require json
          keylget args MODE mode
          set ctx “” ; keylget args CONTEXT ctx
          set module “tps_signer_patient_index/$HciConnName/$ctx”
          set uargs {} ; keylget args ARGS uargs
          set debug 0
          catch {keylget uargs DEBUG debug}
          set dispList {}

          switch -exact — $mode {
          start {}

          run {
          keylget args MSGID mh

          set msg [msgget $mh]
          set jfields [::json::json2dict $msg]
          #puts $jfields
          set data [dict get $jfields data]
          set envelopeSummary [dict get $data envelopeSummary]
          set envelopeDocuments [dict get $envelopeSummary envelopeDocuments]
          set recipients [dict get $envelopeSummary recipients]
          set signers [dict get $recipients signers]
          set signer_index 0
          set admTabFound 0
          foreach signer $signers {
          set tabs [dict get $signer tabs]
          set textTabs [dict get $tabs textTabs]
          foreach textTab $textTabs {
          if {[dict exists $textTab mergeFieldXml]} {
          set mergeFieldXml [dict get $textTab mergeFieldXml]
          if {[string match “<patient>*” $mergeFieldXml]} {
          incr admTabFound
          break
          }
          }
          }
          if {$admTabFound == 1} {
          set xlateOutVals $signer
          break;
          }
          incr signer_index
          }
          lappend dispList “CONTINUE $mh”
          }

          time {}
          shutdown {}
          default {
          error “Unknown mode ‘$mode’ in $module”
          }
          }

          return $dispList
          }

          in reply to: Send JSON payload segment from TCL script Xlate #120472
          Syed Ahmed
          Participant

            Thank you very much, Jim. I configured the routes in NetConfig. The issue is that Xlate receives the entire payload, whereas I require a modified payload from the TCL script. Is there anything I need to do in TCL to send the extracted payload?

            I received very basic training to cover the fundamentals of NetConfig setup

          Viewing 4 replies – 1 through 4 (of 4 total)