if (miLoopCharacteristics != null) {
MultiInstanceActivityBehavior miActivityBehavior = null;
boolean isSequential = parseBooleanAttribute(miLoopCharacteristics.attribute("isSequential"), false);
if (isSequential) {
miActivityBehavior = new SequentialMultiInstanceBehavior(activity, (AbstractBpmnActivityBehavior) activity.getActivityBehavior());
} else {
miActivityBehavior = new ParallelMultiInstanceBehavior(activity, (AbstractBpmnActivityBehavior) activity.getActivityBehavior());
}
activity.setScope(true);
activity.setProperty("multiInstance", isSequential ? "sequential" : "parallel");