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 xsi:type=\"tFormalExpression\" language=\"" + XmlBPMNProcessDumper.RULE_LANGUAGE + "\">" + constraintTrigger.getConstraint() + "</condition>" + EOL);
xmlDump.append(" </conditionalEventDefinition>" + EOL);
} else {
String header = constraintTrigger.getHeader();
header = header.substring(7, header.length() - 1);
int index = header.indexOf(":");
String language = header.substring(0, index);
header = header.substring(index + 1);
String cycle = null;
if ("int".equals(language)) {
int lenght = (header.length() - 1)/2;
cycle = header.substring(0, lenght);
} else {
cycle = header;
}
xmlDump.append(" <timerEventDefinition>" + EOL);
xmlDump.append(" <timeCycle xsi:type=\"tFormalExpression\" language=\"" + language + "\">" + cycle + "</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 +