Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XOBVRM

XOBVRM.m

Go to the documentation of this file.
  1. XOBVRM ;; mjk/alb - VistaLink Request Manager ; 07/27/2002 13:00
  1. ;;1.6;VistALink Security;**4**;May 08, 2009;Build 7
  1. ; ;Per VA Directive 6402, this routine should not be modified.
  1. Q
  1. ;
  1. ; --------------------------------------------------------------------------------
  1. ; Request Manager
  1. ; --------------------------------------------------------------------------------
  1. ;
  1. EN(XOBROOT,XOBDATA,XOBHDLR) ; -- main entry point for Request Manager
  1. N XOBOK,XOBOPT
  1. S XOBOK=0
  1. ;
  1. ; -- if 'current' request handler is not defined then parse xml global buffer
  1. ; Note: 'Current' request handler could be define already via proprietary format reader
  1. I $G(XOBHDLR)="" S XOBOPT="" D EN^XOBVRMX(XOBROOT,.XOBOPT,.XOBDATA,.XOBHDLR)
  1. ;
  1. ; -- default single call processing if not specified by request handler
  1. I $G(XOBDATA("MODE"),"single call")="single call" S XOBSTOP=1
  1. ;
  1. ; -- check if request handler info was successfully initialized / if not, throw exception
  1. S XOBHDLR=+$G(XOBHDLR)
  1. I '$G(XOBHDLR(XOBHDLR)) D G ENQ
  1. . S XWBTIP=$$GETPEER^%ZOSV ; try get client IP for error trap. Use of GETPEER^%ZOSV: DBIA #4056
  1. . D RMERR(184001,$G(XOBHDLR(XOBHDLR,"ERROR"),"Request Manager not defined"))
  1. . S XOBOK=0
  1. ;
  1. ; -- do authentication check for message type?
  1. I $G(XOBHDLR(XOBHDLR,"AUTHENTICATE")) D
  1. . S XOBOK=$$LOGGEDON^XOBSCAV()
  1. E D
  1. . S XOBOK=1
  1. ;
  1. ; -- call request handler
  1. I XOBOK X $G(XOBHDLR(XOBHDLR,"REQHDLR"))
  1. ;
  1. ENQ ;
  1. Q XOBOK
  1. ;
  1. ; ----------------------------------------------------------------------------------
  1. ; Request Manager Error Handler
  1. ; ----------------------------------------------------------------------------------
  1. RMERR(XOBCODE,XOBMSG) ; -- send request error message
  1. N XOBDAT,$ET,$ES
  1. S XOBDAT("MESSAGE TYPE")=3
  1. S XOBDAT("ERRORS",1,"FAULT STRING")="System Error"
  1. S XOBDAT("ERRORS",1,"FAULT ACTOR")="Request Manager"
  1. S XOBDAT("ERRORS",1,"CODE")=XOBCODE
  1. S XOBDAT("ERRORS",1,"ERROR TYPE")="Request Manager"
  1. S XOBDAT("ERRORS",1,"CDATA")=0
  1. S XOBDAT("ERRORS",1,"MESSAGE",1)=$$EZBLD^DIALOG(XOBCODE,XOBMSG)
  1. D ERROR^XOBVLIB(.XOBDAT)
  1. ;DO ^%ZTER
  1. D APPERROR^%ZTER("VistALink Error "_XOBCODE) ;*4
  1. Q
  1. ;