directorio
--2.SpringBoot integrado Activiti (uso de arranque)
--3.SpringBoot integrado Activiti (para crear un @Configuration clase de configuración manual)
1> pom.xml Modificar
< Activiti .version > 6.0.0 </ activiti.version > <! - activiti集成-> < dependencia > < groupId > org.activiti </ groupId > < artifactId > activiti-motor </ artifactId > < versión > $ {activiti.version} </ version > </ dependencia > < dependencia > < groupId > org.activiti </ groupId> < ArtifactId > activiti-primavera </ artifactId > < versión > $ {} activiti.version </ version > </ dependencia >
2> Crear aplicaciones activiti.xml
<? xml version = "1.0" encoding = "UTF-8" >? < habas xmlns = "http://www.springframework.org/schema/beans" xmlns: contexto = "http://www.springframework.org/schema / contexto " xmlns: tx = "http://www.springframework.org/schema/tx" xmlns: AOP = "http://www.springframework.org/schema/aop" xmlns: xsi =" http: // www.w3.org/2001/XMLSchema-instance " xsi: schemaLocation =" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http : //www.springframework.org/schema/context http: //www.springframework. http: //www.springframework. http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/aop HTTP: // WWW .springframework.org / esquema / AOP / primavera-aop.xsd " > < del grano ID =" processEngineConfiguration " clase =" org.activiti.spring.SpringProcessEngineConfiguration " > <! - fuente de datos de la implantación -> < propiedad nombre =" dataSource " ref =" origen de datos " > </ propiedad > <! - los asuntos a Spring gestionar -> <propiedad nombre = "transactionManager"ref = "transactionManager" /> <! - Falso: por defecto. activiti en el arranque, se contrastará la versión guardada de una tabla de base de datos, o si no hay una versión de la tabla no coincide, se producirá una excepción. verdadera: activiti actualizará el funcionamiento de todas las tablas de la base de datos. Si no existe la tabla, se crea automáticamente. create_drop: Crear una tabla en el inicio activiti, quitar la mesa cuando se cierra (se debe cerrar manualmente el motor, se puede eliminar la tabla). drop-crear: borrar la tabla original cuando inicio activiti, y luego crear una nueva tabla (sin necesidad de apagar manualmente el motor). -> < propiedad nombre = "databaseSchemaUpdate" valor = "true" > </ propiedad > </ bean > <! - Crear un objeto del motor de proceso -> < frijol lo anterior mencionado ID = "processEngine" clase = "org.activiti.spring .ProcessEngineFactoryBean " > <propiedad nombre = "processEngineConfiguration" ref = "processEngineConfiguration" /> </ bean > < frijol ID = "repositoryService" -frijol fábrica = "processEngine" fábrica método = "getRepositoryService" /> < frijol ID = "runtimeService" fábrica de frijol = "processEngine" fábrica-método = "getRuntimeService" /> < bean ID = "taskService" fábrica-bean = "processEngine"fábrica-método = "getTaskService" /> < bean ID = "formService"fábrica-bean = "processEngine" -método de fábrica = "getFormService" /> < bean ID = "historyService" -bean fábrica = "processEngine" -método de fábrica = "getHistoryService" /> < bean ID = "ManagementService" fábrica-bean = "processEngine" fábrica-método = "getManagementService" /> < bean ID = "identityService" -bean fábrica = "processEngine" fábrica-método = "getIdentityService" /> </ Frijol >
4> para iniciar la prueba de proyecto