AppCountReadiness

Use this node to count the number of apps created by a template in an org. Both templateSourceId and dataspace are optional. If templateSourceId isn’t provided, the current template is used. If dataspace is provided, the search is narrowed to apps within the given data space. Returns a count of apps found.

Asset Type Name for Rules 

Not supported

Example Definition in chain.json 

1{
2  "name": "count_apps",
3  "label": "Counts apps from template",
4  "dominoVariant": "sfdc_internal__UnifiedAnalyticsDominoVariant",
5  "parameters": {},
6  "definition": {
7    "nodes": {
8      "readiness_check1": {
9        "graphNodeType": {
10          "name": "AppCountReadiness"
11        },
12        "parameters": {
13          "name": "AppCountReadiness1",
14          "valueOnError": -1,
15          "condition": "${Variables.runCountReadiness}",
16          "templateSourceId": "${Variables.templateSourceId}",
17          "dataspace": "${Variables.dataspace}",
18          "statusList": ["SuccessStatus", "SuccessWithWarningsStatus"]
19        },
20        "sources": [],
21        "runAs": "CurrentUser"
22      }
23    }
24  }
25}

Parameters 

ParameterDefinition
name(Required) The name of the readiness check. The result is stored in the app context as ${Readiness.AppCountReadiness1}.
templateSourceId(Optional) The template source ID to count apps for. If not provided, the current template is used.
dataspace(Optional) A data space name to narrow the search to apps within that data space.
statusList(Optional) A list of app statuses to include in the count. Supported values include SuccessStatus and SuccessWithWarningsStatus.
condition(Optional) An EL expression, evaluated at runtime, that determines whether to run this readiness check or not.
valueOnError(Optional) A default value to use if the readiness check encounters a transient error. When omitted, the check resolves to 0 on error.

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

App Context Values 

App Context ValueDefinition
Readiness.<name>An integer count of apps matching the criteria found in the org.

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