Basic scripting

Variables/Properties

Retrieving configuration properties

Syntax:

getMeta(path?: string): any

path - Optional. Returns all properties if path not specified.

Example

getMeta('props.username');

Storing data inside context object

Syntax:

setCtx(path: string, value: any)

Examples

1. setCtx('isValid', true);
2. setCtx('statusCode', 200);
3. setCtx('name', 'abc');
4. setCtx('emp', {
      id: 1,
      name: 'xyz'
    });

Retrieving data from the context object

Syntax:

getCtx(path?: string)

path - Optional. Returns entire context object if path not specified.

Examples

1. getCtx();
2. getCtx('isValid');
3. getCtx('statusCode');
4. getCtx('name');
5. getCtx('emp');

Retrieving current object data inside the loop

Syntax:

getCurrentCtx(path?: string): any

path - Optional. Returns entire current object if path not specified.

Examples

1. getCurrentCtx('item');
2. getCurrentCtx('item').statusCode;

Retrieving data inside the data mapping

Syntax:

getInput(path?: string): any

path - Optional. Returns entire object if path not specified.

Examples

1. getInput();
2. getInput('statusCode');

Last updated

Was this helpful?