-
大小: 291KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-05-07
- 语言: 其他
- 标签: activiti springboot
资源简介
springboot2和activity7的集成。包括代码和pom文件。有问题留言
代码片段和文件信息
package org.activiti.examples;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Random;
import org.activiti.api.model.shared.model.VariableInstance;
import org.activiti.api.process.model.ProcessDefinition;
import org.activiti.api.process.model.ProcessInstance;
import org.activiti.api.process.model.builders.ProcessPayloadBuilder;
import org.activiti.api.process.runtime.ProcessRuntime;
import org.activiti.api.process.runtime.connector.Connector;
import org.activiti.api.runtime.shared.query.Page;
import org.activiti.api.runtime.shared.query.Pageable;
import org.activiti.api.task.model.Task;
import org.activiti.api.task.model.builders.TaskPayloadBuilder;
import org.activiti.api.task.runtime.TaskRuntime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
@SpringBootApplication
@EnableScheduling
public class DemoApplication implements CommandLineRunner {
private Logger logger = LoggerFactory.getLogger(DemoApplication.class);
private final ProcessRuntime processRuntime;
private final TaskRuntime taskRuntime;
private final SecurityUtil securityUtil;
public DemoApplication(ProcessRuntime processRuntime
TaskRuntime taskRuntime
SecurityUtil securityUtil) {
this.processRuntime = processRuntime;
this.taskRuntime = taskRuntime;
this.securityUtil = securityUtil;
}
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class args);
}
@Override
public void run(String... args) {
securityUtil.logInAs(“system“);
Page processDefinitionPage = processRuntime.processDefinitions(Pageable.of(0 10));
logger.info(“> Available Process definitions: “ + processDefinitionPage.getTotalItems());
for (ProcessDefinition pd : processDefinitionPage.getContent()) {
logger.info(“\t > Process definition: “ + pd);
}
}
@Scheduled(initialDelay = 1000 fixedDelay = 5000)
public void processText() {
securityUtil.logInAs(“system“);
String content = pickRandomString();
SimpleDateFormat formatter = new SimpleDateFormat(“dd-MM-yy HH:mm:ss“);
logger.info(“> Starting process to process content: “ + content + “ at “ + formatter.format(new Date()));
ProcessInstance processInstance = processRuntime.start(ProcessPayloadBuilder
.start()
.withProcessDefinitionKey(“categorizeHumanProcess“)
.withProcessInstanceName(“Processing Content: “ + content)
.withV
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\
文件 158 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\.gitignore
文件 676 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\.travis.yml
文件 3214 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\CODE_OF_CONDUCT.md
文件 1044 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\CONTRIBUTING.md
文件 11357 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\LICENSE
文件 601 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\README.md
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\
文件 268 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\.gitignore
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\.mvn\
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\.mvn\wrapper\
文件 47610 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\.mvn\wrapper\maven-wrapper.jar
文件 110 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\.mvn\wrapper\maven-wrapper.properties
文件 6468 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\mvnw
文件 4994 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\mvnw.cmd
文件 2549 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\pom.xm
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\java\
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\java\org\
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\java\org\activiti\
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\java\org\activiti\examples\
文件 6013 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\java\org\activiti\examples\DemoApplication.java
文件 2231 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\java\org\activiti\examples\DemoApplicationConfiguration.java
文件 2202 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\java\org\activiti\examples\SecurityUtil.java
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\resources\
文件 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\resources\application.properties
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\resources\processes\
文件 6044 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\main\resources\processes\categorize-human-content.bpmn20.xm
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\test\
目录 0 2018-10-25 17:32 activiti-examples-7.0.0.Beta2\activiti-api-basic-full-example\src\test\java\
............此处省略116个文件信息
- 上一篇:变位齿轮计算器
- 下一篇:基于DSP的PWM波生成例程
相关资源
- drools集成springboot demo
-
sm整合phoenix和连接池(xm
l和注解两 - springboot文件上传路径保存数据库并且
- 创建springboot + mybatis项目,实现登录、
- springboot整合oss实现文件的上传查看删
- SpringBoot框架,前后端分离写的新闻管
- Maven+SpringBoot+JPA单表增删改查
- 超市订单管理系统基于springbootmybati
- springboot-AOP实现多数据源动态切换Dr
- springboot简单分页
- Springboot和bootstrap实现shiro权限控制配
- springboot-mybatis-dubbo-zookeeper项目框架
- SpringBoot+Atomikos分布式事务及多数据源
- SpringBoot之整合Spring Security代码
- springboot支付宝网页支付
- spring-boot-activiti集成
- springboot+webuploader 实现大文件切片上传
- SpringBoot使用JMS的小ActiveMQ实现
- springboot实现web系统Licence验证
- sharding-jdbc-demo.zip
- vert.x结合springboot开发mqtt服务,真实可
- springboot+springcloud教程视频.txt
- springboothttps
- springboot实现Excel文件导入与导出功能
- springboot + redis实现session共享
- springboot+mybatis+shiro整合demo
- SpringBoot集成app微信支付.rar
- 基于SpringBoot+Mybatis商品信息管理系统
- 蚂蚁课堂第四期结业项目SpringCloud构建
- springBoot简单后台增删改查
评论
共有 条评论