Skip to content

Commit

Permalink
Merge pull request #94 from sclasen/snapshot-continuation-id
Browse files Browse the repository at this point in the history
Add ContinuedExecutionRunID to FSMSnapshot
  • Loading branch information
sclasen committed Sep 30, 2015
2 parents 5656897 + 237684c commit 422913e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions fsm/snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ import (
)

type FSMSnapshot struct {
State *FSMSnapshotState
Correlator *EventCorrelator
Events []*FSMSnapshotEvent
State *FSMSnapshotState
Correlator *EventCorrelator
Events []*FSMSnapshotEvent
WorkflowID *string
ContinuedExecutionRunID *string
}

type FSMSnapshotState struct {
Expand Down Expand Up @@ -130,6 +132,12 @@ func (s *snapshotter) FromHistoryEventIterator(itr HistoryEventIterator) ([]FSMS
break
}

snapshot.WorkflowID = &state.WorkflowID

if event.WorkflowExecutionStartedEventAttributes != nil {
snapshot.ContinuedExecutionRunID = event.WorkflowExecutionStartedEventAttributes.ContinuedExecutionRunID
}

snapshot.Correlator = nextCorrelator
nextCorrelator = nil

Expand Down

0 comments on commit 422913e

Please sign in to comment.