java 工作流 activiti 官网 quick start(part 1)

本文档介绍了如何使用Activiti进行业务流程管理(BPM)的快速入门,包括创建Maven项目,设置流程引擎,部署流程定义。适用于熟悉Java和Maven的开发者,通过实例展示了如何将BPM逻辑嵌入到应用程序中。
摘要由CSDN通过智能技术生成

老样子,官网贴出来:https://www.activiti.org/。然后是get started,这里叫做quick start:https://www.activiti.org/quick-start

This quick start assumes:(基础准备)

  • Familiarity with Maven and Java(对java和maven熟悉)
  • A development environment with Java(有java的开发环境)

The following variables will be referenced in this tutorial(先声明后续步骤中会用到的名词)

Variable Description
$mvnProject The root location of the maven project(maven项目的根目录)
$actUnzipedPack The root location of the unzipped file downloaded fromhttp://www.activiti.org/download.html.(下载下来的解压后的activiti的根目录)
$quickStartJavaProjectName The name of the Quick Start Java Project. This is recommended to be “ActivitiDeveloperQuickStart”.(快速上手项目的名字,建议是ActivitiDeveloperQuickStart)
... Refers to information being skipped, for brevity sake.(老外真是严谨啊,这个也要说一下?)
$actVer The version of Activiti currently being run.(版本号)

 

1. Introduction(介绍)

This Quick Start shows the simplicity of embedding Business Process Management (BPM) into your application using Activiti. You will build a command-line application that embeds standards-based Business Process Modeling Notation (BPMN) logic into your application.告诉我们使用axtiviti的话,很容易就把BPM(业务处理管理)嵌入到我们自己的应用中了。

Activiti has advanced process design tools for embedding more sophisticated BPM logic into your application. These tools include an Eclipse-based and Web-Based BPMN Editor to name a few. For brevity, this Quick Start only uses Activiti’s Java APIs.当然activiti也有很多高级的插件可以供我们使用,比如基于eclipse的和 Web-Based BPMN Editor(不知道啥玩意)

2. Create and Setup Maven Project(创建一个maven项目)

Create a Java project called “ActivitiDeveloperQuickStart” (onwards referred to as$quickStartJavaProjectName) with the following Maven dependencies:(创建一个名字叫做ActivitiDeveloperQuickStart的maven项目,不用任何的原型,一个最简单的maven项目即可。pom里面添加依赖,我使用idea来完成)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.wxx</groupId>
    <artifactId>ActivitiDeveloperQuickStart</artifactId>
    <version>1.0-SNAPSHOT</version>
    <dependencies>
        <dependency>
            <groupId>org.activiti</groupId>
            <artifactId>activiti-engine</artifactId>
            <version>6.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.21</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.21</version>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.193</version>
        </dependency>
    </dependencies>
</project>

Of course, $actVer will be replaced with the downloaded Activiti version. For instance, if your downloaded Activiti package is “activiti-5.22.0” than the value of $actVer will be 5.22.0.(下载的啥版本,pom里面就用啥版本)

Notice the following dependencies:

  • Activiti (org.activiti) – Activiti’s BPM engine(这个是引擎)
  • Database (com.h2database) – the H2 database(这个是数据库)
  • Logging (org.slf4j) – Simple Logging Facade for Java(这个是简单的java日志接口)

When referring to build directories, the tutorial assumes the standard Maven build paths for your maven project:(标准maven项目目录结构不再赘述)

Path Description
$mvnProject/src/main/java Java source directory
$mvnProject/src/main/resources Resource directory
$mvnProject/src/test/java Java test directory
$mvnProject/src/test/resources Resource test directory

 

You should be able to build the blank project. Please ensure that the overall state is “BUILD SUCCESS” before continuing.(可以是个空的项目,但是必须保证编译通过)

Command: mvn compile

Base Path: $mvnProject

3. Create Process Engine(创建流程机)

As suggested ea

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值