protected override void ExecuteTask() { NetBpmContainer container = null; IProcessDefinitionService definitionComponent = null; try { //configure the container container = new NetBpmContainer(new XmlInterpreter(ConfigFile)); definitionComponent = ServiceLocator.Instance.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService; if (definitionComponent == null) { throw new ArgumentException("Can’t create definition component. Container is not configured please check the configfile:" + ConfigFile); } Thread.CurrentPrincipal = new PrincipalUserAdapter(user); FileInfo parFile = new FileInfo(ParFile); FileStream fstream = parFile.OpenRead(); byte[] b = new byte[parFile.Length]; fstream.Read(b, 0, (int)parFile.Length); definitionComponent.DeployProcessArchive(b); } finally { if (container != null) { if (definitionComponent != null) { container.Release(definitionComponent); } container.Dispose(); } } }
protected override void ExecuteTask() { NetBpmContainer container=null; IDefinitionSessionLocal definitionComponent = null; try { //configure the container container = new NetBpmContainer(new XmlInterpreter(ConfigFile)); definitionComponent = ServiceLocator.Instance.GetService(typeof (IDefinitionSessionLocal)) as IDefinitionSessionLocal; if (definitionComponent==null) { throw new ArgumentException("Can’t create definition component. Container is not configured please check the configfile:"+ConfigFile); } Thread.CurrentPrincipal = new PrincipalUserAdapter(user); FileInfo parFile = new FileInfo(ParFile); FileStream fstream = parFile.OpenRead(); byte[] b = new byte[parFile.Length]; fstream.Read(b, 0, (int) parFile.Length); definitionComponent.DeployProcessArchive(b); } finally { if (container!=null) { if (definitionComponent!=null) { container.Release(definitionComponent); } container.Dispose(); } } }
public void SetUp() { //configure the container container = new NetBpm.NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir() + "app_config.xml")); servicelocator = ServiceLocator.Instance; orgComp = servicelocator.GetService(typeof(IOrganisationService)) as IOrganisationService; }
public void SetUp() { //configure the container container = new NetBpm.NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir()+"app_config.xml")); servicelocator = ServiceLocator.Instance; orgComp = servicelocator.GetService(typeof (IOrganisationService)) as IOrganisationService; }
public void SetContainer() { //configure the container _container = new NetBpmContainer(new XmlInterpreter("WindsorConfig.xml")); servicelocator = ServiceLocator.Instance; _organisationService = servicelocator.GetService(typeof(IOrganisationService)) as IOrganisationService; }
public void TearDown() { testAssignmentContext = null; ServiceLocator.Instance.Release(organisationComponent); container.Dispose(); container = null; // serviceLocator.release(organisationComponent); }
public void TearDown() { testAssignmentContext = null; ServiceLocator.Instance.Release(organisationComponent); container.Dispose(); container = null; // serviceLocator.release(organisationComponent); }
public void SetUp() { //configure the container container = new NetBpm.NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir() + "app_config.xml")); organisationComponent = (IOrganisationService)ServiceLocator.Instance.GetService(typeof(IOrganisationService)); testAssignmentContext = new TestAssignmentContext(this, organisationComponent); assignmentExpressionResolver = new AssignmentExpressionResolver(); }
public void DisposeContainer() { servicelocator.Release(_organisationService); _organisationService = null; _container.Dispose(); _container = null; }
public void SetContainer() { //configure the container _container = new NetBpmContainer(new XmlInterpreter("WindsorConfig.xml")); servicelocator = ServiceLocator.Instance; definitionComponent = servicelocator.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService; executionComponent = servicelocator.GetService(typeof(IExecutionApplicationService)) as IExecutionApplicationService; }
public void SetUp() { //configure the container container = new NetBpm.NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir()+"app_config.xml")); organisationComponent = (IOrganisationService) ServiceLocator.Instance.GetService(typeof (IOrganisationService)); testAssignmentContext = new TestAssignmentContext(this,organisationComponent); assignmentExpressionResolver = new AssignmentExpressionResolver(); }
public void DisposeContainer() { servicelocator.Release(definitionComponent); definitionComponent=null; servicelocator.Release(executionComponent); executionComponent=null; _container.Dispose(); _container = null; }
public void DisposeContainer() { servicelocator.Release(definitionComponent); definitionComponent = null; servicelocator.Release(executionComponent); executionComponent = null; _container.Dispose(); _container = null; }
public void SetContainer() { //configure the container _container = new NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir() + "app_config.xml")); testUtil = new TestUtil(); servicelocator = ServiceLocator.Instance; definitionComponent = servicelocator.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService; executionComponent = servicelocator.GetService(typeof(IExecutionApplicationService)) as IExecutionApplicationService; testUtil.LoginUser("ae"); }
public void SetContainer() { //configure the container _container = new NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir()+"app_config.xml")); testUtil = new TestUtil(); servicelocator = ServiceLocator.Instance; definitionComponent = servicelocator.GetService(typeof (IDefinitionSessionLocal)) as IDefinitionSessionLocal; executionComponent = servicelocator.GetService(typeof (IExecutionSessionLocal)) as IExecutionSessionLocal; testUtil.LoginUser("ae"); }
protected override void ExecuteTask() { NetBpmContainer container=null; try { //configure the container container = new NetBpmContainer(new XmlInterpreter(ConfigFile)); Thread.CurrentPrincipal = new PrincipalUserAdapter(user); IPPMSessionLocal ppmComponent=(IPPMSessionLocal)container["PPMSession"]; ppmComponent.ExportPPMFile(ExportPath); } finally { if (container!=null) { container.Dispose(); } } }
protected override void ExecuteTask() { NetBpmContainer container = null; try { //configure the container container = new NetBpmContainer(new XmlInterpreter(ConfigFile)); Thread.CurrentPrincipal = new PrincipalUserAdapter(user); IPPMSessionLocal ppmComponent = (IPPMSessionLocal)container["PPMSession"]; ppmComponent.ExportPPMFile(ExportPath); } finally { if (container != null) { container.Dispose(); } } }
public void SetContainer() { //configure the container _container = new NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir()+"app_config.xml")); testUtil = new TestUtil(); servicelocator = ServiceLocator.Instance; definitionComponent = servicelocator.GetService(typeof (IDefinitionSessionLocal)) as IDefinitionSessionLocal; executionComponent = servicelocator.GetService(typeof (IExecutionSessionLocal)) as IExecutionSessionLocal; schedulerComponent = servicelocator.GetService(typeof (ISchedulerSessionLocal)) as ISchedulerSessionLocal; organisationComponent = servicelocator.GetService(typeof (IOrganisationSessionLocal)) as IOrganisationSessionLocal; testUtil.LoginUser("ae"); // deploy Archiv FileInfo parFile = new FileInfo(TestHelper.GetExampleDir()+GetParArchiv()); FileStream fstream = parFile.OpenRead(); byte[] b = new byte[parFile.Length]; fstream.Read(b, 0, (int) parFile.Length); definitionComponent.DeployProcessArchive(b); }
public void SetContainer() { //configure the container _container = new NetBpmContainer(new XmlInterpreter("app_config.xml")); testUtil = new TestUtil(); servicelocator = ServiceLocator.Instance; definitionComponent = servicelocator.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService; executionComponent = servicelocator.GetService(typeof(IExecutionApplicationService)) as IExecutionApplicationService; schedulerComponent = servicelocator.GetService(typeof(ISchedulerSessionLocal)) as ISchedulerSessionLocal; organisationComponent = servicelocator.GetService(typeof(IOrganisationService)) as IOrganisationService; testUtil.LoginUser("ae"); // Par是一個壓縮檔,除了有定義檔之外,還有可以用來展出Web-UI定義及相關圖形 FileInfo parFile = new FileInfo(TestHelper.GetExampleDir() + GetParArchiv()); FileStream fstream = parFile.OpenRead(); byte[] b = new byte[parFile.Length]; fstream.Read(b, 0, (int)parFile.Length); //此處在解壓縮Par definitionComponent.DeployProcessArchive(b); }
public void TearDown() { servicelocator.Release(orgComp); container.Dispose(); container = null; }
public void TearDown() { servicelocator.Release(orgComp); container.Dispose(); container = null; }
public void DisposeContainer() { _container.Dispose(); _container = null; }
public void InitContainer() { _container = new NetBpmContainer( new XmlInterpreter("../app_test_config.xml") ); }