首先,考虑下面这样一个流程图

主要的流程定义如下:

<process id="demo" name="demo" isExecutable="true">
<startEvent id="sid-aee4f5b6-6b26-423d-85c3-499659fb523b"/>
<manualTask id="sid-f10234c0-9056-4b68-8422-f967d08c1cac" activiti:exclusive="true" name="人工任务1"/>
<manualTask id="sid-fad46cbb-9529-4685-83d1-95cf96dba9dc" activiti:exclusive="true" name="人工任务2">
<extensionElements>
<activiti:executionListener event="end" class="com.example.demo222.MyExecutionListener"/>
</extensionElements>
</manualTask>
<userTask id="sid-7049a00c-8eb8-4018-9210-dba9ece4dcf7" name="用户任务" activiti:assignee="zhangsan">
<extensionElements>
<activiti:taskListener event="complete" class="com.example.demo222.MyTaskCompleteListener"/>
</extensionElements>
</userTask>
<endEvent id="sid-5be26610-d40f-4745-87a9-f20462595a45"/>
<sequenceFlow id="sid-3b11c1ae-cdc2-4899-9014-0aa6ecc948a3" sourceRef="sid-aee4f5b6-6b26-423d-85c3-499659fb523b" targetRef="sid-f10234c0-9056-4b68-8422-f967d08c1cac"/>
<sequenceFlow id="sid-04d1ef58-433d-4bd5-ac73-dec836ee2856" sourceRef="sid-f10234c0-9056-4b68-8422-f967d08c1cac" targetRef="sid-fad46cbb-9529-4685-83d1-95cf96dba9dc"/>
<sequenceFlow id="sid-428c8fef-fe25-4c09-8d27-78f109f8312f" sourceRef="sid-fad46cbb-9529-4685-83d1-95cf96dba9dc" targetRef="sid-7049a00c-8eb8-4018-9210-dba9ece4dcf7"/>
<sequenceFlow id="sid-fb1b8968-35e5-4fde-85c9-8c8dbafcf75b" sourceRef="sid-7049a00c-8eb8-4018-9210-dba9ece4dcf7" targetRef="sid-5be26610-d40f-4745-87a9-f20462595a45"/>
</process>

两个人工任务,一个用户任务

依赖

<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter</artifactId>
<version>7.1.0.M6</version>
</dependency>

流程执行监听器

package com.example.demo222;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener; public class MyExecutionListener implements ExecutionListener {
@Override
public void notify(DelegateExecution execution) {
throw new RuntimeException("ExecutionListener报错了");
}
}

任务监听器

package com.example.demo222;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener; public class MyTaskCompleteListener implements TaskListener {
@Override
public void notify(DelegateTask delegateTask) {
throw new RuntimeException("TaskListener报错了");
}
}

启动流程

package com.example.demo222;

import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest
public class DemoTest {
@Autowired
private RepositoryService repositoryService;
@Autowired
private RuntimeService runtimeService;
@Autowired
private TaskService taskService; @Test
void deploy() {
repositoryService.createDeployment()
.addClasspathResource("processes/demo.bpmn20.xml")
.name("demo")
.key("demo")
.tenantId("10086")
.deploy();
} @Test
public void start() {
ProcessInstance processInstance = runtimeService.startProcessInstanceByKeyAndTenantId("demo", "10086");
System.out.println(processInstance);
}
}

如此简单的一个流程,如此简单的代码,我以为流程会顺利启动成功,结果启动失败了

java.lang.RuntimeException: ExecutionListener报错了
at com.example.demo222.MyExecutionListener.notify(MyExecutionListener.java:9) ~[classes/:na]
at org.activiti.engine.impl.delegate.invocation.ExecutionListenerInvocation.invoke(ExecutionListenerInvocation.java:34) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.delegate.invocation.DelegateInvocation.proceed(DelegateInvocation.java:35) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.delegate.invocation.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:109) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.bpmn.listener.ListenerNotificationHelper.executeExecutionListeners(ListenerNotificationHelper.java:77) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.agenda.AbstractOperation.executeExecutionListeners(AbstractOperation.java:81) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.agenda.AbstractOperation.executeExecutionListeners(AbstractOperation.java:71) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation.handleActivityEnd(TakeOutgoingSequenceFlowsOperation.java:99) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation.handleFlowNode(TakeOutgoingSequenceFlowsOperation.java:84) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation.run(TakeOutgoingSequenceFlowsOperation.java:77) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:73) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:57) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:42) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:48) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:59) ~[activiti-engine-7.1.0.M6.jar:na]
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) [activiti-spring-7.1.0.M6.jar:na]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) [spring-tx-5.3.22.jar:5.3.22]
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) [activiti-spring-7.1.0.M6.jar:na]
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:29) [activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:44) [activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:39) [activiti-engine-7.1.0.M6.jar:na]
at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKeyAndTenantId(RuntimeServiceImpl.java:93) [activiti-engine-7.1.0.M6.jar:na]
at com.example.demo222.DemoTest.start(DemoTest.java:32) [test-classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_333]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_333]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_333]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_333]
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725) [junit-platform-commons-1.8.2.jar:1.8.2]
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) [junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) [junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149) [junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140) [junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84) [junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66) ~[junit-jupiter-engine-5.8.2.jar:5.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[na:1.8.0_333]
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[na:1.8.0_333]
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) ~[junit-platform-engine-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53) ~[junit-platform-launcher-1.8.2.jar:1.8.2]
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57) ~[junit5-rt.jar:na]
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) ~[junit-rt.jar:na]
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) ~[idea_rt.jar:na]
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) ~[junit-rt.jar:na]
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) ~[junit-rt.jar:na]
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) ~[junit-rt.jar:na]

