738
// Returns both the workflow component and a read-only CHASM context.
739
// This method is for read-only operations.
740
>
func (ms *MutableStateImpl) ChasmWorkflowComponentReadOnly(ctx context.Context) (*chasmworkflow.Workflow, chasm.Context, error) {
mutable_state_impl.go
741
>
chasmCtx := chasm.NewContext(ctx, ms.chasmTree.(*chasm.Node))
742
>
rootComponent, err := ms.chasmTree.ComponentByPath(chasmCtx, nil)
743
>
if err != nil {
744
return nil, nil, err
745
}
747
>
if !ok {
748
return nil, nil, serviceerror.NewInternalf("expected workflow component, but got %T", rootComponent)
749
}
751
}
752