use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ActivityPropertyWriter in project kie-wb-common by kiegroup.
the class TaskConverter method noneTask.
private PropertyWriter noneTask(Node<View<NoneTask>, ?> n) {
Task task = bpmn2.createTask();
task.setId(n.getUUID());
NoneTask definition = n.getContent().getDefinition();
ActivityPropertyWriter p = propertyWriterFactory.of(task);
p.setName(definition.getGeneral().getName().getValue());
p.setBounds(n.getContent().getBounds());
p.setSimulationSet(definition.getSimulationSet());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.ActivityPropertyWriter in project kie-wb-common by kiegroup.
the class AbstractProcessConverter method convertEdges.
public void convertEdges(ElementContainer p, DefinitionsBuildingContext context) {
context.childEdges().forEach(e -> {
BasePropertyWriter pSrc = p.getChildElement(e.getSourceNode().getUUID());
// if it's null, then it's a root: skip it
if (pSrc != null) {
BasePropertyWriter pTgt = p.getChildElement(e.getTargetNode().getUUID());
pTgt.setParent(pSrc);
}
});
context.dockEdges().forEach(e -> {
ActivityPropertyWriter pSrc = (ActivityPropertyWriter) p.getChildElement(e.getSourceNode().getUUID());
BoundaryEventPropertyWriter pTgt = (BoundaryEventPropertyWriter) p.getChildElement(e.getTargetNode().getUUID());
pTgt.setParentActivity(pSrc);
});
context.edges().map(e -> converterFactory.sequenceFlowConverter().toFlowElement(e, p)).forEach(p::addChildElement);
}
Aggregations