当前位置: 首页>>代码示例>>Java>>正文


Java PvmProcessInstance.findActiveActivityIds方法代码示例

本文整理汇总了Java中org.activiti.engine.impl.pvm.PvmProcessInstance.findActiveActivityIds方法的典型用法代码示例。如果您正苦于以下问题:Java PvmProcessInstance.findActiveActivityIds方法的具体用法?Java PvmProcessInstance.findActiveActivityIds怎么用?Java PvmProcessInstance.findActiveActivityIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.activiti.engine.impl.pvm.PvmProcessInstance的用法示例。


在下文中一共展示了PvmProcessInstance.findActiveActivityIds方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testConcurrentPathsComingOutOfScope

import org.activiti.engine.impl.pvm.PvmProcessInstance; //导入方法依赖的package包/类
/**
 * +---------+ |scope | +--+ | +---->|c1| | | | +--+ | | | +-----+ | +----+ | +--+ |start|--->|fork|--->|c2| +-----+ | +----+ | +--+ | | | | | | +--+ | +---->|c3| | | +--+ +---------+
 */
public void testConcurrentPathsComingOutOfScope() {
    PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder()
            .createActivity("start")
            .initial()
            .behavior(new Automatic())
            .transition("fork")
            .endActivity()
            .createActivity("scope")
            .scope()
            .createActivity("fork")
            .behavior(new ParallelGateway())
            .transition("c1")
            .transition("c2")
            .transition("c3")
            .endActivity()
            .endActivity()
            .createActivity("c1")
            .behavior(new WaitState())
            .endActivity()
            .createActivity("c2")
            .behavior(new WaitState())
            .endActivity()
            .createActivity("c3")
            .behavior(new WaitState())
            .endActivity()
            .buildProcessDefinition();

    PvmProcessInstance processInstance = processDefinition.createProcessInstance();
    processInstance.start();

    List<String> activeActivityIds = processInstance.findActiveActivityIds();
    List<String> expectedActiveActivityIds = new ArrayList<String>();
    expectedActiveActivityIds.add("c3");
    expectedActiveActivityIds.add("c1");
    expectedActiveActivityIds.add("c2");

    assertEquals(expectedActiveActivityIds, activeActivityIds);
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:42,代码来源:PvmScopesAndConcurrencyTest.java

示例2: testConcurrentPathsGoingIntoScope

import org.activiti.engine.impl.pvm.PvmProcessInstance; //导入方法依赖的package包/类
/**
 * +------------+ |scope | +----------+ | | | v | +-----+ +--------+ | +------+ | |start|-->|parallel|---->|inside| | +-----+ +--------+ | +------+ | | | ^ | +----------+ | | | +------------+
 */
public void testConcurrentPathsGoingIntoScope() {
    PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder()
            .createActivity("start")
            .initial()
            .behavior(new Automatic())
            .transition("parallel")
            .endActivity()
            .createActivity("parallel")
            .behavior(new ParallelGateway())
            .transition("inside")
            .transition("inside")
            .transition("inside")
            .endActivity()
            .createActivity("scope")
            .scope()
            .createActivity("inside")
            .behavior(new WaitState())
            .endActivity()
            .endActivity()
            .buildProcessDefinition();

    PvmProcessInstance processInstance = processDefinition.createProcessInstance();
    processInstance.start();

    List<String> activeActivityIds = processInstance.findActiveActivityIds();
    List<String> expectedActiveActivityIds = new ArrayList<String>();
    expectedActiveActivityIds.add("inside");
    expectedActiveActivityIds.add("inside");
    expectedActiveActivityIds.add("inside");

    assertEquals(expectedActiveActivityIds, activeActivityIds);
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:36,代码来源:PvmScopesAndConcurrencyTest.java

示例3: testConcurrentPathsComingOutOfScope

import org.activiti.engine.impl.pvm.PvmProcessInstance; //导入方法依赖的package包/类
/**
 *         +---------+ 
 *         |scope    |  +--+
 *         |      +---->|c1|
 *         |      |  |  +--+
 *         |      |  |
 * +-----+ |  +----+ |  +--+ 
 * |start|--->|fork|--->|c2|
 * +-----+ |  +----+ |  +--+
 *         |      |  |
 *         |      |  |  +--+
 *         |      +---->|c3|
 *         |         |  +--+
 *         +---------+
 */
public void testConcurrentPathsComingOutOfScope() {
  PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder()
    .createActivity("start")
      .initial()
      .behavior(new Automatic())
      .transition("fork")
    .endActivity()
    .createActivity("scope")
      .scope()
      .createActivity("fork")
        .behavior(new ParallelGateway())
        .transition("c1")
        .transition("c2")
        .transition("c3")
      .endActivity()
    .endActivity()
    .createActivity("c1")
      .behavior(new WaitState())
    .endActivity()
    .createActivity("c2")
      .behavior(new WaitState())
    .endActivity()
    .createActivity("c3")
      .behavior(new WaitState())
    .endActivity()
  .buildProcessDefinition();
  
  PvmProcessInstance processInstance = processDefinition.createProcessInstance(); 
  processInstance.start();
  
  List<String> activeActivityIds = processInstance.findActiveActivityIds();
  List<String> expectedActiveActivityIds = new ArrayList<String>();
  expectedActiveActivityIds.add("c3");
  expectedActiveActivityIds.add("c1");
  expectedActiveActivityIds.add("c2");
  
  assertEquals(expectedActiveActivityIds, activeActivityIds);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:54,代码来源:PvmScopesAndConcurrencyTest.java

示例4: testConcurrentPathsGoingIntoScope

import org.activiti.engine.impl.pvm.PvmProcessInstance; //导入方法依赖的package包/类
/**
 *                      +------------+
 *                      |scope       |
 *                  +----------+     |
 *                  |   |      v     |
 * +-----+   +--------+ |   +------+ | 
 * |start|-->|parallel|---->|inside| |
 * +-----+   +--------+ |   +------+ |
 *                  |   |      ^     |
 *                  +----------+     |
 *                      |            |
 *                      +------------+
 */
public void testConcurrentPathsGoingIntoScope() {
  PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder()
    .createActivity("start")
      .initial()
      .behavior(new Automatic())
      .transition("parallel")
    .endActivity()
    .createActivity("parallel")
      .behavior(new ParallelGateway())
      .transition("inside")
      .transition("inside")
      .transition("inside")
    .endActivity()
    .createActivity("scope")
      .scope()
      .createActivity("inside")
        .behavior(new WaitState())
      .endActivity()
    .endActivity()
  .buildProcessDefinition();
  
  PvmProcessInstance processInstance = processDefinition.createProcessInstance(); 
  processInstance.start();
  
  List<String> activeActivityIds = processInstance.findActiveActivityIds();
  List<String> expectedActiveActivityIds = new ArrayList<String>();
  expectedActiveActivityIds.add("inside");
  expectedActiveActivityIds.add("inside");
  expectedActiveActivityIds.add("inside");
  
  assertEquals(expectedActiveActivityIds, activeActivityIds);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:46,代码来源:PvmScopesAndConcurrencyTest.java

示例5: testSimpleWaitStateConcurrency

import org.activiti.engine.impl.pvm.PvmProcessInstance; //导入方法依赖的package包/类
public void testSimpleWaitStateConcurrency() {
    PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder()
            .createActivity("start")
            .initial()
            .behavior(new Automatic())
            .transition("fork")
            .endActivity()
            .createActivity("fork")
            .behavior(new ParallelGateway())
            .transition("c1")
            .transition("c2")
            .endActivity()
            .createActivity("c1")
            .behavior(new WaitState())
            .transition("join")
            .endActivity()
            .createActivity("c2")
            .behavior(new WaitState())
            .transition("join")
            .endActivity()
            .createActivity("join")
            .behavior(new ParallelGateway())
            .transition("end")
            .endActivity()
            .createActivity("end")
            .behavior(new WaitState())
            .endActivity()
            .buildProcessDefinition();

    PvmProcessInstance processInstance = processDefinition.createProcessInstance();
    processInstance.start();

    PvmExecution activityInstanceC1 = processInstance.findExecution("c1");
    assertNotNull(activityInstanceC1);

    PvmExecution activityInstanceC2 = processInstance.findExecution("c2");
    assertNotNull(activityInstanceC2);

    activityInstanceC1.signal(null, null);
    activityInstanceC2.signal(null, null);

    List<String> activityNames = processInstance.findActiveActivityIds();
    List<String> expectedActivityNames = new ArrayList<String>();
    expectedActivityNames.add("end");

    assertEquals(expectedActivityNames, activityNames);
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:48,代码来源:PvmParallelTest.java

示例6: testSimpleWaitStateConcurrency

import org.activiti.engine.impl.pvm.PvmProcessInstance; //导入方法依赖的package包/类
public void testSimpleWaitStateConcurrency() {
  PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder()
    .createActivity("start")
      .initial()
      .behavior(new Automatic())
      .transition("fork")
    .endActivity()
    .createActivity("fork")
      .behavior(new ParallelGateway())
      .transition("c1")
      .transition("c2")
    .endActivity()
    .createActivity("c1")
      .behavior(new WaitState())
      .transition("join")
    .endActivity()
    .createActivity("c2")
      .behavior(new WaitState())
      .transition("join")
    .endActivity()
    .createActivity("join")
      .behavior(new ParallelGateway())
      .transition("end")
    .endActivity()
    .createActivity("end")
      .behavior(new WaitState())
    .endActivity()
  .buildProcessDefinition();
  
  PvmProcessInstance processInstance = processDefinition.createProcessInstance(); 
  processInstance.start();
  
  PvmExecution activityInstanceC1 = processInstance.findExecution("c1");
  assertNotNull(activityInstanceC1);
  
  PvmExecution activityInstanceC2 = processInstance.findExecution("c2");
  assertNotNull(activityInstanceC2);
  
  activityInstanceC1.signal(null, null);
  activityInstanceC2.signal(null, null);
  
  List<String> activityNames = processInstance.findActiveActivityIds();
  List<String> expectedActivityNames = new ArrayList<String>();
  expectedActivityNames.add("end");
  
  assertEquals(expectedActivityNames, activityNames);
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:48,代码来源:PvmParallelTest.java


注:本文中的org.activiti.engine.impl.pvm.PvmProcessInstance.findActiveActivityIds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。