ReadinessChainRun

Use this node to run template readiness checks for the current or another template. This task polls every 30 seconds for a maximum of 300 attempts before failing. This task supports installation in the current org or Data 360 Home org only.

Asset Type Name for Rules 

Not supported

Example Definition in chain.json 

1{
2  "name": "run_readiness",
3  "label": "Run readiness chain",
4  "dominoVariant": "sfdc_internal__UnifiedAnalyticsDominoVariant",
5  "parameters": {},
6  "definition": {
7    "nodes": {
8      "run_readiness": {
9        "graphNodeType": {
10          "name": "ReadinessChainRun"
11        },
12        "parameters": {
13          "name": "RunReadinessChain",
14          "destination": "CurrentOrg",
15          "body": {
16            "templateValues": "${Variables}",
17            "chainName": "readinessChainName"
18          },
19          "file": "readiness_payload.json",
20          "condition": "${!Variables.skipReadinessChain}",
21          "templateIdOrApiName": null,
22          "maxRetries": 10
23        },
24        "sources": [],
25        "runAs": "CurrentUser"
26      }
27    }
28  }
29}

Example File Payload (readiness_payload.json) 

1{
2  "templateValues": "${Variables}",
3  "chainName": "optionalReadinessChainName"
4}

Parameters 

ParameterDefinition
name(Required) The developer name for this readiness chain run task. This is used to store the result in the app context, for example ${Readiness.RunReadinessChain}.
body(Optional) The readiness payload, usually template values to pass to the readiness chain, and optionally the readiness chain name. This takes precedence over file.
file(Optional) The path to a JSON file containing the readiness payload, usually template values to pass to the readiness chain, and optionally the readiness chain name. If body is set, this is ignored.
destination(Optional) Where to run the readiness chain. Supported values are CurrentOrg and DataCloudHomeOrg, defaults to CurrentOrg.
templateIdOrApiName(Optional) The template ID or API name to run readiness for. If null or omitted, readiness is run for the current template.
maxRetries(Optional) The maximum number of polling attempts. Defaults to 300 if not specified.
condition(Optional) An EL expression, evaluated at runtime, that determines whether to run this readiness chain or not.
valueOnError(Optional) A Map<String, Boolean> containing the default values of each of the org preference check in the event of an error or failure. Each key in the map must be defined in the preferenceNames attribute.

One of body or file is required.

Set runAs to CurrentUser so that this node runs with the permissions of the user installing the app. If you omit runAs, the node runs as AutoProc, a system user.

Note

Behavior 

  • Polling. The task polls every 30 seconds for up to the configured maxRetries attempts until the readiness chain reaches a terminal status.
  • Destination-aware. Only CurrentOrg and DataCloudHomeOrg are supported.

App Context Values 

App Context ValueDefinition
Readiness.<name>The results of the readiness chain’s Readiness state.

On Failure 

Failure handling depends on whether valueOnError is defined:

  • If no valueOnError is defined, the result is passed through as it is. A failed check returns FAIL_TERMINAL and the chain stops.
  • If valueOnError is present and the task succeeded, the result is passed through as it is.
  • If valueOnError is present and the task failed for any reason, the task returns WARN_AND_CONTINUE and passes along the error message. valueOnError is written to the app context so that downstream nodes can continue.

See Also