diff --git a/repository/OpenPonk-BormModel/BormActivity.class.st b/repository/OpenPonk-BormModel/BormActivity.class.st index 210c43d..25a4217 100644 --- a/repository/OpenPonk-BormModel/BormActivity.class.st +++ b/repository/OpenPonk-BormModel/BormActivity.class.st @@ -12,11 +12,19 @@ Class { #category : #'OpenPonk-BormModel-Models' } -{ #category : #'as yet unclassified' } +{ #category : #associating } BormActivity >> ==> anActivity [ ^ BormFactory communicationFrom: self to: anActivity ] +{ #category : #accessing } +BormActivity >> allElements [ + "should return all elements recursively (incl. sub-elements)" + + ^ super allElements , (self communications flatCollect: [ :each | + (Set with: each) , each allElements ]) +] + { #category : #accessing } BormActivity >> allEntities [ ^ super allEntities , (self sent flatCollect: #allEntities) diff --git a/repository/OpenPonk-BormModel/BormCommunication.class.st b/repository/OpenPonk-BormModel/BormCommunication.class.st index 97416ba..b904376 100644 --- a/repository/OpenPonk-BormModel/BormCommunication.class.st +++ b/repository/OpenPonk-BormModel/BormCommunication.class.st @@ -54,7 +54,15 @@ BormCommunication >> constraints [ { #category : #accessing } BormCommunication >> dataFlows [ - ^ self elements + + ^ elements +] + +{ #category : #accessing } +BormCommunication >> elements [ + + self hasConstraint ifFalse: [ ^ super elements ]. + ^ super elements , { self constraint } ] { #category : #testing } diff --git a/repository/OpenPonk-BormModel/BormProcessNode.class.st b/repository/OpenPonk-BormModel/BormProcessNode.class.st index b42a43a..3e6223a 100644 --- a/repository/OpenPonk-BormModel/BormProcessNode.class.st +++ b/repository/OpenPonk-BormModel/BormProcessNode.class.st @@ -28,6 +28,14 @@ BormProcessNode >> addTransition: aTransition [ ifFalse: [ self changed ] ] +{ #category : #accessing } +BormProcessNode >> allElements [ + "should return all elements recursively (incl. sub-elements)" + + ^ super allElements , (self transitions flatCollect: [ :each | + (Set with: each) , each allElements ]) +] + { #category : #accessing } BormProcessNode >> allEntities [ ^ (Set with: self entity) , (self outgoing flatCollect: #allEntities) diff --git a/repository/OpenPonk-BormModel/BormTransition.class.st b/repository/OpenPonk-BormModel/BormTransition.class.st index aaf499d..920d4aa 100644 --- a/repository/OpenPonk-BormModel/BormTransition.class.st +++ b/repository/OpenPonk-BormModel/BormTransition.class.st @@ -42,6 +42,13 @@ BormTransition >> constraints [ ^ constraint ifNil: [ #() ] ifNotNil: [ ^ {constraint} ] ] +{ #category : #accessing } +BormTransition >> elements [ + + self hasConstraint ifFalse: [ ^ #( ) ]. + ^ { self constraint } +] + { #category : #accessing } BormTransition >> has: anEntity [ ^ constraint = anEntity