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

StateFlowGraph should be serializable #77

Closed
amesbah opened this Issue Dec 18, 2012 · 5 comments

Comments

Projects
None yet
3 participants
@amesbah
Member

amesbah commented Dec 18, 2012

Making the StateFlowGraph serializable enables saving and restoring of the whole graph.

@mehdimir

This comment has been minimized.

Show comment
Hide comment
@mehdimir

mehdimir Oct 18, 2013

StateFlowGraph is no longer serializable because of class ExitNotifier. I tried to make ExitNotifier serializable (by making it implementing Serializable) however, I got another java.io.NotSerializableException error for class java.util.concurrent.CountDownLatch. I think this issue need to get reopened.

mehdimir commented Oct 18, 2013

StateFlowGraph is no longer serializable because of class ExitNotifier. I tried to make ExitNotifier serializable (by making it implementing Serializable) however, I got another java.io.NotSerializableException error for class java.util.concurrent.CountDownLatch. I think this issue need to get reopened.

@mehdimir

This comment has been minimized.

Show comment
Hide comment
@mehdimir

mehdimir Oct 18, 2013

I made all objects related to package java.util.concurrent transient. I Also made InputValue and FormInput implement Serializable. This avoids exception during Serialization. However, lack of lockRead/lockWrite lead to a malformed deserialization. For example, method toString raise exception on deserialized object.

mehdimir commented Oct 18, 2013

I made all objects related to package java.util.concurrent transient. I Also made InputValue and FormInput implement Serializable. This avoids exception during Serialization. However, lack of lockRead/lockWrite lead to a malformed deserialization. For example, method toString raise exception on deserialized object.

@amesbah

This comment has been minimized.

Show comment
Hide comment
@amesbah

amesbah Oct 18, 2013

Member

The SFG should actually be a graph; any concurrency logic/code should be moved out of this class.

Member

amesbah commented Oct 18, 2013

The SFG should actually be a graph; any concurrency logic/code should be moved out of this class.

@alexnederlof

This comment has been minimized.

Show comment
Hide comment
@alexnederlof

alexnederlof Oct 23, 2013

Member

Our SFG implementation is not serializable and controls the locking/access mechanism to the underlying DirectedGraph<StateVertex, Eventable> which is serializable. If you want to serialize, you can use that object, not the our wrapping SFG.

Member

alexnederlof commented Oct 23, 2013

Our SFG implementation is not serializable and controls the locking/access mechanism to the underlying DirectedGraph<StateVertex, Eventable> which is serializable. If you want to serialize, you can use that object, not the our wrapping SFG.

@mehdimir

This comment has been minimized.

Show comment
Hide comment
@mehdimir

mehdimir Oct 23, 2013

I am currently serializing sfg field of InMemoryStateFlowGraph. However, I ended up implementing methods like containsVertex, containsEdge, and equals.

mehdimir commented Oct 23, 2013

I am currently serializing sfg field of InMemoryStateFlowGraph. However, I ended up implementing methods like containsVertex, containsEdge, and equals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment