2017-07-11 16:25 GMT+02:00 sergio ruiz <sergio.rrd@gmail.com>:

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.