Пример #1
0
        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();
                }
            }
        }
Пример #2
0
		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();
				}
			}
		}
Пример #3
0
 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;
		}
Пример #5
0
 public void SetContainer()
 {
     //configure the container
     _container           = new NetBpmContainer(new XmlInterpreter("WindsorConfig.xml"));
     servicelocator       = ServiceLocator.Instance;
     _organisationService = servicelocator.GetService(typeof(IOrganisationService)) as IOrganisationService;
 }
Пример #6
0
		public void TearDown()
		{
			testAssignmentContext = null;
			ServiceLocator.Instance.Release(organisationComponent);
			container.Dispose();
			container = null;
//			serviceLocator.release(organisationComponent);
		}
Пример #7
0
        public void TearDown()
        {
            testAssignmentContext = null;
            ServiceLocator.Instance.Release(organisationComponent);
            container.Dispose();
            container = null;
//			serviceLocator.release(organisationComponent);
        }
Пример #8
0
 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();
 }
Пример #9
0
        public void DisposeContainer()
        {
            servicelocator.Release(_organisationService);
            _organisationService = null;

            _container.Dispose();
            _container = null;
        }
Пример #10
0
 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;
 }
Пример #11
0
		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();
		}
Пример #12
0
		public void DisposeContainer()
		{	
			servicelocator.Release(definitionComponent);
			definitionComponent=null;
			servicelocator.Release(executionComponent);
			executionComponent=null;

			_container.Dispose();
			_container = null;
		}
Пример #13
0
        public void DisposeContainer()
        {
            servicelocator.Release(definitionComponent);
            definitionComponent = null;
            servicelocator.Release(executionComponent);
            executionComponent = null;

            _container.Dispose();
            _container = null;
        }
Пример #14
0
 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");
 }
Пример #15
0
		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");

		}
Пример #16
0
		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();
				}
			}
		}
Пример #17
0
        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();
                }
            }
        }
Пример #18
0
		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);

		}
Пример #19
0
        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;
		}
Пример #21
0
 public void TearDown()
 {
     servicelocator.Release(orgComp);
     container.Dispose();
     container = null;
 }
Пример #22
0
		public void DisposeContainer()
		{
			_container.Dispose();
			_container = null;
		}
Пример #23
0
		public void InitContainer()
		{
			_container = new NetBpmContainer( 
				new XmlInterpreter("../app_test_config.xml") );
		}