diff --git a/source/FingerBoard-Core-Tests/FBFlowTest.class.st b/source/FingerBoard-Core-Tests/FBFlowTest.class.st index badf5d5..bc56d4b 100644 --- a/source/FingerBoard-Core-Tests/FBFlowTest.class.st +++ b/source/FingerBoard-Core-Tests/FBFlowTest.class.st @@ -135,6 +135,10 @@ FBFlowTest >> testParallelNodeOpenEnd [ instance := flow newInstance. instance executeWith: { 1 . 2 . 3 }. self assert: instance atEnd. + self assert: instance state equals: #done. + "there should be one activation per node. + The activation for a parallel node is specific and holds collection of arguments and values" + self assert: instance activations size equals: flow nodes size ] diff --git a/source/FingerBoard-Core/FBActivation.class.st b/source/FingerBoard-Core/FBActivation.class.st index 7f76a00..1f72e98 100644 --- a/source/FingerBoard-Core/FBActivation.class.st +++ b/source/FingerBoard-Core/FBActivation.class.st @@ -34,11 +34,6 @@ FBActivation >> flow [ ^ executor flow ] -{ #category : #testing } -FBActivation >> hasError [ - ^ state = #error -] - { #category : #accessing } FBActivation >> id [ diff --git a/source/FingerBoard-Core/FBBaseActivation.class.st b/source/FingerBoard-Core/FBBaseActivation.class.st index 9270905..96a6318 100644 --- a/source/FingerBoard-Core/FBBaseActivation.class.st +++ b/source/FingerBoard-Core/FBBaseActivation.class.st @@ -68,6 +68,11 @@ FBBaseActivation >> followTransition: aTransition [ executor flowInstance executor addPending: aTransition ] ] +{ #category : #testing } +FBBaseActivation >> hasError [ + ^ state = #error +] + { #category : #initialization } FBBaseActivation >> initialize [ super initialize. diff --git a/source/FingerBoard-Core/FBParallelExecutor.class.st b/source/FingerBoard-Core/FBParallelExecutor.class.st index 2b33cbe..2e3c1ad 100644 --- a/source/FingerBoard-Core/FBParallelExecutor.class.st +++ b/source/FingerBoard-Core/FBParallelExecutor.class.st @@ -10,6 +10,14 @@ Class { #category : #'FingerBoard-Core-Model' } +{ #category : #accessing } +FBParallelExecutor >> activate: activation [ + + "unlike default behavior, the activation is already added to the list when being instantiated. + here we only take care of the execution part" + flowInstance activateProtected: activation +] + { #category : #accessing } FBParallelExecutor >> activationClass [ ^ FBParallelActivation