Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing parallel execution #37

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/FingerBoard-Core-Tests/FBFlowTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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

]

Expand Down
5 changes: 0 additions & 5 deletions source/FingerBoard-Core/FBActivation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ FBActivation >> flow [
^ executor flow
]

{ #category : #testing }
FBActivation >> hasError [
^ state = #error
]

{ #category : #accessing }
FBActivation >> id [

Expand Down
5 changes: 5 additions & 0 deletions source/FingerBoard-Core/FBBaseActivation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ FBBaseActivation >> followTransition: aTransition [
executor flowInstance executor addPending: aTransition ]
]

{ #category : #testing }
FBBaseActivation >> hasError [
^ state = #error
]

{ #category : #initialization }
FBBaseActivation >> initialize [
super initialize.
Expand Down
8 changes: 8 additions & 0 deletions source/FingerBoard-Core/FBParallelExecutor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading