org.activiti.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior Java Examples

The following examples show how to use org.activiti.engine.impl.bpmn.behavior.SequentialMultiInstanceBehavior. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MultiInstanceActivityCreator.java    From openwebflow with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private ActivityImpl createMultiInstanceActivity(ProcessEngine processEngine,
		ProcessDefinitionEntity processDefinition, String processInstanceId, String prototypeActivityId,
		String cloneActivityId, boolean isSequential, List<String> assignees)
{
	ActivityImpl prototypeActivity = ProcessDefinitionUtils.getActivity(processEngine, processDefinition.getId(),
		prototypeActivityId);

	//拷贝listener,executionListeners会激活历史记录的保存
	ActivityImpl clone = cloneActivity(processDefinition, prototypeActivity, cloneActivityId, "executionListeners",
		"properties");
	//拷贝所有后向链接
	for (PvmTransition trans : prototypeActivity.getOutgoingTransitions())
	{
		clone.createOutgoingTransition(trans.getId()).setDestination((ActivityImpl) trans.getDestination());
	}

	MultiInstanceActivityBehavior multiInstanceBehavior = isSequential ? new SequentialMultiInstanceBehavior(clone,
			(TaskActivityBehavior) prototypeActivity.getActivityBehavior()) : new ParallelMultiInstanceBehavior(
			clone, (TaskActivityBehavior) prototypeActivity.getActivityBehavior());

	clone.setActivityBehavior(multiInstanceBehavior);

	clone.setScope(true);
	clone.setProperty("multiInstance", isSequential ? "sequential" : "parallel");

	//设置多实例节点属性
	multiInstanceBehavior.setLoopCardinalityExpression(new FixedValue(assignees.size()));
	multiInstanceBehavior.setCollectionExpression(new FixedValue(assignees));
	return clone;
}
 
Example #2
Source File: DefaultActivityBehaviorFactory.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
public SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) {
  return new SequentialMultiInstanceBehavior(activity, innerActivityBehavior);
}
 
Example #3
Source File: TestActivityBehaviorFactory.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
@Override
public SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior) {
  return wrappedActivityBehaviorFactory.createSequentialMultiInstanceBehavior(activity, innerActivityBehavior);
}
 
Example #4
Source File: TestActivityBehaviorFactory.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(
        ActivityImpl activity, AbstractBpmnActivityBehavior innerActivityBehavior) {
    return wrappedActivityBehaviorFactory.createSequentialMultiInstanceBehavior(activity, innerActivityBehavior);
}
 
Example #5
Source File: DefaultActivityBehaviorFactory.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(ActivityImpl activity, AbstractBpmnActivityBehavior innerActivityBehavior) {
    return new SequentialMultiInstanceBehavior(activity, innerActivityBehavior);
}
 
Example #6
Source File: ActivityBehaviorFactoryDelegate.java    From openwebflow with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(ActivityImpl activity,
		AbstractBpmnActivityBehavior innerActivityBehavior)
{
	return _source.createSequentialMultiInstanceBehavior(activity, innerActivityBehavior);
}
 
Example #7
Source File: ActivityBehaviorFactory.java    From activiti6-boot2 with Apache License 2.0 votes vote down vote up
public abstract SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(Activity activity, AbstractBpmnActivityBehavior innerActivityBehavior); 
Example #8
Source File: ActivityBehaviorFactory.java    From flowable-engine with Apache License 2.0 votes vote down vote up
public abstract SequentialMultiInstanceBehavior createSequentialMultiInstanceBehavior(ActivityImpl activity, AbstractBpmnActivityBehavior innerActivityBehavior);