public void Config() { var c = new Castle.Windsor.WindsorContainer(); var endpoint = CodeSharp.ServiceFramework.Configuration .Configure() .Castle(c) .Log4Net(true) .Associate(new Uri(System.Configuration.ConfigurationManager.AppSettings["CenterUri"])) .Identity(new CodeSharp.ServiceFramework.Identity() { Source = "NTFE-BPM", AuthKey = "75DC6B572D1B940E34159DCD7FF26D8D" }) .Endpoint(); endpoint.Run(); this._log = endpoint.Resolve <ILoggerFactory>().Create(this.GetType()); this._clientApi = c.Resolve <Taobao.Workflow.Activities.Client.ITFlowEngine>(); this._managementApi = c.Resolve <Taobao.Workflow.Activities.Management.ITFlowEngine>(); //NTFE使用ID作为账号库用户名 //UDONE:由于人员服务未做mock,因此目前取固定值 this._originator = "5FE9A969-7CB2-4BA7-9601-E11473E8B233"; //this.GetMappedUserId(this._originator).ToString(); this._superior = "9D23EAA9-6145-4635-A7C2-D8AEEDF45C1E"; //this.GetMappedUserId(this._superior).ToString(); }
public void Config() { var c = new Castle.Windsor.WindsorContainer(); var endpoint = CodeSharp.ServiceFramework.Configuration .Configure() .Castle(c) .Log4Net(true) .Associate(new Uri(System.Configuration.ConfigurationManager.AppSettings["CenterUri"])) .Identity(new CodeSharp.ServiceFramework.Identity() { Source = "NTFE-BPM", AuthKey = "75DC6B572D1B940E34159DCD7FF26D8D" }) .Endpoint(); endpoint.Run(); this._log = endpoint.Resolve<ILoggerFactory>().Create(this.GetType()); this._clientApi = c.Resolve<Taobao.Workflow.Activities.Client.ITFlowEngine>(); this._managementApi = c.Resolve<Taobao.Workflow.Activities.Management.ITFlowEngine>(); //NTFE使用ID作为账号库用户名 //UDONE:由于人员服务未做mock,因此目前取固定值 this._originator = "5FE9A969-7CB2-4BA7-9601-E11473E8B233";//this.GetMappedUserId(this._originator).ToString(); this._superior = "9D23EAA9-6145-4635-A7C2-D8AEEDF45C1E";//this.GetMappedUserId(this._superior).ToString(); }