Use publish API on Versions
As a story developer, you can use the publish API for publishing public or private versions.
Before You Start
-
You've created a story that contains a table and SAP Analytics Cloud planning model.
-
You've assigned the planning model to the table.
-
You've made up your mind on how to visualize or expose the publish API to the viewers. For example, you want them to click on a button to publish a version.
-
If users try to publish a version that exceeds the resource limits and there are not enough resources available in the system for the publishing operation, they'll see a corresponding message.
Examples for Publishing Public Versions
Examples for Publishing Private Versions
-
No parameters are specified. In this case, the original version from which the private version was created is overwritten.
-
The target version is specified. You can further specify the default behavior for publishing a private version to an unrelated public version by the parameter updateChangedDataOnly. If it's false, the entire private version overwrites the public target version. If it's true, only the changed data is published to the public target version.
APIs to Resolve Publish Conflicts
You can specify the parameter in the publish API to let viewers resolve changes in conflict with another viewer's when publishing a version.
//option 1: Shows the warning dialog for viewers to resolve conflicting changes.
{ publicPublishConflict: PublicPublishConflict.ShowWarning }
//option 2: Publishes the version with conflicting changes overwritten by another viewer without showing the conflict warning dialog.
{ publicPublishConflict: PublicPublishConflict.PublishWithoutWarning }
//option 3: Reverts the version without showing the conflict warning dialog.
{ publicPublishConflict: PublicPublishConflict.RevertWithoutWarning }
For publishing private versions, you can choose to either show the warning dialog for viewers to resolve conflicting changes, or directly publish the version with conflicting changes overwritten by another user without showing the dialog:
//option 1: Shows the warning dialog for viewers to resolve conflicting changes.
{ privatePublishConflict:PrivatePublishConflict.ShowWarning }
//option 2: Publishes the version with conflicting changes overwritten by another viewer without showing the conflict warning dialog.
{ privatePublishConflict:PrivatePublishConflict.PublishWithoutWarning }