use of org.kie.workbench.common.stunner.bpmn.client.util.VariableUsage in project kie-wb-common by kiegroup.
the class ActivityDataIOEditorWidget method isMultipleInstanceVariable.
public boolean isMultipleInstanceVariable(final String name) {
ClientSession session = sessionManager.getCurrentSession();
Diagram diagram = session.getCanvasHandler().getDiagram();
Node selectedNode = getSelectedNode(diagram, sessionManager.getCurrentSession());
Collection<VariableUsage> variableUsages = VariableUtils.findVariableUsages(selectedNode, name);
return variableUsages.stream().anyMatch(variableUsage -> variableUsage.getUsageType() == VariableUsage.USAGE_TYPE.MULTIPLE_INSTANCE_DATA_INPUT || variableUsage.getUsageType() == VariableUsage.USAGE_TYPE.MULTIPLE_INSTANCE_DATA_OUTPUT);
}
Aggregations