package com.zcc.activiti02;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngineConfiguration;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.repository.ProcessDefinitionQuery;
import java.util.List;
/**
* 删除流程定义的相关信息
* 相关表:
* * act_re_deployment
* * act_re_procdef
* * act_ge_bytearray
*/
public class DeleteProcessDefinition {
public static void main(String[] args) {
//创建流程引擎配置类
ProcessEngineConfiguration processEngineConfiguration=
ProcessEngineConfiguration.createProcessEngineConfigurationFromResource("activiti.cfg.xml");
//流程引擎对象
ProcessEngine processEngine = processEngineConfiguration.buildProcessEngine();
RepositoryService repositoryService = processEngine.getRepositoryService();
//删除流程定义 参数表述流程部署id 可以通过查询部署的信息得到流程部署id
repositoryService.deleteDeployment("1");
}
}