コード例 #1
0
        public virtual TItemPackageType GetItemById(string id)
        {
            var retval = _dataRepository.Load(id);

            if (null == retval)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NotFound));
            }
            return(retval);
        }
コード例 #2
0
        private string GetWorkflowTemplate(string workflowId)
        {
            string template = null;


            WorkflowInstanceInfo inst;

            inst = _instanceData.Load(workflowId).Item;



            if (null != inst)
            {
                _dblog.InfoFormat("Workflow {0} loading template {1}", workflowId, inst.TemplateName);
                template = LoadWorkflowTemplate(inst.TemplateName);
            }
            else
            {
                var es = string.Format("Cannot load template for non-existent workflow instance {0}", workflowId);
                _log.Error(es);
                var on = Catalog.Factory.Resolve <IApplicationAlert>();
                on.RaiseAlert(ApplicationAlertKind.Unknown, es);
            }

            return(template);
        }
コード例 #3
0
 private void RefreshInstanceInfo()
 {
     _info = _instanceData.Load(_instance).Item;
 }