public ActivitiWorker(IProcessDefinitionService processDefinitionService, IProcessInstanceService processInstanceService, ITaskService taskService, ITaskFormService taskFormService) { _processDefinitionService = processDefinitionService; _processInstanceService = processInstanceService; _taskService = taskService; _taskFormService = taskFormService; }
public void ContainerTest() { container = new WindsorContainer(TestHelper.GetConfigDir() + "WindsorContainerTest.xml"); IOrganisationService organisationSession = (IOrganisationService)container["OrganisationSession"]; Assert.IsNotNull(organisationSession); organisationSession = (IOrganisationService)container[typeof(IOrganisationService)]; Assert.IsNotNull(organisationSession); ISchedulerSessionLocal schedulerSession = (ISchedulerSessionLocal)container["SchedulerSession"]; Assert.IsNotNull(schedulerSession); schedulerSession = (ISchedulerSessionLocal)container[typeof(ISchedulerSessionLocal)]; Assert.IsNotNull(schedulerSession); IProcessDefinitionService definitionSession = (IProcessDefinitionService)container["DefinitionSession"]; Assert.IsNotNull(definitionSession); definitionSession = (IProcessDefinitionService)container[typeof(IProcessDefinitionService)]; Assert.IsNotNull(definitionSession); IExecutionApplicationService executionSession = (IExecutionApplicationService)container["ExecutionSession"]; Assert.IsNotNull(executionSession); executionSession = (IExecutionApplicationService)container[typeof(IExecutionApplicationService)]; Assert.IsNotNull(executionSession); ILogSessionLocal logSession = (ILogSessionLocal)container["LogSession"]; Assert.IsNotNull(logSession); logSession = (ILogSessionLocal)container[typeof(ILogSessionLocal)]; Assert.IsNotNull(logSession); }
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(); } } }
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 SetContainer() { //configure the container _container = new NetBpmContainer(new XmlInterpreter("WindsorConfig.xml")); servicelocator = ServiceLocator.Instance; processDefinitionService = servicelocator.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService; executionComponent = servicelocator.GetService(typeof(IExecutionApplicationService)) as IExecutionApplicationService; }
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 AccountController( IAccountService accountService, IAuthInfoProvider authInfoProvider, IUserService userService, IProcessDefinitionService processDefinitionService ) { _processDefinitionService = processDefinitionService; _accountService = accountService; _authInfoProvider = authInfoProvider; _userService = userService; }
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 StressTest() { IProcessDefinitionService definitionComponent = null; for (int i = 1; i < 20; i++) { definitionComponent = ServiceLocator.Instance.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService; IList definitions = definitionComponent.GetProcessDefinitions(null); Assert.IsNotNull(definitions); ServiceLocator.Instance.Release(definitionComponent); } }
public void StressTest() { container = new WindsorContainer(TestHelper.GetConfigDir() + "WindsorContainerTest.xml"); IProcessDefinitionService definitionSession = null; for (int i = 1; i < 20; i++) { definitionSession = (IProcessDefinitionService)container["DefinitionSession"]; Assert.IsNotNull(definitionSession); definitionSession = (IProcessDefinitionService)container[typeof(IProcessDefinitionService)]; Assert.IsNotNull(definitionSession); container.Release(definitionSession); definitionSession = null; } }
public void ServiceLocatorStressTest() { for (int i = 1; i < 5; i++) { //configure the container NetBpmContainer container = new NetBpm.NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir() + "app_config.xml")); IProcessDefinitionService definitionComponent = null; definitionComponent = ServiceLocator.Instance.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService; IList definitions = definitionComponent.GetProcessDefinitions(null); Assert.IsNotNull(definitions); ServiceLocator.Instance.Release(definitionComponent); container.Dispose(); container = null; } }
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 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 ProcessDefinitionController(IWfEngine wfEngine, IProcessDefinitionService processDefinitionService) { _processProvider = wfEngine.GetDefinitionProvider(); _processDefinitionService = processDefinitionService; }