package org.activiti.engine;
/**
* Service providing access to the repository of process definitions and deployments.
* RepositoryService 提供访问流程定义和发布的仓库
*
*/
@Internal
public interface RepositoryService {
/** Starts creating a new deployment */
启动创建一个新的部署 act_re_deployment 部署 act_re_procdef 定义 act_ge_bytearray 二进制文件
//文件路径
.addClasspathResource("processes/Bohui4huiqianz.bpmn")
//act_re_procdef name 只针对bpmn定义 act_re_deployment name “processtest03”
.name("Bohui4huiqianz")
.deploy();
DeploymentBuilder createDeployment();
/**
* 删除已有的部署 ,不能删除正在运行或者历史实例或者任务(事件)的部署
* Deletes the given deployment.
*
* @param deploymentId
* id of the deployment, cannot be null.
* @throwns RuntimeException if there are still runtime or history process instances or jobs.
*/
void deleteDeployment(String deploymentId);
/**
删除已有的部署 ,并且删除层级进程实例、历史进程和 任务(事件)的部署
* Deletes the given deployment and cascade deletion to process instances, history process instances and jobs.
*
* @param deploymentId
* id of the deployment, cannot be null.
*/
void deleteDeployment(String deploymentId, boolean cascade);
/**
获得部署资源列表以字母排序
* Retrieves a list of deployment resources for the given deployment, ordered alphabetically.
*
* @param deploymentId
* id of the deployment, cannot be null.
*/
List<String> getDeploymentResourceNames(String deploymentId);
/**
* Gives access to a deployment resource through a stream of bytes.
* 获取部署的字节流
* @param deploymentId
* id of the deployment, cannot be null.
* @param resourceName
* name of the resource, cannot be null.
* @throws ActivitiObjectNotFoundException
* when the resource doesn't exist in the given deployment or when no deployment exists for the given deploymentId.
*/
InputStream getResourceAsStream(String deploymentId, String resourceName);
/** Query process definitions. */
流程定义查询可以设置一系类的参数 ProcessRuntimeImpl 中的 分页查询参数无效
ProcessDefinitionQuery createProcessDefinitionQuery();
/**
* Returns a new {@link org.activiti.engine.query.NativeQuery} for process definitions.
*/
NativeProcessDefinitionQuery createNativeProcessDefinitionQuery();
/** Query deployment. */
DeploymentQuery createDeploymentQuery();
/**
* Returns a new {@link org.activiti.engine.query.NativeQuery} for deployment.
*/
NativeDeploymentQuery createNativeDeploymentQuery();
/**
挂起的流程定义查询
* Suspends the process definition with the given id.
*
* If a process definition is in state suspended, it will not be possible to start new process instances based on the process definition.
*
* <strong>Note: all the process instances of the process definition will still be active (ie. not suspended)!</strong>
*
* @throws ActivitiObjectNotFoundException
* if no such processDefinition can be found
* @throws ActivitiException
* if the process definition is already in state suspended.
*/
void suspendProcessDefinitionById(String processDefinitionId);
/**
* 激活流程定义查询
* Activates the process definition with the given id.
*
* @throws ActivitiObjectNotFoundException
* if no such processDefinition can be found or if the process definition is already in state active.
*/
void activateProcessDefinitionById(String processDefinitionId);
/**
获取部署流程的xml
* Gives access to a deployed process model, e.g., a BPMN 2.0 XML file, through a stream of bytes.
*
* @param processDefinitionId
* id of a {@link ProcessDefinition}, cannot be null.
* @throws ActivitiObjectNotFoundException
* when the process model doesn't exist.
*/
InputStream getProcessModel(String processDefinitionId);
/**
* Returns the {@link ProcessDefinition} including all BPMN information like additional Properties (e.g. documentation).
*/
ProcessDefinition getProcessDefinition(String processDefinitionId);
/**
* Checks if the process definition is suspended.
*/
boolean isProcessDefinitionSuspended(String processDefinitionId);
/**
返回 BpmnModel 与提供的的流程定义ID相对应流程定义。
BpmnModel是标准的java pojo对象
* Returns the {@link BpmnModel} corresponding with the process definition with the provided process definition id. The {@link BpmnModel} is a pojo versions of the BPMN 2.0 xml and can be used to
* introspect the process definition using regular Java.
*/
BpmnModel getBpmnModel(String processDefinitionId);
/**
* 部署的时候可以用代码形式部署流程
* Creates a new model. The model is transient and must be saved using {@link #saveModel(Model)}.
*/
public Model newModel();
}