Skip to content

PublishReport ^v2.7.197 ​

The result of publishing a HierarchyBlueprint.

js
const report = blueprint.publish("Region", "Default");

if (!report.ok()) {
    script.fail("Publish failed: " + report.errors().join(", "));
}

Constructor ​

Returned by HierarchyBlueprint.publish(). It can't be created directly.

Overview ​

  • Partial publishes: in "BEST_EFFORT" mode a publish can succeed for some links and fail for others. skipped() and errors() show what didn't make it.

Methods ​

ok ok() boolean ​

Returns true when the publish finished with no errors.

applied applied() number ​

Returns the number of elements applied to the hierarchy, counting each root and each linked child.

skipped skipped() number ​

Returns the number of elements skipped, for example links whose child was missing. Anything above 0 means the hierarchy isn't a complete copy of the blueprint.

errors errors() string[] ​

Returns the error messages from the publish. Empty when ok() is true. Errors include validation failures, a missing dimension, cycles and individual links that couldn't be applied.

Examples ​

Report the outcome ​

js
const report = blueprint.publish("Region", "Default");

script.log("Applied " + report.applied() + ", skipped " + report.skipped());

for (const error of report.errors()) {
    script.log("Error: " + error);
}