How can I get background context inside workflow definition?

whether I can get background context from workflow context? Instead of I pass name by workflowParam only.

ctx = context.WithValue(ctx,"name","123")
c.ExecuteWorkflow(ctx, workflowOptions, workflowDefinition, workflowParam)

func WorkflowDefinition(wCtx workflow.Context, param WorkflowParam) (*WorkflowResult, error) {

    // get name from backgroud context
}

You cannot inside the workflow. The background context is passed to activity functions only.

Passing it to workflow would make breaking determinism too easy.

What application problem are you trying to solve?

I want to passed share data from workflow definition to activity, that is to say, set data to workflow context and next get data from background context

What kind of data? You can propagate context from workflow to activity if needed, but in most cases adding this data to the activity arguments is a better approach.