Prepare the Activiti development environment and activiti development environment.
1. Create a project as shown in:
Then you need to check the position to save the image when saving the flowchart.
In this case, the project is created, and the development environment is ready below. 2. Prepare the Activiti Development Environment 2.1: add the Activiti jar package
Under the activiti-5.21.0-> directory are some sample projects that extract the activiti-rest project and import all the packages under the WEB-INF/lib in the activiti-rest directory. Add to classpath.
Because we are using the Mysql database, the Link driver of the Mysql database is not provided in the Activiti official package. We need to import it ourselves. Import the mysql-connector-java-5.1.7-bin.jar manually and add it to classpath.
2.2: configure the development environment (configure the development environment in Java) 2.2.1: Create a test class junit
2.2.2: Prepare for testing
Define Database
2.2.3:
Create a table
2.3: configure the development environment (configuration file (activiti. cfg. xml)
Configuration File
In the Activiti official example, there is no thread configuration file, so you must first find activiti-rest \ Web-INF \ classes.
2.4: Test 2.4.1: configure the development environment in Java
Result:
2.4.2: test the configuration file
Result:
The output result indicates success!