diff --git a/source/FluxBase-Core-Tests/FBActivationTest.class.st b/source/FluxBase-Core-Tests/FBActivationTest.class.st index 8e27cb8..21d28ec 100644 --- a/source/FluxBase-Core-Tests/FBActivationTest.class.st +++ b/source/FluxBase-Core-Tests/FBActivationTest.class.st @@ -42,40 +42,6 @@ FBActivationTest >> testSourceNodeAnswersTheNodeTheActivationArrivedFrom [ self assert: arrivals asSet equals: (Set with: a with: b) ] -{ #category : 'as yet unclassified' } -FBActivationTest >> testSourceNodeFallsBackToTheLegacyParentIdWhenThereIsNoParentReference [ - "Tokens persisted before FBToken>>parent became a real reference carry only the - parent's id. Rebuild that state directly - the setters for it are gone on purpose - - and check the old resolution path still answers the same node. Delete this together - with FBToken>>parentId once no such tokens are left in any store." - | start split a b join end flow instance arrival parentToken | - start := FBStartEvent new. - split := FBAndSplit named: 'split'. - a := FBTask named: 'a'. - b := FBTask named: 'b'. - join := FBAndJoin named: 'join'. - end := FBEndEvent new. - start --> split. - split --> a --> join. - split --> b --> join. - join --> end. - flow := FBFlow new start: start. - instance := flow newInstance. - instance execute. - arrival := (instance activations detect: [ :each | each node == join ]). - parentToken := arrival token parent. - arrival token - instVarNamed: 'parent' put: nil; - instVarNamed: 'parentId' put: parentToken id. - self assert: arrival token parent isNil. - self assert: arrival sourceNode equals: parentToken node -] - -{ #category : 'as yet unclassified' } -FBActivationTest >> testSourceNodeIsNilWhenThereIsNeitherAParentNorALegacyId [ - self assert: FBActivation new sourceNode isNil -] - { #category : 'tests' } FBActivationTest >> testEnvironment [ | activation node | @@ -155,3 +121,8 @@ FBActivationTest >> testFinishedActivationPersistedWithoutATokenDoesNotReportIts self assert: activation state equals: #done. self assert: activation token state equals: #ready ] + +{ #category : 'as yet unclassified' } +FBActivationTest >> testSourceNodeIsNilWithoutAParentToken [ + self assert: FBActivation new sourceNode isNil +] diff --git a/source/FluxBase-Core-Tests/FBFlowExecutorTest.class.st b/source/FluxBase-Core-Tests/FBFlowExecutorTest.class.st index a969299..d9d8af2 100644 --- a/source/FluxBase-Core-Tests/FBFlowExecutorTest.class.st +++ b/source/FluxBase-Core-Tests/FBFlowExecutorTest.class.st @@ -76,19 +76,6 @@ FBFlowExecutorTest >> testHasPendingReflectsPendingState [ self deny: instance executor hasPending ] -{ #category : 'as yet unclassified' } -FBFlowExecutorTest >> testIsCreatedToleratesRawTransitionPendingFromBeforeWorkItemMigration [ - "a flow instance persisted before FBWorkItem existed can still have a raw - FBTransition sitting in pending after being loaded back into a newer image - - isCreated must not blow up on that shape, see FBTransition>>transition" - | instance realTransition | - instance := FBFlow simpleFlow newInstance. - instance initializeExecutor. - realTransition := instance start outgoing first. - instance executor instVarNamed: #pending put: (OrderedCollection with: realTransition). - self deny: instance executor isCreated -] - { #category : 'as yet unclassified' } FBFlowExecutorTest >> testIsDoneFalseWhilePendingOrSuspendedAreNotEmpty [ | instance | @@ -214,4 +201,3 @@ FBFlowExecutorTest >> testTokenLineagePropagatesAcrossMultipleSequentialSteps [ self assert: endToken parent equals: taskToken. self assert: ({ startToken id. taskToken id. endToken id } asSet size) equals: 3 ] - diff --git a/source/FluxBase-Core-Tests/FBFlowInstanceTest.class.st b/source/FluxBase-Core-Tests/FBFlowInstanceTest.class.st index 5e74cb9..5191a93 100644 --- a/source/FluxBase-Core-Tests/FBFlowInstanceTest.class.st +++ b/source/FluxBase-Core-Tests/FBFlowInstanceTest.class.st @@ -287,22 +287,6 @@ FBFlowInstanceTest >> testNextTransitionForTheStartPseudoTransition [ self assert: flowInstance nextNode equals: flowInstance start ] -{ #category : 'tests' } -FBFlowInstanceTest >> testNextTransitionToleratesRawTransitionPendingFromBeforeWorkItemMigration [ - "an instance persisted before FBWorkItem existed can still have a raw FBTransition - sitting in pending after being loaded back into a newer image. #nextTransition - unwraps its queue entry, and FBTransition>>transition is what keeps that readable" - | flowInstance realTransition | - flowInstance := FBFlow simpleFlow newInstance. - flowInstance initializeExecutor. - realTransition := flowInstance start outgoing first. - flowInstance executor - instVarNamed: #pending - put: (OrderedCollection with: realTransition). - self assert: flowInstance nextTransition == realTransition. - self assert: flowInstance nextNode equals: realTransition target -] - { #category : 'tests' } FBFlowInstanceTest >> testResumeWaitingAtContinuesTheFlow [ | flow instance waitNode | diff --git a/source/FluxBase-Core-Tests/FBParallelExecutorTest.class.st b/source/FluxBase-Core-Tests/FBParallelExecutorTest.class.st index 33bef61..766dc78 100644 --- a/source/FluxBase-Core-Tests/FBParallelExecutorTest.class.st +++ b/source/FluxBase-Core-Tests/FBParallelExecutorTest.class.st @@ -161,27 +161,6 @@ FBParallelExecutorTest >> testEverySuspensionOfOneTransitionKeepsItsOwnToken [ self assert: tokens asSet size equals: 2 ] -{ #category : 'as yet unclassified' } -FBParallelExecutorTest >> testTokenOfAnExecutorPersistedWithASingleTokenPerSuspensionIsStillFound [ - "executors persisted while FBBaseExecutor>>addWaiting:withToken: kept one token per - suspended object hold that token itself where a queue of them is now expected, so - the reader has to tolerate both shapes - reaching into the ivar is the only way to - produce the old one" - | executor node token | - executor := FBParallelExecutor new - flowInstance: FBFlow simpleFlow newInstance; - node: (FBParallelNode named: 'p'); - yourself. - node := FBTask named: 'waiting'. - token := FBToken new. - executor instVarNamed: 'suspendedTokens' put: (IdentityDictionary new - at: node put: token; - yourself). - self assert: (executor takeTokenForSuspended: node) == token. - "and it is forgotten, exactly as a token taken out of a queue is" - self assert: (executor takeTokenForSuspended: node) isNil -] - { #category : 'tests' } FBParallelExecutorTest >> testEachIterationRunsInItsOwnScope [ "an iteration is a lifetime: its tokens live in a scope of their own, opened per diff --git a/source/FluxBase-Core-Tests/FBQueueNormalizationTest.class.st b/source/FluxBase-Core-Tests/FBQueueNormalizationTest.class.st new file mode 100644 index 0000000..b6ad735 --- /dev/null +++ b/source/FluxBase-Core-Tests/FBQueueNormalizationTest.class.st @@ -0,0 +1,78 @@ +" +Queues persisted in an older shape - a raw transition in #pending, a single token under a +suspension - are brought to the current one by FBFlowInstance>>normalizePersistedQueues, +which ApptiveGrid's database migration runs once. The old shapes are built by reaching +into the ivars, the only way left to produce them. +" +Class { + #name : 'FBQueueNormalizationTest', + #superclass : 'FBTest', + #category : 'FluxBase-Core-Tests', + #package : 'FluxBase-Core-Tests' +} + +{ #category : 'tests' } +FBQueueNormalizationTest >> testARawPendingTransitionBecomesAWorkItem [ + | instance transition | + instance := FBFlow simpleFlow newInstance. + instance initializeExecutor. + transition := instance start outgoing first. + instance executor instVarNamed: #pending put: (OrderedCollection with: transition). + + self assert: instance normalizePersistedQueues. + + self assert: (instance executor pending first isKindOf: FBWorkItem). + self assert: instance executor pending first transition identicalTo: transition. + self assert: instance executor pending first token isNil. + self assert: instance nextTransition identicalTo: transition. + instance initialValue: 7. + instance execute. + self assert: instance state equals: #done +] + +{ #category : 'tests' } +FBQueueNormalizationTest >> testASingleSuspendedTokenBecomesAQueueOfOne [ + | instance node token | + instance := FBFlow simpleFlow newInstance. + instance initializeExecutor. + node := FBTask named: 'waiting'. + token := FBToken new. + instance executor instVarNamed: 'suspendedTokens' put: (IdentityDictionary new at: node put: token; yourself). + + self assert: instance normalizePersistedQueues. + + self assert: ((instance executor instVarNamed: 'suspendedTokens') at: node) asArray equals: { token }. + self assert: (instance executor takeTokenForSuspended: node) identicalTo: token. + self assert: (instance executor takeTokenForSuspended: node) isNil +] + +{ #category : 'tests' } +FBQueueNormalizationTest >> testTheExecutorsOfSubFlowInstancesAreNormalizedToo [ + | parent child transition | + parent := FBFlow simpleFlow newInstance. + parent initializeExecutor. + child := FBFlow simpleFlow newInstance. + child initializeExecutor. + transition := child start outgoing first. + child executor instVarNamed: #pending put: (OrderedCollection with: transition). + parent subFlowInstances add: child. + + self assert: parent normalizePersistedQueues. + + self assert: (child executor pending first isKindOf: FBWorkItem). + self assert: child executor pending first transition identicalTo: transition +] + +{ #category : 'tests' } +FBQueueNormalizationTest >> testAnUpToDateInstanceIsLeftAlone [ + | instance before | + instance := FBFlow simpleWaitFlow newInstance. + instance executeWith: 4. + self assert: instance state equals: #waiting. + before := instance executor pending copy. + + self deny: instance normalizePersistedQueues. + + self assert: instance executor pending asArray equals: before asArray. + self deny: FBFlow simpleFlow newInstance normalizePersistedQueues +] diff --git a/source/FluxBase-Core-Tests/FBTokenTest.class.st b/source/FluxBase-Core-Tests/FBTokenTest.class.st index bd1106c..273c767 100644 --- a/source/FluxBase-Core-Tests/FBTokenTest.class.st +++ b/source/FluxBase-Core-Tests/FBTokenTest.class.st @@ -47,17 +47,6 @@ FBTokenTest >> testTokenKnowsTheActivationItIsAttachedTo [ self assert: loose activation equals: activation ] -{ #category : 'as yet unclassified' } -FBTokenTest >> testLegacyParentIdReadsThroughToTheParentReference [ - "#parentId only exists for tokens persisted before #parent was a real reference. - For a token that has a parent it must not contradict it." - | parent child | - parent := FBToken new. - child := FBToken new parent: parent; yourself. - self assert: child parentId equals: parent id. - self assert: FBToken new parentId isNil -] - { #category : 'as yet unclassified' } FBTokenTest >> testNewTokenHasReadyStateAndUniqueId [ | a b | diff --git a/source/FluxBase-Core-Tests/FBTransitionTest.class.st b/source/FluxBase-Core-Tests/FBTransitionTest.class.st index 6252af3..835dac0 100644 --- a/source/FluxBase-Core-Tests/FBTransitionTest.class.st +++ b/source/FluxBase-Core-Tests/FBTransitionTest.class.st @@ -4,10 +4,3 @@ Class { #category : 'FluxBase-Core-Tests', #package : 'FluxBase-Core-Tests' } - -{ #category : 'as yet unclassified' } -FBTransitionTest >> testTransitionAnswersItselfForDuckTypingWithWorkItem [ - | transition | - transition := FBTransition new. - self assert: transition transition == transition -] diff --git a/source/FluxBase-Core/FBBaseActivation.class.st b/source/FluxBase-Core/FBBaseActivation.class.st index b7ae7ae..2cc92e7 100644 --- a/source/FluxBase-Core/FBBaseActivation.class.st +++ b/source/FluxBase-Core/FBBaseActivation.class.st @@ -255,22 +255,7 @@ FBBaseActivation >> sourceNode [ taken to produce me. Not derivable from the graph - my node may have several incoming transitions, and a loop passes the same one repeatedly - so it comes from my token's parent, which is the token of the activation that spawned me." - ^ self token parent - ifNotNil: [ :parentToken | parentToken node ] - ifNil: [ self legacySourceNode ] -] - -{ #category : 'accessing' } -FBBaseActivation >> legacySourceNode [ - "Tokens persisted before FBToken held a real #parent reference only carry the - parent's id, so resolve it the way FBJoinBehavior used to: search this instance's - activations for the one owning that token. Remove together with FBToken>>parentId - once no such tokens are left in any store." - | parentTokenId | - parentTokenId := self token parentId ifNil: [ ^ nil ]. - ^ (self instance activations - detect: [ :each | each token id = parentTokenId ] - ifNone: [ nil ]) ifNotNil: [ :each | each node ] + ^ self token parent ifNotNil: [ :parentToken | parentToken node ] ] { #category : 'as yet unclassified' } diff --git a/source/FluxBase-Core/FBBaseExecutor.class.st b/source/FluxBase-Core/FBBaseExecutor.class.st index 37ac5d1..62dad8b 100644 --- a/source/FluxBase-Core/FBBaseExecutor.class.st +++ b/source/FluxBase-Core/FBBaseExecutor.class.st @@ -242,11 +242,8 @@ FBBaseExecutor >> tokenForSuspended: anObject satisfying: aBlock [ "the first token stored for anObject that aBlock accepts, left where it is - the one #takeTokenForSuspended:satisfying: would take. For a look before the taking (#resume:withToken:value:)" - | tokens | suspendedTokens ifNil: [ ^ nil ]. - tokens := suspendedTokens at: anObject ifAbsent: [ ^ nil ]. - (tokens isKindOf: Collection) ifFalse: [ ^ (aBlock value: tokens) ifTrue: [ tokens ] ifFalse: [ nil ] ]. - ^ tokens detect: aBlock ifNone: [ nil ] + ^ (suspendedTokens at: anObject ifAbsent: [ ^ nil ]) detect: aBlock ifNone: [ nil ] ] { #category : 'accessing' } @@ -267,12 +264,6 @@ FBBaseExecutor >> takeTokenForSuspended: anObject satisfying: aBlock [ | tokens token | suspendedTokens ifNil: [ ^ nil ]. tokens := suspendedTokens at: anObject ifAbsent: [ ^ nil ]. - "executors persisted while one token was kept per suspended object hold that token - itself rather than a queue of them" - (tokens isKindOf: Collection) ifFalse: [ - (aBlock value: tokens) ifFalse: [ ^ nil ]. - suspendedTokens removeKey: anObject. - ^ tokens ]. token := tokens detect: aBlock ifNone: [ ^ nil ]. tokens remove: token. tokens ifEmpty: [ suspendedTokens removeKey: anObject ]. @@ -405,17 +396,40 @@ FBBaseExecutor >> suspendedExecutor: anObject [ suspendedExecutor := anObject ] +{ #category : 'migrating' } +FBBaseExecutor >> normalizeQueues [ + "bring my queues from the shapes older stores wrote to the current one, and answer + whether anything changed: a raw FBTransition in #pending (from before FBWorkItem, + 2026-09-03) becomes a work item without a token, and a single token under a + suspension in #suspendedTokens (from before one suspension could hold several) becomes + a queue of one. What FBFlowInstance>>normalizePersistedQueues asks of every executor + for ApptiveGrid's database migration; nothing else reads the old shapes any more" + | changed | + changed := false. + pending withIndexDo: [ :each :i | + (each isKindOf: FBWorkItem) ifFalse: [ + pending at: i put: (FBWorkItem new transition: each; yourself). + changed := true ] ]. + suspendedTokens ifNotNil: [ + suspendedTokens keys do: [ :key | + | tokens | + tokens := suspendedTokens at: key. + (tokens isKindOf: Collection) ifFalse: [ + suspendedTokens at: key put: (OrderedCollection with: tokens). + changed := true ] ] ]. + ^ changed +] + { #category : 'testing' } FBBaseExecutor >> hasTokenIn: aScope [ "is a token of aScope, or of a scope nested in it, still with me - queued on a work item or parked for a suspension? What FBFlowInstance>>isScopeLive: asks every active - executor. A pending entry from before FBWorkItem existed carries no token" - (pending anySatisfy: [ :each | aScope encloses: each token scope ]) ifTrue: [ ^ true ]. + executor. A work item queued without a token (a rerun, a normalized old entry) + belongs to no scope" + (pending anySatisfy: [ :each | each token notNil and: [ aScope encloses: each token scope ] ]) ifTrue: [ ^ true ]. suspendedTokens ifNil: [ ^ false ]. ^ suspendedTokens values anySatisfy: [ :tokens | - (tokens isKindOf: Collection) - ifTrue: [ tokens anySatisfy: [ :token | aScope encloses: token scope ] ] - ifFalse: [ aScope encloses: tokens scope ] ] + tokens anySatisfy: [ :token | aScope encloses: token scope ] ] ] { #category : 'cancelling' } @@ -424,10 +438,10 @@ FBBaseExecutor >> withdrawTokensSatisfying: aBlock [ tokens taken: work items off #pending, and tokens off the queues in #suspendedTokens - a suspension whose last token went falls out of #suspended with it, once per token taken, since #suspended holds the same object once per parked strand. A - suspension that recorded no token (parked before tokens were kept), and a pending - entry from before work items existed, are never touched. The one place the queues - are emptied from outside a step; FBFlowInstance>>withdrawStrandsSatisfying: asks it - of every active executor and settles me afterwards" + suspension that recorded no token (parked before tokens were kept), and a work item + queued without one, are never touched. The one place the queues are emptied from + outside a step; FBFlowInstance>>withdrawStrandsSatisfying: asks it of every active + executor and settles me afterwards" | taken | taken := OrderedCollection new. @@ -438,20 +452,12 @@ FBBaseExecutor >> withdrawTokensSatisfying: aBlock [ suspendedTokens keys do: [ :suspension | | queue | queue := suspendedTokens at: suspension. - (queue isKindOf: Collection) - ifTrue: [ - (queue select: aBlock) do: [ :token | - queue remove: token. - suspended remove: suspension ifAbsent: [ ]. - suspension strandWithdrawn: token. - taken add: token ]. - queue ifEmpty: [ suspendedTokens removeKey: suspension ] ] - ifFalse: [ - (aBlock value: queue) ifTrue: [ - suspendedTokens removeKey: suspension. - suspended remove: suspension ifAbsent: [ ]. - suspension strandWithdrawn: queue. - taken add: queue ] ] ]. + (queue select: aBlock) do: [ :token | + queue remove: token. + suspended remove: suspension ifAbsent: [ ]. + suspension strandWithdrawn: token. + taken add: token ]. + queue ifEmpty: [ suspendedTokens removeKey: suspension ] ]. ^ taken ] diff --git a/source/FluxBase-Core/FBFlowInstance.class.st b/source/FluxBase-Core/FBFlowInstance.class.st index 2291cff..fffd1e3 100644 --- a/source/FluxBase-Core/FBFlowInstance.class.st +++ b/source/FluxBase-Core/FBFlowInstance.class.st @@ -460,12 +460,28 @@ FBFlowInstance >> nextNode [ ^ self nextTransition target ] +{ #category : 'migrating' } +FBFlowInstance >> normalizePersistedQueues [ + "bring the queues of every executor of mine, and of the sub flow instances I hold, + from the shapes older stores wrote to the current one (FBBaseExecutor>> + normalizeQueues): a raw transition in #pending becomes a work item, a single token + under a suspension becomes a queue of one. Answers whether anything changed, so + that a migration marks only what it touched. What ApptiveGrid's database migration + runs over every instance once; the engine itself no longer reads the old shapes" + | changed | + changed := false. + executor ifNotNil: [ + self executors do: [ :each | each normalizeQueues ifTrue: [ changed := true ] ] ]. + subFlowInstances ifNotNil: [ :children | + children do: [ :each | each normalizePersistedQueues ifTrue: [ changed := true ] ] ]. + ^ changed +] + { #category : 'accessing' } FBFlowInstance >> nextTransition [ "the transition the next step will follow. #firstPending answers the queued work item that holds it, so unwrap it here - a work item is not a transition and must - not pass as one. An entry read back out of a store written before FBWorkItem - existed is a raw FBTransition and answers itself (FBTransition>>transition)" + not pass as one" ^ executor firstPending transition ] diff --git a/source/FluxBase-Core/FBJoinBehavior.class.st b/source/FluxBase-Core/FBJoinBehavior.class.st index 4924f99..544f41d 100644 --- a/source/FluxBase-Core/FBJoinBehavior.class.st +++ b/source/FluxBase-Core/FBJoinBehavior.class.st @@ -11,10 +11,8 @@ FBJoinBehavior >> arrivalKey [ "the branch an arrival came through. The parent token identifies it, the source node does not: two branches of one split can reach the join through the same predecessor - one directly, the other after a detour - and would then collapse - onto a single #arrived entry, so the join would never see all its branches. - Tokens persisted before FBToken held a real #parent fall back to the node, which - is what this used to key by all along." - ^ activation token parent ifNil: [ activation sourceNode ] + onto a single #arrived entry, so the join would never see all its branches" + ^ activation token parent ] { #category : 'as yet unclassified' } diff --git a/source/FluxBase-Core/FBJoinState.class.st b/source/FluxBase-Core/FBJoinState.class.st index c1db7c5..5d7d19a 100644 --- a/source/FluxBase-Core/FBJoinState.class.st +++ b/source/FluxBase-Core/FBJoinState.class.st @@ -169,16 +169,7 @@ FBJoinState >> output [ both. A branch taken back is not in here: the join goes on with what arrived" | output | output := Dictionary new. - arrived keysAndValuesDo: [ :key :value | - output at: (self sourceNodeOf: key) put: value ]. + arrived keysAndValuesDo: [ :key :value | output at: key node put: value ]. ^ output ] -{ #category : 'private' } -FBJoinState >> sourceNodeOf: anArrivalKey [ - "FBJoinBehavior>>arrivalKey answers a token, or the node itself for tokens - persisted without a real #parent" - ^ (anArrivalKey isKindOf: FBToken) - ifTrue: [ anArrivalKey node ] - ifFalse: [ anArrivalKey ] -] diff --git a/source/FluxBase-Core/FBScope.class.st b/source/FluxBase-Core/FBScope.class.st index ec612ad..e042077 100644 --- a/source/FluxBase-Core/FBScope.class.st +++ b/source/FluxBase-Core/FBScope.class.st @@ -116,7 +116,7 @@ FBScope >> initialize [ { #category : 'accessing' } FBScope >> outer [ "The scope I am nested in, or nil if I am a root. Nesting, not sequence - - FBToken>>parentId is a different relation, see my class comment." + FBToken>>parent is a different relation, see my class comment." ^ outer ] diff --git a/source/FluxBase-Core/FBToken.class.st b/source/FluxBase-Core/FBToken.class.st index c9f608a..34b206d 100644 --- a/source/FluxBase-Core/FBToken.class.st +++ b/source/FluxBase-Core/FBToken.class.st @@ -38,11 +38,11 @@ reference. That is also why #node is derived from #activation instead of being stored: a token that knows its activation knows its node, and a stored copy could only drift out of step with it. -Three legacy fields, #parentId, #scopeId and #splitId, remain readable for tokens -persisted before this: for those #parent is nil and FBBaseActivation>>sourceNode falls -back to resolving the old id, and #splitId answers the stored id where there is no -#split to derive it from. Nothing writes them any more, and they can be dropped once -no such tokens are left in any store. +The id fields that stood in for #parent, #scope and #split before they were references +are gone (2026-09-10). A token persisted before then carries nil there and is treated +as one without a parent, a scope or a pass; ApptiveGrid brings its stores to the current +shape with a database migration (FBFlowInstance>>normalizePersistedQueues covers the +executor side). My #state says whether this strand is running or parked: #ready or #waiting - and #ready again once the wait was resumed (#resumed) - or #cancelled, once the strand was taken @@ -65,10 +65,7 @@ Class { 'scope', 'parent', 'split', - 'splitId', - 'state', - 'parentId', - 'scopeId' + 'state' ], #category : 'FluxBase-Core-Model', #package : 'FluxBase-Core', @@ -100,9 +97,9 @@ FBToken >> hasAncestor: aToken [ Not reflexive: a token is not its own ancestor. A waiting spot always carries a child of the token that reserved an address for it, never that token itself. - By identity, and only along real #parent references - a token persisted before - #parent became a reference carries just #parentId and stops the walk. Those are from - before reservations existed, so none of them is an anchor" + By identity, and only along real #parent references - a token from before #parent + was a reference has none and stops the walk. Those are from before reservations + existed, so none of them is an anchor" | each | each := parent. @@ -162,21 +159,6 @@ FBToken >> parent: aFBToken [ parent := aFBToken ] -{ #category : 'legacy' } -FBToken >> parentId [ - "Only for tokens persisted before #parent became a real reference; nothing writes - this any more. Answers #parent's id when there is one, so a reader sees a - consistent value either way. See my class comment." - ^ parent ifNil: [ parentId ] ifNotNil: [ :each | each id ] -] - -{ #category : 'legacy' } -FBToken >> scopeId [ - "Only for tokens persisted before #scope became a real reference; nothing writes - this any more. See my class comment." - ^ scope ifNil: [ scopeId ] ifNotNil: [ :each | each id ] -] - { #category : 'accessing' } FBToken >> resumed [ "the wait I was parked at is over and my strand goes on - back to #ready. Sent by @@ -210,9 +192,9 @@ FBToken >> split: aSplitExecution [ { #category : 'accessing' } FBToken >> splitId [ - "the id of my split, for the outside (FBNodeActivationEvent>>splitId) - off the - split itself, or the stored id for a token persisted before splits were objects" - ^ split ifNotNil: [ :each | each id ] ifNil: [ splitId ] + "the id of my pass, for the outside (FBNodeActivationEvent>>splitId); nil at the + outermost level" + ^ split ifNotNil: [ :each | each id ] ] { #category : 'testing' } diff --git a/source/FluxBase-Core/FBTransition.class.st b/source/FluxBase-Core/FBTransition.class.st index e8a562a..1345c20 100644 --- a/source/FluxBase-Core/FBTransition.class.st +++ b/source/FluxBase-Core/FBTransition.class.st @@ -159,23 +159,6 @@ FBTransition >> target: aFBNode [ target := aFBNode ] -{ #category : 'accessing' } -FBTransition >> transition [ - "duck-types as an FBWorkItem so callers of pending/isCreated stay usable on a - pending queue persisted before FBWorkItem was introduced, which still holds raw - transitions. Every executor queues work items now, so this is only that - backwards path" - ^ self -] - -{ #category : 'accessing' } -FBTransition >> token [ - "the other half of duck-typing as an FBWorkItem (see #transition): a pending entry - persisted before work items existed is a raw transition, and it was queued without a - token" - ^ nil -] - { #category : 'cancelling' } FBTransition >> strandWithdrawn: aToken [ "the strand parked on me - aToken - was taken back. The step that parked it was my