Skip to main content

copyToContext

A Workflow Engine function that copies an object field to the workflowContext. Returns false if the object field is null or does not exist.

This function is available as a feature of the Workflow Engine v1.2 download and later.

This function is available for event, alert, and Situation workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function copyToContext takes the following arguments:

Name

Required

Type

Description

from

Yes

String

Source object field.

to

Yes

String

Destination workflowContext field.

Example

The following example demonstrates typical use of Workflow Engine function workflowEngineFunction.

To copy the value of the CEvent field “custom_info.location.city” to “location.city” in workflowContext, set the following:

  • from: custom_info.location.city

  • to: location.city

The UI translates your settings to the following JSON:

{ “from”:”custom_info.location.city”, "to":"location.city"}