if (mType instanceof CompositeTriggerType) {
CompositeTriggerType m = (CompositeTriggerType) mType;
result = new CompositeTriggerType(mType.getUID(), mType.getConfigurationDescriptions(), mType.getLabel(),
mType.getDescription(), mType.getTags(), mType.getVisibility(), m.getOutputs(),
new ArrayList<>(m.getChildren()));
result = new TriggerType(mType.getUID(), mType.getConfigurationDescriptions(), mType.getLabel(),
mType.getDescription(), mType.getTags(), mType.getVisibility(), m.getOutputs());
result = new CompositeConditionType(mType.getUID(), mType.getConfigurationDescriptions(), mType.getLabel(),
mType.getDescription(), mType.getTags(), mType.getVisibility(), m.getInputs(),
new ArrayList<>(m.getChildren()));
result = new ConditionType(mType.getUID(), mType.getConfigurationDescriptions(), mType.getLabel(),
mType.getDescription(), mType.getTags(), mType.getVisibility(), m.getInputs());
result = new CompositeActionType(mType.getUID(), mType.getConfigurationDescriptions(), mType.getLabel(),
mType.getDescription(), mType.getTags(), mType.getVisibility(), m.getInputs(), m.getOutputs(),
new ArrayList<>(m.getChildren()));
result = new ActionType(mType.getUID(), mType.getConfigurationDescriptions(), mType.getLabel(),
mType.getDescription(), mType.getTags(), mType.getVisibility(), m.getInputs(), m.getOutputs());
} else {