HowTo: Get and Set a Relevant Data Value

Official Content
This documentation is valid for:

In most cases, Workflow manages the relevant data between task automatically, but there are some cases where you need to retrieve the relevant data by program, for instance:

Get

&WorkflowApplicationData = &WorkflowContext.ProcessInstance.GetApplicationDataByName('<RelevanDataName>')
&Variable = &WorkflowApplicationData.NumericValue

Set

&WorkflowContext.ProcessInstance.GetApplicationDataByName('<RelevanDataName>').NumericValue = &Variable
Commit

Where:

&WorkflowContext (WorkflowContext data type)
&WorkflowApplicationData (WorkflowApplicationData data type)
&Variable (in this case Numeric but it could be another type)

See Also 

Workflow Context
Workflow Process Instance Data Type