Skip to content

Commit

Permalink
Fix: Show DataInputs and DataOutputs in SubProcess
Browse files Browse the repository at this point in the history
Change-Id: If1509f23181f9a4cdd5fb05783116368b0664584
  • Loading branch information
Stephane Drapeau authored and Stephane Drapeau committed Dec 18, 2023
1 parent e163037 commit 6272f56
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
<subNodeMappings name="DataInput" labelDirectEdit="//@ownedViewpoints[name='Process']/@ownedRepresentations[name='ProcessDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='FlowElementNameEdit']" semanticCandidatesExpression="aql:self.partitionElement->filter(bpmn2::InputOutputSpecification).dataInputs" domainClass="bpmn2.DataInput">
<subNodeMappings name="DataInput" labelDirectEdit="//@ownedViewpoints[name='Process']/@ownedRepresentations[name='ProcessDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='FlowElementNameEdit']" semanticCandidatesExpression="aql:self.getDataInputs()" domainClass="bpmn2.DataInput">
<style xsi:type="style:WorkspaceImageDescription" showIcon="false" labelExpression="aql:self.getNonExternalLabel(view)" labelColor="//@userColorsPalettes[name='Colors']/@entries[name='TextBackground']" resizeKind="NSEW" arcWidth="1" arcHeight="1" workspacePath="/org.obeonetwork.dsl.bpmn2.design/icons2/nodes/data/data-input.svg">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
<subNodeMappings name="DataOutput" labelDirectEdit="//@ownedViewpoints[name='Process']/@ownedRepresentations[name='ProcessDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='FlowElementNameEdit']" semanticCandidatesExpression="aql:self.partitionElement->filter(bpmn2::InputOutputSpecification).dataOutputs" domainClass="bpmn2.DataOutput">
<subNodeMappings name="DataOutput" labelDirectEdit="//@ownedViewpoints[name='Process']/@ownedRepresentations[name='ProcessDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='FlowElementNameEdit']" semanticCandidatesExpression="aql:self.getDataOutputs()" domainClass="bpmn2.DataOutput">
<style xsi:type="style:WorkspaceImageDescription" showIcon="false" labelExpression="aql:self.getNonExternalLabel(view)" labelColor="//@userColorsPalettes[name='Colors']/@entries[name='TextBackground']" resizeKind="NSEW" arcWidth="1" arcHeight="1" workspacePath="/org.obeonetwork.dsl.bpmn2.design/icons2/nodes/data/data-output.svg">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
Expand Down Expand Up @@ -1824,12 +1824,12 @@
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
<subNodeMappings name="DataInput" labelDirectEdit="//@ownedViewpoints[name='Process']/@ownedRepresentations[name='CollaborationDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='FlowElementNameEdit']" semanticCandidatesExpression="aql:self.partitionElement->filter(bpmn2::InputOutputSpecification).dataInputs" domainClass="bpmn2.DataInput">
<subNodeMappings name="DataInput" labelDirectEdit="//@ownedViewpoints[name='Process']/@ownedRepresentations[name='CollaborationDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='FlowElementNameEdit']" semanticCandidatesExpression="aql:self.getDataInputs()" domainClass="bpmn2.DataInput">
<style xsi:type="style:WorkspaceImageDescription" showIcon="false" labelExpression="aql:self.getNonExternalLabel(view)" labelColor="//@userColorsPalettes[name='Colors']/@entries[name='TextBackground']" resizeKind="NSEW" arcWidth="1" arcHeight="1" workspacePath="/org.obeonetwork.dsl.bpmn2.design/icons2/nodes/data/data-input.svg">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
</subNodeMappings>
<subNodeMappings name="DataOutput" labelDirectEdit="//@ownedViewpoints[name='Process']/@ownedRepresentations[name='CollaborationDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='FlowElementNameEdit']" semanticCandidatesExpression="aql:self.partitionElement->filter(bpmn2::InputOutputSpecification).dataOutputs" domainClass="bpmn2.DataOutput">
<subNodeMappings name="DataOutput" labelDirectEdit="//@ownedViewpoints[name='Process']/@ownedRepresentations[name='CollaborationDiagram']/@defaultLayer/@toolSections.0/@ownedTools[name='FlowElementNameEdit']" semanticCandidatesExpression="aql:self.getDataOutputs()" domainClass="bpmn2.DataOutput">
<style xsi:type="style:WorkspaceImageDescription" showIcon="false" labelExpression="aql:self.getNonExternalLabel(view)" labelColor="//@userColorsPalettes[name='Colors']/@entries[name='TextBackground']" resizeKind="NSEW" arcWidth="1" arcHeight="1" workspacePath="/org.obeonetwork.dsl.bpmn2.design/icons2/nodes/data/data-output.svg">
<borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
</style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@
import org.obeonetwork.dsl.bpmn2.BoundaryEvent;
import org.obeonetwork.dsl.bpmn2.CallActivity;
import org.obeonetwork.dsl.bpmn2.ComplexGateway;
import org.obeonetwork.dsl.bpmn2.DataInput;
import org.obeonetwork.dsl.bpmn2.DataOutput;
import org.obeonetwork.dsl.bpmn2.Definitions;
import org.obeonetwork.dsl.bpmn2.Event;
import org.obeonetwork.dsl.bpmn2.ExclusiveGateway;
import org.obeonetwork.dsl.bpmn2.FlowNode;
import org.obeonetwork.dsl.bpmn2.Gateway;
import org.obeonetwork.dsl.bpmn2.InclusiveGateway;
import org.obeonetwork.dsl.bpmn2.InputOutputSpecification;
import org.obeonetwork.dsl.bpmn2.ItemAwareElement;
import org.obeonetwork.dsl.bpmn2.Lane;
import org.obeonetwork.dsl.bpmn2.Process;
Expand Down Expand Up @@ -192,4 +195,28 @@ public List<FlowNode> getFlowNodeElements(EObject container, String className) {
return result;
}

public List<DataInput> getDataInputs(EObject container) {
List<DataInput> result = List.of();
if (container instanceof Lane && ((Lane) container).getPartitionElement() instanceof InputOutputSpecification) {
InputOutputSpecification ioSepc = (InputOutputSpecification) ((Lane) container).getPartitionElement();
result = ioSepc.getDataInputs();
} else if (container instanceof SubProcess) {
InputOutputSpecification ioSepc = ((SubProcess) container).getIoSpecification();
result = ioSepc.getDataInputs();
}
return result;
}

public List<DataOutput> getDataOutputs(EObject container) {
List<DataOutput> result = List.of();
if (container instanceof Lane && ((Lane) container).getPartitionElement() instanceof InputOutputSpecification) {
InputOutputSpecification ioSepc = (InputOutputSpecification) ((Lane) container).getPartitionElement();
result = ioSepc.getDataOutputs();
} else if (container instanceof SubProcess) {
InputOutputSpecification ioSepc = ((SubProcess) container).getIoSpecification();
result = ioSepc.getDataOutputs();
}
return result;
}

}

0 comments on commit 6272f56

Please sign in to comment.