Login  Register

Re: Using SandstoneDB for persistance. Getting error.

Posted by Denis Kudriashov on Jul 11, 2017; 2:22pm
URL: https://forum.world.st/Using-SandstoneDB-for-persistance-Getting-error-tp4954270p4954353.html


2017-07-11 16:25 GMT+02:00 sergio ruiz <[hidden email]>:

I am setting up the state machine on initialization using (where state machine is an instance variable):


setupStatemachine

| stCustomerIncomplete stNoImages stImagesAttached stSizeSelected stOrderComplete |

statemachine := SsStateMachine new.

stCustomerIncomplete := (statemachine addStateNamed: #stateCustomerIncomplete)

when: #toNext

guarded: [ customerComplete isNotNil ]

to: #stateNoImages. 

and on and on with more states..


So to be able serialize such object you need to replace #guarded block with message send like:

guarded:( MessageSend receiver: customerCompete selector: #isNotNil)

Maybe there is the way how to make blocks serialyzable because Fuel support it. But I never use sandstoneDB and it can use some different library.