我所用过能画工作流的工具有2个:1.eclipse插件,2.flowable官方网页版,结论是eclipse插件好用,后者要上传下载,还容易丢数据
注意事项:eclipse插件画出来的bpmn文件的schama是activiti,不要改为flowable的,报错没关系,运行会正常,改了可能导致修改bpmn文件时丢数据
对eclipse的版本有限制,Eclipse Mars and Neon.不排除新版本也能用,最好Mars以上
eclipse下载网址:https://www.eclipse.org/downloads/packages/release/2018-12/r/eclipse-ide-eclipse-committers
右下边有历史版本下载,我用的是Mars
在有网络的情况下,安装流程设计器步骤如下:
2.在如下Install界面板中,点击Add按钮:
配置新装插件的地址和名称
3.然后填入下列字段
Name: Flowable BPMN 2.0 designer
Location: http://www.flowable.org/designer/update/
4.回到Install界面,在面板正中列表中把所有展示出来的项目都勾上:
5.点击复选框
在Detail部分记得选中 "Contact all updates sites.." , 因为它会检查所有当前安装所需要的插件并可以被Eclipse下载.
6.安装完以后,点击新建工程new->Other…打开面板,如果看到下图内容:
说明安装成功了。
在没有网络的情况下,安装流程设计器步骤如下:
说明安装成功了
打开菜单Windows->Preferences->Activiti->Save下流程流程图片的生成方式:
虽然流程引擎在单独部署bpmn文件时会自动生成图片,但在实际开发过程中,自动生成的图片会导致和BPMN中的坐标有出入,在实际项目中展示流程当前位置图会有问题。最后单独部署时生成的图片会有问题所在完成以上配置后,会由我们自己来管理流程图片。在发布流程时把流程规则文件和流程图片一起上传就行了。
As mentioned before, all four UI apps can be deployed together on the same Tomcat server, and to get started this is probably the easiest approach. You can choose to only install the Modeler app, for example, but make sure the Flowable IDM app is always running/deployed as well. For this installation guide we’ll describe the installation of all four apps to a Tomcat server.
Download a recent stable version of Apache Tomcat.
Download the latest stable Flowable 6 version.
Copy the flowable-admin.war, flowable-idm.war, flowable-modeler.war and flowable-task.war files from the Flowable distribution wars folder to the Tomcat webapps folder.
Startup the Tomcat server by running the bin/startup.sh (Mac OS and Linux) or bin/startup.bat (Windows) script.
Open a web browser and go to http://localhost:8080/flowable-modeler.
All Flowable UI apps should now be running with an H2 in-memory database and the following login screen should be shown in your web browser:
By default, the Flowable IDM application will create an admin user that has privileges to all the Flowable UI apps. You can login with admin/test and the browser should redirect to the Flowable Modeler application:
Since the UI apps are Spring Boot executable apps it is possible to run them as standalone applications without the need of an application server. Starting single application looks like:
java -jar flowable-idm.war
Usually, you will want to change the default H2 in-memory database configuration to a MySQL or Postgres (or other persistent database) configuration. You can do this per app by changing the application.properties file in the WEB-INF/classes/ directory of each app. However, it is easier to use the Spring Boot Externalized Configuration. An example configuration can be found on Github To change the default configuration to MySQL the following changes are needed to the properties file:
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/flowable?characterEncoding=UTF-8
spring.datasource.username=flowable
spring.datasource.password=flowable
This configuration will expect a flowable database to be present in the MySQL server and the UI apps will automatically generate the necessary database tables. For Postgres the following changes are necessary:
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/flowable
spring.datasource.username=flowable
spring.datasource.password=flowable
In addition to changing the configuration, make sure the database driver is available on the classpath. Again, you could do this for every web application separately by adding the driver JAR file to the WEB-INF/lib folder, but you can also copy the JAR file once to the Tomcat lib folder. For MySQL and Postgres the database drivers can be downloaded from:
MySQL: https://dev.mysql.com/downloads/connector/j
Postgres: https://jdbc.postgresql.org/
When running the apps as standalone applications the database driver can be added by using the loader.path
property.
java -Dloader.path=/location/to/your/driverfolder -jar flowable-idm.war
See the PropertiesLauncher
Features in the Spring Boot reference documentation for more information.
在Flowable官网或github下载 flowable-6.4.0.zip,里面有4个压缩包,用途如下所示,官网上抄来的
Flowable provides several ui web applications to demonstrate and leverage the functionality provided by the Flowable project:
Flowable IDM: an Identity Management application that provides single sign-on authentication functionality for all the Flowable UI applications, and, for users with the IDM administrative privilege, it also provides functionality to manage users, groups and privileges. 单点登录,公用账号:admin/test
Flowable Modeler: an application that allows users with modeler privileges to model processes, forms, decision tables and application definitions.设计流程、表单、表格
Flowable Task: a runtime task application that provides functionality to start process instances, edit task forms, complete tasks and query on tasks and process instances. 演示带task的流程
Flowable Admin: an administrative application that allows users with admin privilege to query the BPMN, DMN, form and content engines and provides several options to change process instances, tasks, jobs and so on. The admin application connects to the engines through the REST API that is deployed together with the Flowable Task app and the Flowable REST app. 管理员,能查到关于流程的很多东西
The Flowable IDM is required for all other apps to enable authentication. The WAR files for each app can be deployed to the same servlet container (such as Apache Tomcat), but can also be deployed on different servlet containers. Because the same cookie is used for authentication with each app, the apps need to run on the same domain.
Flowable also provides the flowable-rest.war
which contains the Flowable REST API. More about this can be read in the REST API chapter.
The apps are Spring Boot 2.0 based, which means that that the WAR files are actually executable and can be run as a normal standalone applications. See The Executable Jar Format in the Spring Boot reference documentation.