Workflow scratchpad variables

The scratchpad in workflow is a space in the workflow context to store and share string based variables (as name:value pairs) between instances of activities within an executing instance of a workflow.

The scratchpad is global to the instance of the running workflow and as such, is available equally to all activities.

Declaration

The scratchpad itself is automatically available to an executing workflow and requires no specific declaration. Variables are declared and stored in the scratchpad simultaneously by referencing it. For example:
workflow.scratchpad.variableName = variableValue;

Display

There is no way to view the contents of the scratchpad.

Access and Assignment

As stated in the Declaration section:
workflow.scratchpad.variableName = variableValue;
or:
var myValue = workflow.scratchpad.variableName;