if (triggers != null) {
xmlDump.append(">" + EOL);
if (triggers.size() > 1) {
throw new IllegalArgumentException("Multiple start triggers not supported");
}
Trigger trigger = triggers.get(0);
if (trigger instanceof ConstraintTrigger) {
ConstraintTrigger constraintTrigger = (ConstraintTrigger) trigger;
if (constraintTrigger.getHeader() == null) {
xmlDump.append(" <conditionalEventDefinition>" + EOL);
xmlDump.append(" <condition xs:type=\"tFormalExpression\" language=\"" + XmlBPMNProcessDumper.RULE_LANGUAGE + "\">" + constraintTrigger.getConstraint() + "</condition>" + EOL);
xmlDump.append(" </conditionalEventDefinition>" + EOL);
} else {
String header = constraintTrigger.getHeader();
int lenght = (header.length() - 13)/2;
String period = header.substring(11, 11 + lenght);
xmlDump.append(" <timerEventDefinition>" + EOL);
xmlDump.append(" <timeCycle xs:type=\"tFormalExpression\">" + period + "</timeCycle>" + EOL);
xmlDump.append(" </timerEventDefinition>" + EOL);
}
} else if (trigger instanceof EventTrigger) {
EventTrigger eventTrigger = (EventTrigger) trigger;
if (!trigger.getInMappings().isEmpty()) {
String mapping = eventTrigger.getInMappings().keySet().iterator().next();
xmlDump.append(
" <dataOutput id=\"_" + startNode.getId() + "_Output\" />" + EOL +
" <dataOutputAssociation>" + EOL +
" <sourceRef>_" + startNode.getId() + "_Output</sourceRef>" + EOL +