本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}