@Override public Funnel createFunnel(String groupId, FunnelDTO funnelDTO) { if (funnelDTO.getParentGroupId() != null && !flowController.getFlowManager().areGroupsSame(groupId, funnelDTO.getParentGroupId())) { throw new IllegalArgumentException("Cannot specify a different Parent Group ID than the Group to which the Funnel is being added."); } // get the desired group ProcessGroup group = locateProcessGroup(flowController, groupId); // create the funnel Funnel funnel = flowController.getFlowManager().createFunnel(funnelDTO.getId()); if (funnelDTO.getPosition() != null) { funnel.setPosition(new Position(funnelDTO.getPosition().getX(), funnelDTO.getPosition().getY())); } // add the funnel group.addFunnel(funnel); group.startFunnel(funnel); return funnel; }
if (requestFunnelEntity.getComponent().getParentGroupId() != null && !groupId.equals(requestFunnelEntity.getComponent().getParentGroupId())) { throw new IllegalArgumentException(String.format("If specified, the parent process group id %s must be the same as specified in the URI %s", requestFunnelEntity.getComponent().getParentGroupId(), groupId));
public FunnelDTO copy(final FunnelDTO original) { final FunnelDTO copy = new FunnelDTO(); copy.setId(original.getId()); copy.setParentGroupId(original.getParentGroupId()); copy.setPosition(original.getPosition()); copy.setVersionedComponentId(original.getVersionedComponentId()); return copy; }
public ConnectableDTO createConnectableDto(final FunnelDTO funnel) { final ConnectableDTO connectable = new ConnectableDTO(); connectable.setGroupId(funnel.getParentGroupId()); connectable.setId(funnel.getId()); connectable.setType(ConnectableType.FUNNEL.name()); connectable.setVersionedComponentId(funnel.getVersionedComponentId()); return connectable; }
funnels.add(cp); connectableMap.put(funnelDTO.getParentGroupId() + "-" + funnelDTO.getId(), dtoFactory.createConnectableDto(cp));