예제 #1
0
 public Centaur()
 {
     _clsHRecord          = new CentaurHeaderRecord();
     _clsPRecord          = new CentaurPatientRecord();
     _clsORecord          = new CentaurOrderRecord();
     _clsQRecord          = new CentaurQueryRecord();
     _clsRRecord          = new CentaurResultRecord();
     _clsTRecord          = new CentaurTerminationRecord();
     TransitionCompleted += HandleTransitionCompleted;
 }
예제 #2
0
 public CentaurManager()
 {
     try
     {
         _clsHRecord = new CentaurHeaderRecord();
         _clsPRecord = new CentaurPatientRecord();
         _clsORecord = new CentaurOrderRecord();
         _clsQRecord = new CentaurQueryRecord();
         _clsRRecord = new CentaurResultRecord();
         _clsTRecord = new CentaurTerminationRecord();
     }
     catch (Exception ex)
     {
         Log.Error(string.Format("Error: {0}", ex));
     }
 }
예제 #3
0
        public Centaur()
        {
            try
            {
                _clsHRecord              = new CentaurHeaderRecord();
                _clsPRecord              = new CentaurPatientRecord();
                _clsORecord              = new CentaurOrderRecord();
                _clsQRecord              = new CentaurQueryRecord();
                _clsRRecord              = new CentaurResultRecord();
                _clsTRecord              = new CentaurTerminationRecord();
                PrvRequestArray          = new Queue <string>();
                _failSending             = 0;
                _timeoutManager          = new Timer(30000);
                _timeoutManager.Elapsed += _timeoutManager_Elapsed;
                objService = new ExternalDataExchangeService();

                InstanceId = Guid.NewGuid();
                objWorkFlowRuntime.AddService(objService);
                objASTM = new ClsAstm();
                objService.AddService(objASTM);
                objASTM.SendACKEvent += objASTM_SendACKEvent;
                objASTM.SendNAKEvent += objASTM_SendNAKEvent;
                objASTM.SendENQEvent += objASTM_SendENQEvent;
                objASTM.SendEOTEvent += objASTM_SendEOTEvent;
                //objASTM.ACKTimeoutEvent += new EventHandler(objASTM_ACKTimeoutEvent);
                objWorkFlowInstance = objWorkFlowRuntime.CreateWorkflow(typeof(ASTMWorkflow), null, InstanceId);
                objWorkFlowInstance.Start();
                Console.WriteLine(@"Work flow started");

                objDataEventArgs             = new ExternalDataEventArgs(InstanceId);
                objDataEventArgs.WaitForIdle = true;
                DumpStateMachine(objWorkFlowRuntime, InstanceId);
            }
            catch (Exception ex)
            {
                Log.FatalException("Fatal Error: ", ex);
            }
        }