373
shardID int32,
374
snapshot *p.InternalWorkflowSnapshot,
376
>
// validate workflow state & close status
377
>
if err := p.ValidateCreateWorkflowStateStatus(
378
>
snapshot.ExecutionState.State,
379
>
snapshot.ExecutionState.Status); err != nil {
380
return err
381
}
382
383
// TODO also need to set the start / current / last write version
384
>
batch.Query(templateCreateWorkflowExecutionQuery,
util.go
385
>
shardID,
386
>
snapshot.NamespaceID,
387
>
snapshot.WorkflowID,
388
>
snapshot.RunID,
389
>
rowTypeExecution,
390
>
snapshot.ExecutionInfoBlob.Data,
391
>
snapshot.ExecutionInfoBlob.EncodingType.String(),
392
>
snapshot.ExecutionStateBlob.Data,
393
>
snapshot.ExecutionStateBlob.EncodingType.String(),
394
>
snapshot.NextEventID,
395
>
snapshot.DBRecordVersion,
396
>
defaultVisibilityTimestamp,
397
>
rowTypeExecutionTaskID,
398
>
snapshot.Checksum.Data,
399
>
snapshot.Checksum.EncodingType.String(),
400
>
)
401
>
402
>
return nil
403
}
404