@Override public String toString() { return "SubProcess (" + getId() + ") {" + "useSeparateContext=" + useSeparateContext + ", outVariables=" + outVariables + '}'; } }
@Override protected P done() { parent.add(new SubProcess(id, useSeparateContext, out, getElements())); return parent(); }
SubProcess p = new SubProcess(processId, children); children = i.children; p.setName(i.name);
finishers.add(errorHandlingCmd); if (s.isUseSeparateContext()) { Set<VariableMapping> outVariables = s.getOutVariables(); if (outVariables == null) { outVariables = Collections.emptySet();
private static Container toSubProcess(IdGenerator idGenerator, Map<String, Object> m) throws ParserException { Object steps = m.get(STEPS_KEY); if (steps == null) { throw new ParserException("Mandatory 'steps' section missing in the subprocess: " + m); } if (!(steps instanceof List)) { throw new ParserException("Unsupported element in the steps section of the subprocess: " + m); } List<Object> l = (List<Object>) steps; if (l.isEmpty()) { throw new ParserException("Empty 'steps' section in the subprocess: " + m); } List<AbstractElement> children = addEntryPoint(idGenerator, toElements(idGenerator, l)); String subId = idGenerator.nextId(); SubProcess sub = new SubProcess(subId, children); return new Container(sub, sub, toBoundaryEvents(idGenerator, subId, m)); }
@Override public Chunk convert(ConverterContext ctx, YamlGroup s) throws YamlConverterException { Chunk c = new Chunk(); // create a subprocess Chunk sub = ctx.convert(s.getSteps()); List<AbstractElement> l = ctx.wrapAsProcess(sub); // add the subprocess String id = ctx.nextId(); c.addElement(new SubProcess(id, l)); c.addOutput(id); c.addSourceMap(id, toSourceMap(s, "Group of steps")); // keep the subprocess' source map c.addSourceMaps(sub.getSourceMap()); applyErrorBlock(ctx, c, id, s.getOptions()); return c; } }