activiti6 ui搭建

模块结构说明

模块说明地址账号/密码库表说明
activiti-admin提供管理员功能http://localhost:8080/activiti-adminadmin/admin9张表
activiti-appactiviti-app提供了一个流程的建模工具,支持流程模型的导出和发布到activi系统,也提供了一个相对简单到流程审批界面和流程发起界面,但完成度不高http://localhost:8080/activiti-appadmin/test48张表(包含activiti-rest中的28张表)
activiti-rest提供activiti 所有rest api接口http://localhost:8080/activiti-restkermit/kermit28张表

由于上图可见activiti-admin中的49张表中已包含activiti-rest的28张表,而activiti-rest中的28张表是后端的核心业务表,后端所有数据表都存在这28张表中,activiti-app剩余21张表用来存储在线流程设计。所以我们在后期配置模块的数据库时可以考虑activiti-app、activiti-rest两个模块共用一个库

部署

1:下载Activiti

地址:https://github.com/Activiti/Activiti/releases/download/activiti-6.0.0/activiti-6.0.0.zip
并将wars下的三个目录上传到tomcat的webapps目录下
在这里插入图片描述

2:启动tomcat

进入tomcat目录启动tomcat,会发现目录下多了三个包activiti-admin、activiti-app、activiti-rest目录,首次部署需要初始化数据库,时间可能比较长,默认用的是自带的内存数据库h2,后面我们需要把数据库改成我们定义好的数据库。同时需要把之前的war给删除,不然你每次启动tomcat他都会重新生成对应的activiti-admin、activiti-app、activiti-rest目录会把你手动配置的配置项给还原。

3 修改数据库配置

前提库要提前建立好,表结构会自动生成,这里我们activiti-app、activiti-rest两个模块共用一个库。

3.1 activiti-admin数据库配置

进入activiti-admin/WEB-INF/classes/META-INF/activiti-admin下找到activiti-admin.properties文件按图修改
在这里插入图片描述

完整配置如下

# security configuration (this key should be unique for your application, and kept secret)
security.rememberme.key=activitis3cr3tk3y



# H2 example (default)

#datasource.driver=org.h2.Driver
#datasource.url=jdbc:h2:tcp://localhost/activitiadmin

# MySQL example

#自定义配置-dev
datasource.driver=com.mysql.jdbc.Driver
datasource.url=jdbc:mysql://ip:3306/数据库?useUnicode=true&&useAffectedRows=true&&characterEncoding=UTF-8&&autoReconnect=true&&zeroDateTimeBehavior=convertToNull&&transformedBitIsBoolean=true&&allowMultiQueries=true
datasource.username=root
datasource.password=root
hibernate.dialect=org.hibernate.dialect.MySQLDialect

#datasource.driver=com.mysql.jdbc.Driver
#datasource.url=jdbc:mysql://127.0.0.1:3306/activitiadmin?characterEncoding=UTF-8

#datasource.driver=org.postgresql.Driver
#datasource.url=jdbc:postgresql://localhost:5432/activitiadmin

#datasource.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#datasource.url=jdbc:sqlserver://localhost:1433;databaseName=activitiadmin

#datasource.driver=oracle.jdbc.driver.OracleDriver
#datasource.url=jdbc:oracle:thin:@localhost:1521:ACTIVITIADMIN

#datasource.driver=com.ibm.db2.jcc.DB2Driver
#datasource.url=jdbc:db2://localhost:50000/activitiadmin

#datasource.username=activiti
#datasource.password=

# JNDI CONFIG

# If uncommented, the datasource will be looked up using the configured JNDI name.
# This will have preference over any datasource configuration done below that doesn't use JNDI
#
# Eg for JBoss: java:jboss/datasources/activitiDS
#
#datasource.jndi.name=jdbc/activitiDS

# Set whether the lookup occurs in a J2EE container, i.e. if the prefix "java:comp/env/" needs to be added if the JNDI
# name doesn't already contain it. Default is "true".
#datasource.jndi.resourceRef=true

#hibernate.dialect=org.hibernate.dialect.H2Dialect
#hibernate.dialect=org.hibernate.dialect.MySQLDialect
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
#hibernate.dialect=org.hibernate.dialect.SQLServerDialect
#hibernate.dialect=org.hibernate.dialect.DB2Dialect
#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
#hibernate.show_sql=false
#hibernate.generate_statistics=false

#
# Connection pool (see http://www.mchange.com/projects/c3p0/#configuration)
#

#datasource.min-pool-size=5
#datasource.max-pool-size=100
#datasource.acquire-increment=5
# test query for H2, MySQL, PostgreSQL and Microsoft SQL Server
#datasource.preferred-test-query=select 1
# test query for Oracle
#datasource.preferred-test-query=SELECT 1 FROM DUAL
# test query for DB2
#datasource.preferred-test-query=SELECT current date FROM sysibm.sysdummy1
#datasource.test-connection-on-checkin=true
#datasource.test-connection-on-checkout=true
#datasource.max-idle-time=1800
#datasource.max-idle-time-excess-connections=1800

#
# Cluster settings
#

