func (s *Workflows) GetWorkflow(workflowID string) (*types.Workflow, error) {
	key := fes.Aggregate{Type: types.TypeWorkflow, Id: workflowID}
	entity, err := s.GetAggregate(key)
	if err != nil {
		return nil, err
	}
	if entity == nil {
		return nil, nil
	}
	wf, ok := entity.(*types.Workflow)
	if !ok {
		panic(fmt.Sprintf("aggregate type mismatch for key %s (expected: %T, got %T)", key.Format(),
			&types.Workflow{}, wf))
	}
	return wf, nil
}
GetWorkflow returns an event-sourced workflow.
If an error occurred the error is returned, if no workflow was found both return values are nil.
package store
import (
	"errors"
	"fmt"
	"github.com/fission/fission-workflows/pkg/fes"
	"github.com/fission/fission-workflows/pkg/types"
	"github.com/fission/fission-workflows/pkg/util/labels"
	"github.com/fission/fission-workflows/pkg/util/pubsub"
)
type Workflows struct {
	fes.CacheReader  
}
func NewWorkflowsStore(workflows fes.CacheReader) *Workflows {
	return &Workflows{
		workflows,
	}
}