我一直以为启动流程和任务流转是分开的,流程启动以后就往后走,启动时启动,任务流转是流转,二者应该互不影响的,没想到流程节点执行时报错会导致流程启动失败。直到看了代码,我才直到我错了。流程启动会一直往下执行,直到遇到一个它无法自动处理的节点(比如:User Task)才停下来。

下面通过代码了解启动流程实例的过程:

创建流程实例后返回一个ExecutionEntity,这个ExecutionEntity就是ProcessInstance

然后,将流程实例(ExecutionEntity)丢到Agenda中

往Agenda里放的是一个ContinueProcessOperation,所以接下来看ContinueProcessOperation

本例中,整个流程有9个FlowElement

现在,程序运行到这里,当前FlowElement(对应代码中的currentFlowElement)是开始节点,即StartEvent

因为它是FlowNode,所以接下来走节点的处理逻辑

默认情况下,节点是同步执行的,如果在任务定义时指定activiti:async="true",那么将会异步执行

另外,我们还知道了,在流程执行过程中,是以同步方式调用监听器的,具体见org.activiti.engine.impl.bpmn.listener.ListenerNotificationHelper#executeExecutionListeners

这里涉及到行为Behavior了,在本例中,设计到下面这几种Behavior

Start节点对应的行为是NoneStartEventActivityBehavior,它的行为就是离开活动

通过往Agenda中放一个TakeOutgoingSequenceFlowsOperation来实现离开活动

org.activiti.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation#leaveFlowNode

刚才是走的FlowNode,现在再看SequenceFlow

将下一个FlowElement设置为currentFlowElement,然后又是Context.getAgenda().planContinueProcessOperation(execution);

离开当前活动后,就来到了下一个活动,本例中下一个活动(Activity)是Manual Task

Manual Task是一个直接通过的活动

当走到第二个人工任务的时候,执行监听器时抛异常了,于是启动流程也失败了。假设他没有抛异常继续往下走就遇到一个User Task

那么在执行UserTaskActivityBehavior的时候,正常情况下是不会离开活动的,所以就停在这里了

所以,到这里,针对本例中的这个流程我们可以总结一下:

1、创建流程实例ExecutionEntity,放入Agenda中继续执行

2、一个流程包含很多FlowElement,FlowElement分两大类FlowNode和SequenceFlow。FlowNode有关联的ActivityBehavior。

3、从当前FlowElement开始,如果是FlowNode,则执行与之关联的行为,如果是SequenceFlow则继续执行

整个过程只有在FlowNode里才有可能停下来,像StartEvent和ManuTask这样的FlowNode它们的行为都是离开活动,遇到向UserTask这样的才会停下来

所以,通过源码的学习可以得出两个知识点:

1、启动流程实例的过程中不仅仅是启动就完了,它还会继续执行活动,直到遇到一个它无法自动通过的活动时才会停止,在这期间不抛异常才算流程启动成功

2、监听器是同步执行的,如果在监听器里抛异常了,会影响到活动的执行。就像本例中一样,在人工任务的完成监听器里抛异常导致流程实例启动失败

3、默认情况下,活动是同步执行的