# This a period of time, expressed in milliseconds, that indicates
# when a node is deemed to be inactive and is removed from the list
# of nodes of a cluster (nor will it appear in the 'monitoring' section of the application).
#
# When a node is properly shut down, it will send out an event indicating
# it is shut down. From that point on, the data will be kept in memory for the amount
# of time indicated here.
# When a node is not properly shut down (eg hardware failure), this is the period of time
# before removal, since the time the last event is received.
#
# Make sure the value here is higher than the sending interval of the nodes, to avoid
# that nodes incorrectly removed.
#
# By default 10 minutes
cluster.monitoring.max.inactive.time=600000

# A cron expression that configures when the check for inactive nodes is made.
# When executed, this will mark any node that hasn't been active for 'cluster.monitoring.max.inactive.time'
# seconds, as an inactive node. Default: every 5 minutes.
cluster.monitoring.inactive.check.cronexpression=0 0/5 * * * ?

# REST endpoint config
rest.app.name=Activiti app
rest.app.description=Activiti app Rest config
rest.app.host=http://localhost
rest.app.port=9999
rest.app.contextroot=activiti-app
rest.app.restroot=api
rest.app.user=admin
rest.app.password=test

# Passwords for rest endpoints and master configs are stored encrypted in the database using AES/CBC/PKCS5PADDING
# It needs a 128-bit initialization vector (http://en.wikipedia.org/wiki/Initialization_vector)
# and a 128-bit secret key represented as 16 ascii characters below
#
# Do note that if these properties are changed after passwords have been saved, all existing passwords
# will not be able to be decrypted and the password would need to be reset in the UI.
security.encryption.credentialsIVSpec=j8kdO2hejA9lKmm6
security.encryption.credentialsSecretSpec=9FGl73ngxcOoJvmL

# BPMN 2.0 Modeler config

modeler.url=https://activiti.alfresco.com/activiti-app/api/

# Enable multi tenant support, disabled by default
#multi-tenant.enabled=true 

3.2 activiti-app数据库配置

进入activiti-app/WEB-INF/classes/META-INF/activiti-app找到activiti-app.properties文件,并按图修改
在这里插入图片描述
完整文件如下

#
# SECURITY
#
security.rememberme.key=testkey

#
# DATABASE
#

#自定义配置
datasource.driver=com.mysql.jdbc.Driver
datasource.url=jdbc:mysql://ip:3306/数据库?useUnicode=true&&useAffectedRows=true&&characterEncoding=UTF-8&&autoReconnect=true&&zeroDateTimeBehavior=convertToNull&&transformedBitIsBoolean=true&&allowMultiQueries=true&nullCatalogMeansCurrent=true
datasource.username=root
datasource.password=root
hibernate.dialect=org.hibernate.dialect.MySQLDialect

#datasource.driver=org.h2.Driver
#datasource.url=jdbc:h2:mem:activiti;DB_CLOSE_DELAY=-1

#datasource.driver=com.mysql.jdbc.Driver
#datasource.url=jdbc:mysql://127.0.0.1:3306/activiti6ui?characterEncoding=UTF-8

#datasource.username=sa
#datasource.password=

hibernate.dialect=org.hibernate.dialect.H2Dialect
#hibernate.dialect=org.hibernate.dialect.MySQLDialect
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
#hibernate.dialect=org.hibernate.dialect.SQLServerDialect
#hibernate.dialect=org.hibernate.dialect.DB2Dialect
#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

# 
# EMAIL
# 

#email.enabled=true
#email.host=localhost
#email.port=1025
#email.useCredentials=false
#email.username=
#email.password=

# The base url that will be used to create urls in emails.
#email.base.url=http://localhost:9999/activiti-app

#email.from.default=no-reply@activiti.alfresco.com
#email.from.default.name=Activiti
#email.feedback.default=activiti@alfresco.com
        
#
# ACTIVITI
#

activiti.process-definitions.cache.max=500

#
# DEFAULT ADMINISTRATOR ACCOUNT
#

admin.email=admin
admin.password=test
admin.lastname=Administrator

admin.group=Superusers

# The maximum file upload limit. Set to -1 to set to 'no limit'. Expressed in bytes
file.upload.max.size=104857600

# For development purposes, data folder is created inside the sources ./data folder
contentstorage.fs.rootFolder=data/
contentstorage.fs.createRoot=true
contentstorage.fs.depth=4
contentstorage.fs.blockSize=1024

3.3 activiti-rest数据库配置

/usr/local/software/apache/tomcat-8.5.76/webapps/activiti-rest/WEB-INF/lib中需要放入对应的数据库驱动包不然表结构生成不了

进入activiti-rest/WEB-INF/classes找到db.properties并按图修改
在这里插入图片描述

完整文件如下

#db=h2
#jdbc.driver=org.h2.Driver
#jdbc.url=jdbc:h2:mem:activiti;DB_CLOSE_DELAY=-1
#jdbc.username=sa
#jdbc.password=


#自定义配置
db=MySQL
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://ip:3306/数据库?useUnicode=true&&useAffectedRows=true&&characterEncoding=UTF-8&&autoReconnect=true&&zeroDateTimeBehavior=convertToNull&&transformedBitIsBoolean=true&&allowMultiQueries=true
jdbc.username=root
jdbc.password=root

3.4访问效果

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

3.5admin中配置app站点信息

配置站点信息
在这里插入图片描述
检测站点信息
在这里插入图片描述

进入后就可以对所有activiti进行管理和查看了
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值