Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        public ProcessEngineWrapper(ProcessInstanceConverter processInstanceConverter,
                                    PageableProcessInstanceRepositoryService pageableProcessInstanceService,
                                    TaskConverter taskConverter,
                                    PageableTaskRepositoryService pageableTaskService,
                                    MessageProducerActivitiEventListener listener,
                                    SecurityPoliciesApplicationService securityService,
                                    AuthenticationWrapper authenticationWrapper,
                                    IApplicationEventPublisher eventPublisher,
                                    IProcessEngine processEngine,
                                    HistoricInstanceConverter historicInstanceConverter,
                                    ILoggerFactory loggerFactory)
        {
            this.processEngine                  = processEngine;
            this.processInstanceConverter       = processInstanceConverter;
            this.runtimeService                 = processEngine.RuntimeService;
            this.pageableProcessInstanceService = pageableProcessInstanceService;
            this.taskService         = processEngine.TaskService;
            this.taskConverter       = taskConverter;
            this.pageableTaskService = pageableTaskService;
            this.historyService      = processEngine.HistoryService;
#warning 暂时不处理事件侦听
            //this.runtimeService.addEventListener(listener);
            this.securityService           = securityService;
            this.repositoryService         = processEngine.RepositoryService;
            this.authenticationWrapper     = authenticationWrapper;
            this.eventPublisher            = eventPublisher;
            this.historicInstanceConverter = historicInstanceConverter;
            logger = loggerFactory.CreateLogger <ProcessEngineWrapper>();
        }
Beispiel #2
0
        /// <summary>
        /// 读取分页记录
        /// </summary>
        /// <param name="taskService">任务仓储服务</param>
        /// <param name="pageableRepositoryService">分页仓储服务</param>
        /// <param name="qo">查询对象</param>
        /// <returns></returns>
        public IPage <TaskModel> LoadPage(ITaskService taskService,
                                          PageableTaskRepositoryService pageableRepositoryService,
                                          TaskQuery qo)
        {
            TaskQueryImpl query = taskService.CreateTaskQuery() as TaskQueryImpl;

            FastCopy.Copy <TaskQuery, TaskQueryImpl>(qo, query);

            pageableRepositoryService.SortApplier.ApplySort(query, qo.Pageable);

            IPage <TaskModel> defs = pageableRepositoryService.PageRetriever.LoadPage(query, qo.Pageable, pageableRepositoryService.TaskConverter);

            return(defs);
        }
 /// <inheritdoc />
 public ProcessInstanceTasksControllerImpl(PageableTaskRepositoryService pageableTaskService, TaskResourceAssembler taskResourceAssembler)
 {
     this.pageableTaskService   = pageableTaskService;
     this.taskResourceAssembler = taskResourceAssembler;
 }