ftos.context

JSON object that stores information about the workflow context of the client-side process that called the script.

The context object is useful when a client process triggers a server automation script via a function such as ebs.callAction or ebs.callActionByNameAsync and you need to process on the server-side information such as the current entity name, business status, or the user running the digital journey.

It is also useful in event-triggered scripts to track the exact changes that occur in the database during record inserts, updates, and deletions.

Syntax

Copy
{
    additionalValues : WorkflowContextAdditionalValues;
    beforeValues : any;
    businessStatus : string;
    currentBWS : string;
    data : any;
    entityName : string;
    executionDepth : number;
    fetch : any;
    id : string;
    mergedValues : any;
    parentContext : EbsWorkflowContext;
    previousBusinessStatus : string;
    previousBWS : string;
    propertyBag : any;
    userId : string;
    values: any;
    hasChanged(attributeName : string): boolean;
}

Properties

Property Type Description
ftos.context.additionalValues WorkflowContextAdditionalValues Updated values of a record that is subjected to a CRUD operation for all the items that are not entity attributes (additional values and entity extensions).
Also see the beforeValues, mergedValues, and values attributes.
ftos.context.beforeValues any All attribute values of a record before it is subjected to a CRUD operation.
Also see the additionalValues, mergedValues, and values parameters.
ftos.context.businessStatus string Current entity BusinessStatus primary key value (Guid).
ftos.context.currentBWS string Current entity Business Status name.
ftos.context.data any Stores input parameters passed by the client process, for instance via an ebs.callActionByNameAsync function.
ftos.context.entityName string Current entity name (populated inside Data Events).
ftos.context.executionDepth number Nested execution depth.
Each time a script calls an API that triggers another script execution, the execution depth is incremented. When the execution returns to the caller the execution depth is decremented.
ftos.context.fetch any Contains the fetch object when the data event type is 'read'. In this case, you can instrument the fetch before it is sent to the data service.
ftos.context.id string Current entity primary key value (Guid).
ftos.context.mergedValues (readonly) any Updated values of all the attributes of a record that is subjected to a CRUD operation. This is obtained by overwriting the entries in the beforeValues parameter with the entries in the values parameter.
Also see the additionalValues, beforeValues, and values parameters.
ftos.context.parentContext (readonly) context Returns the parent context.
ftos.context.previousBusinessStatus string Current entity PreviousBusinessStatus primary key value (Guid).
ftos.context.previousBWS string Current entity previous Business Status name.
ftos.context.propertyBag any Allows to dynamically share values in multiple scripts during the lifetime of a request.
ftos.context.userId string Authenticated user running the workflow (Guid).
ftos.context.values any Updated values of the attributes that are changed in a CRUD operation.
Also see the additionalValues, beforeValues, and mergedValues parameters.

Methods

Type Aliases

Examples