Activiti 7 启动流程实例的更多相关文章

  1. activiti7启动流程实例,动态设置assignee人

    package com.zcc.activiti03; import org.activiti.engine.ProcessEngine;import org.activiti.engine.Proc ...

  2. Activiti7 启动流程实例

    package com.itheima.activiti; import org.activiti.engine.ProcessEngine; import org.activiti.engine.P ...

  3. Activiti工作流学习(二)流程实例、执行对象、任务

    一.前言 前面说明了基本的流程部署.定义,启动流程实例等基本操作,下面我们继续来学习流程实例.执行对象.任务. 二.流程实例.执行对象说明 整个Activiti的生命周期经过了如下的几个步骤: 1.流 ...

  4. activiti自定义流程之整合(五):启动流程时获取自定义表单

    流程定义部署之后,自然就是流程定义列表了,但和前一节一样的是,这里也是和之前单独的activiti没什么区别,因此也不多说.我们先看看列表页面以及对应的代码,然后在一步步说明点击启动按钮时如何调用自定 ...

  5. 工作流学习——Activiti流程实例、任务管理四步曲 (zhuan)

    http://blog.csdn.net/zwk626542417/article/details/46646565 ***************************************** ...

  6. activiti自己定义流程之整合(五):启动流程时获取自己定义表单

    流程定义部署之后,自然就是流程定义列表了,但和前一节一样的是,这里也是和之前单独的activiti没什么差别.因此也不多说.我们先看看列表页面以及相应的代码,然后在一步步说明点击启动button时怎样 ...

  7. Activiti的流程实例及挂起激活(七)

    1.1什么是流程实例 参与者(可以是用户也可以是程序)按照流程定义内容发起一个流程,这就是一个流程实例.是动态的.流程定义和流程实例的图解: 1.2启动流程实例 流程定义部署在 activiti 后, ...

  8. activiti7流程实例启动

    package com.zcc.acvitivi; import org.activiti.engine.ProcessEngine;import org.activiti.engine.Proces ...

  9. Activiti流程实例管理

    1.启动流程 在完成了流程定义部署后,就要启动流程实例了. /** * 1 启动流程 * 当流程到达一个节点时,会在act_ru_execution表中产生1条数据 * 如果当前节点是用户任务节点,这 ...

  10. Activiti 流程实例、任务、执行对象及相关的表

    一个流程中,流程实例只有一个,执行对象可以有多个(如果存在分支和聚合) SELECT * FROM activiti.act_ru_execution a;  #正在执行的执行对象表 SELECT * ...

随机推荐

  1. <鸳鸯刀>&<白马啸西风>随笔

    这两部作品比较小众,也不如之前的作品优秀,因此简单写一下好了. <鸳鸯刀> 陕西西安府威信镖局的总镖头."铁鞭镇八方"周威信,带领一支七十多人的镖队正前往京城.路途之上 ...

  2. ASCII,unicode与utf-8的区别

    ASCII,unicode与utf-8的区别: ASCII码只有127个字母被编到计算机中,无法处理中文,ASCII 编码是 1 个字节 unicode是为了解决因各国标准不同而产生乱码的问题.uni ...

  3. 中国人民公安大学 Chinese people’ public security university 网络对抗技术 实验报告4

    中国人民公安大学 Chinese people' public security university 网络对抗技术 实验报告   实验四 恶意代码技术     学生姓名 陈禹 年级 2018 区队 ...

  4. mysql之数据库操作-第一篇

    1.数据库的创建 mysql> create database if not exists myTestDB; Query OK, 1 row affected (0.00 sec) 2.查看可 ...

  5. Java基础Day4-Java方法

    一.方法的定义 Java的方法类似于其它语言的函数,是一段用来完成特定功能的代码片段. 方法包括一个方法头和一个方法体. 修饰符 返回值类型 方法名(参数类型 参数名){      方法体      ...

  6. js 复制链接内容

    <script type="text/javascript">//复制活动地址 function shareUrl(id) { var url = 'http://H5 ...

  7. Transformer_Detection-(DETR) 引入视觉领域的首创DETR (ECCV2020)

    End-to-End Object Detection with Transformers paper: https://link.zhihu.com/?target=https%3A//arxiv. ...

  8. PLC入门笔记12

    1.边沿应用 (1)边沿开关 (2)上升沿触发 下降沿触发 (3) MOVP K4M0 D0 传送比较 movp (=mov) 脉冲型指令 前面条件成立只能执行一次,仅执行一次扫描周期 不带P MOV ...

  9. [CQOI2014]通配符匹配 题解

    第一眼:什么鬼东西ヾ(。`Д´。) 第二眼:显然,这道题要分段处理 类似[TJOI2018]碱基序列\ (建议做一做也是Hash+DP)\ 那你怎么第一眼没看出来 Hash处理+DP==AC 直接上代 ...

  10. k8s 部署单点 rabbitmq

    创建pvc vim rabbitmq-pvc.yaml kind: PersistentVolumeClaim apiVersion: v1 metadata: name: rabbitmq-data ...