Skip to content

Commit

Permalink
Updates EXT063 looks for itemSubjectRef if it is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
jUnG3 committed Nov 2, 2021
1 parent 1c9773e commit 0712065
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/EXT_commonExec.sch
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
<!-- For each InputSet which is a child of a callActivity applies: -->
<!-- The structureRef of the (indirectly) referenced ItemDefinition must be the same as the structureRef of the
(indirectly) referenced itemDefinition of the called Process/GlobalTask -->
<iso:rule context="bpmn:inputSet[ancestor::bpmn:callActivity and node()]">
<iso:rule context="bpmn:inputSet[ancestor::bpmn:callActivity/bpmn:ioSpecification/bpmn:dataInput[@itemSubjectRef] and node()]">
<iso:assert test="//bpmn:itemDefinition[@id=//bpmn:dataInput[@id=current()/bpmn:dataInputRefs]/@itemSubjectRef]/@structureRef =
//bpmn:itemDefinition[@id=//bpmn:dataInput[@id=//bpmn:*[@id=//bpmn:callActivity[bpmn:ioSpecification/bpmn:inputSet=current()]
/@calledElement]/bpmn:ioSpecification/bpmn:inputSet/bpmn:dataInputRefs]/@itemSubjectRef]/@structureRef" diagnostics="id">
Expand All @@ -380,7 +380,7 @@
<!-- For each OutputSet which is a child of a callActivity applies: -->
<!-- The structureRef of the (indirectly) referenced ItemDefinition must be the same as the structureRef of the
(indirectly) referenced itemDefinition of the called Process/GlobalTask -->
<iso:rule context="bpmn:outputSet[ancestor::bpmn:callActivity and node()]">
<iso:rule context="bpmn:outputSet[ancestor::bpmn:callActivity/bpmn:ioSpecification/bpmn:dataOutput[@itemSubjectRef] and node()]">
<iso:assert test="//bpmn:itemDefinition[@id=//bpmn:dataOutput[@id=current()/bpmn:dataOutputRefs]/@itemSubjectRef]/@structureRef =
//bpmn:itemDefinition[@id=//bpmn:dataOutput[@id=//bpmn:*[@id=//bpmn:callActivity[bpmn:ioSpecification/bpmn:outputSet=current()]
/@calledElement]/bpmn:ioSpecification/bpmn:outputSet/bpmn:dataOutputRefs]/@itemSubjectRef]/@structureRef" diagnostics="id">
Expand All @@ -393,7 +393,7 @@
<!-- For each dataInput which is a child of a callActivity applies: -->
<!-- The structureRef of the (indirectly) referenced ItemDefinition must be the same as the structureRef of the
(indirectly) referenced itemDefinition of the called Process/GlobalTask -->
<iso:rule context="bpmn:dataInput[ancestor::bpmn:callActivity]">
<iso:rule context="bpmn:dataInput[ancestor::bpmn:callActivity and @itemSubjectRef]">
<iso:assert test="//bpmn:itemDefinition[@id=current()/@itemSubjectRef]/@structureRef =
//bpmn:itemDefinition[@id=
//bpmn:*[@id=//bpmn:callActivity[bpmn:ioSpecification/bpmn:dataInput=current()]/@calledElement]
Expand All @@ -407,7 +407,7 @@
<!-- For each dataOutput which is a child of a callActivity applies: -->
<!-- The structureRef of the (indirectly) referenced ItemDefinition must be the same as the structureRef of the
(indirectly) referenced itemDefinition of the called Process/GlobalTask -->
<iso:rule context="bpmn:dataOutput[ancestor::bpmn:callActivity]">
<iso:rule context="bpmn:dataOutput[ancestor::bpmn:callActivity and @itemSubjectRef]">
<iso:assert test="//bpmn:itemDefinition[@id=current()/@itemSubjectRef]/@structureRef =
//bpmn:itemDefinition[@id=
//bpmn:*[@id=//bpmn:callActivity[bpmn:ioSpecification/bpmn:dataOutput=current()]/@calledElement]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ public void testConstraintFailCalledProcessItemsNotMatching() throws ValidationE
ValidationResult result = verifyInvalidResult(createFile("EXT063_failure_calledProcess_itemsNotMatching.bpmn"), 2);
assertViolation(result.getViolations().get(0),
ERR_MSG,
"(//bpmn:outputSet[ancestor::bpmn:callActivity and node()])[1]", 73);
"(//bpmn:outputSet[ancestor::bpmn:callActivity/bpmn:ioSpecification/bpmn:dataOutput[@itemSubjectRef] and node()])[1]", 73);
assertViolation(result.getViolations().get(1),
ERR_MSG,
"(//bpmn:dataOutput[ancestor::bpmn:callActivity])[1]", 69);
"(//bpmn:dataOutput[ancestor::bpmn:callActivity and @itemSubjectRef])[1]", 69);
}

@Test
Expand Down

0 comments on commit 0712065

Please sign in to comment.