Plugin Data Fetch

Plugins require a data payload to function. In some cases the payload passed to a plugin may be insufficient, but it may contain locators that reference the required data. The plugin data fetch mechanism allows retrieval of entities using the locator as a handle.

Important

Some plugins process data that is being processed as a transaction in progress. This data has not been committed, and so will differ from the results returned from this data fetch mechanism.

Supported Entities

To retrieve an entity, use the socotraApi.fetchByLocator method. For example:

let policy = socotraApi.fetchByLocator(Policy, myPolicyLocator);

Note

Note that the Policy parameter (and the identifiers for other entity types) is automatically injected into the JavaScript context, so it does not need to be quoted or otherwise pre-defined. The locator is the same locator that is used in the main Socotra API.

The following entities are supported, and others will be added in upcoming releases:

Example

For an example of usage, see the example provided in the Lambda Plugin Feature Guide.