其他分享
首页 > 其他分享> > Activiti6核心API

Activiti6核心API

作者:互联网

1.RepositoryService-定义

Repository Service-功能

 @Test
    public void testRepository() {
        RepositoryService repositoryService = activitiRule.getRepositoryService();
        DeploymentBuilder deploymentBuilder = repositoryService.createDeployment();
        deploymentBuilder.name("test deploy resource")
         .addClasspathResource("my-process.xml");
        Deployment deploy = deploymentBuilder.deploy();
        // deploy完成以后,部署对象及流程定义资源文件都会部署到数据库里面
          LOGGER.info("deploy = {}",deploy);

        DeploymentQuery deploymentQuery = repositoryService.createDeploymentQuery();
         Deployment deployment = deploymentQuery.deploymentId(deploy.getId()).singleResult();
        // 流程定义的查询对象
          List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery()
                .deploymentId(deployment.getId())
                .listPage(0, 100);
              for (ProcessDefinition processDefinition : processDefinitions) {
            LOGGER.info("processDefinition ={},version = {},key = {} , id = {}",processDefinition,
             processDefinition.getVersion(),
                    processDefinition.getKey(),
                    processDefinition.getId());
        }       

2.RuntimeService-流程运行控制服务

流程触发

3.任务管理服务-TaskService

IdentityService

HistoryService

HistoryService删除历史操作

其他管理服务

ManagementService

异常策略

ActivitiException
在这里插入图片描述

标签:Task,实例,deploy,核心,流程,查询,Activiti6,API,processDefinition
来源: https://blog.csdn.net/liang000000000001/article/details/123063059