Flowable 6.6.0 用户指南相关文档下载
- BPMN用户指南 第一部分 - 中文PDF精编版
- BPMN用户指南 第二部分 - 中文PDF精编版
- BPMN用户指南 第三部分 - 中文PDF精编版
- 应用程序指南 - 中文PDF精编版
- 应用程序指南 - 中英对照PDF精编版
- 应用程序指南 - Eclipse设计器中文PDF精编版
- 表单用户指南 - 中文PDF精编版
- 事件注册表用户指南 - 中文PDF精编版
《Flowable 6.6.0 BPMN用户指南》
1. 入门
2. 配置
3 The Flowable API
4 Flowable 6.6.0 BPMN用户指南 - (4)Spring集成
5 Spring Boot
6 部署
6.1 业务归档
6.2 以编程方式部署
6.3 外部资源
6.4 流程定义的版本控制
6.5 提供流程图
6.6 生成流程图
6.7 类别
有关Flowable的更多文档,参见:
6.5 提供流程图
A process diagram image can be added to a deployment. This image will be stored in the Flowable repository and is accessible through the API. This image is also used to visualize the process in Flowable apps.
Suppose we have a process on our classpath, org/flowable/expenseProcess.bpmn20.xml that has a process key ‘expense’. The following naming conventions for the process diagram image apply (in this specific order):
可以将流程图添加到部署中。此图将存储在Flowable存储库中,并可通过API进行访问。此图还用于可视化Flowable应用程序中的流程。
假设我们在classpath上有一个流程,org/flowable/expenseProcess.bpmn20.xml,流程键为“expense”。流程图命名适用以下命名约定(按此特定顺序):
- If an image resource exists in the deployment that has a name of the BPMN 2.0 XML file name concatenated with the process key and an image suffix, this image is used. In our example, this would be org/flowable/expenseProcess.expense.png (or .jpg/gif). In case you have multiple images defined in one BPMN 2.0 XML file, this approach makes most sense. Each diagram image will then have the process key in its file name.
- If no such image exists, an image resource in the deployment matching the name of the BPMN 2.0 XML file is searched for. In our example this would be org/flowable/expenseProcess.png. Note that this means that every process definition defined in the same BPMN 2.0 file has the same process diagram image. In case there is only one process definition in each BPMN 2.0 XML file, this is obviously not a problem.
Example when deploying programmatically:
- 如果部署中存在一个图像资源,其名称为BPMN 2.0 XML文件名,加上流程键,再加图像后缀,则使用此图像。在我们的示例中,这将是org/flowable/expenseProcess.expense.png(或.jpg/gif)。如果在一个BPMN 2.0 XML文件中定义了多个图像,那么这种方法最有意义。然后,每个流程图图像的文件名中都会有流程键。
- 如果不存在这样的图像,则在部署中搜索与BPMN 2.0 XML文件名匹配的图像资源。在我们的示例中,这将是org/flowable/expenseProcess.png。 请注意,这意味着在同一个BPMN 2.0文件中定义的每个流程定义都具有相同的流程图。如果每个BPMN 2.0 XML文件中只有一个流程定义,这显然不是问题。
以编程方式部署时的示例:
repositoryService.createDeployment()
.name("expense-process.bar")
.addClasspathResource("org/flowable/expenseProcess.bpmn20.xml")
.addClasspathResource("org/flowable/expenseProcess.png")
.deploy();
The image resource can be retrieved through the API afterwards:
之后可以通过API检索图像资源:
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey("expense")
.singleResult();
String diagramResourceName = processDefinition.getDiagramResourceName();
InputStream imageStream = repositoryService.getResourceAsStream(
processDefinition.getDeploymentId(), diagramResourceName);
6.6 生成流程图
If no image is provided in the deployment, as described in the previous section, the Flowable engine will generate a process diagram image if the process definition contains the necessary ‘diagram interchange’ information.
The resource can be retrieved in exactly the same way as when an image is provided in the deployment.
如果部署中没有提供图像(如前一节所述),那么如果流程定义包含必需的“图交换”(diagram interchange)信息,则Flowable引擎将生成流程图图像。
可以使用与在部署中提供图像时完全相同的方式检索资源。
If, for some reason, it’s not necessary or desirable to generate a diagram during deployment, the isCreateDiagramOnDeploy property can be set on the process engine configuration:
如果出于某种原因,不需要或不希望在部署期间生成流程图,则可以在流程引擎配置上设置isCreateDiagramOnDeploy属性:
<property name="createDiagramOnDeploy" value="false" />
此时就不会生成流程图了。
6.7 类别
Both deployments and process definitions have user-defined categories. The process definition category is initialized with the value of the targetNamespace attribute in the BPMN XML: <definitions … targetNamespace=“yourCategory” …
The deployment category can also be specified in the API like this:
部署和流程定义都有用户定义的类别。流程定义类别是用BPMN XML中targetNamespace属性的值初始化的:
<definitions
...
targetNamespace="yourCategory"
...
</definitions>
也可以在API中指定部署类别,如下所示:
repositoryService
.createDeployment()
.category("yourCategory")
...
.deploy();
培训视频推荐
CSDN上提供了Flowable 6.6.0的系列培训视频课程,欢迎有兴趣的朋友前往学习。