In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how spring boot integrates the relevant knowledge of activiti, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will gain something after reading this spring boot article on how to integrate activiti. Let's take a look.
It takes only two steps for spring boot to integrate activiti. Add boot's activiti module org.activitiactiviti-spring-boot-starter-basic$ {activiti.version} 2. Add your flowchart file
Create a new folder processes under the resource file resources of your boot project, and place the bpmn file under the processes folder
Note: when the spring boot container starts, it will go to this folder to find the files of xxx.bpmn20.xml and xx.bpmn and load the automatic release, as shown in the following figure
If you want to customize, it is also very simple, as shown above, just add configuration such as spring.activiti.xxx=xxx to application.properties, as shown in the following figure
At this point, your spring context is loaded with commonly used operands such as processEngineConfiguration,processEngine,repositoryService,runtimeService,taskService,identityService.
Enhance your activiti and release restful Management activiti resource1. Add dependency org.activitiactiviti-spring-boot-starter-rest-api$ {activiti.version} 2. Add user groups and users. Activiti can be managed only if the verification is passed.
You can manually add table names such as (act_id_group,act_id_user) directly to the database, or you can do so through api, as follows
Group group = identityService.newGroup ("user"); group.setName ("users"); group.setType ("security-role"); identityService.saveGroup (group); User admin = identityService.newUser ("kl") Admin.setPassword ("kl"); identityService.saveUser (admin)
After completing the above steps, start the container and visit the relevant query resource, which will first let you authenticate the security of the spring used. After passing, you can have all the resource services of activiti. One advantage is that it is easy to separate workflow services from business application services, which is a boon for multiple applications using workflow.
Here are several commonly used restful: such as process release list, http://127.0.0.1:8082/repository/deployments
Runtime process: http://127.0.0.1:8082/runtime/process-instances/
Of course, the interface is not only these. More information about the interface can be found in spring's RequestMappingHandlerMapping: Mapped log, or the official document https://www.activiti.org/userguide/index.html#_rest_api, or there is another way to know it. Please see below.
Enhance your activiti and release restful Management boot application 1. Add dependency org.activitiactiviti-spring-boot-starter-actuator$ {activiti.version} 2. Related interface information
You can learn from spring's RequestMappingHandlerMapping: Mapped log, such as
This is the end of the article on "how spring boot integrates activiti". Thank you for reading! I believe that everyone has a certain understanding of "spring boot how to integrate activiti" knowledge, if you want to learn more knowledge, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.