Deploy DataPack- Omnscript & IP DataPack Json File jumbled.
Closed this issue · 6 comments
When an Omniscript or IP is deployed, the generated Datapack.json file elements is rearranged or jumbled. When looking at it from inside omnistudio it seems the elements are in the correct order but when you preview or run the OS or IP the elements are out of order. If you try to export it after deploying it, the elements come back in the in correct order.
Editor used: VS Code.
Version: v0.18.18
This happens when the level and order properties of the elements are missing. Under normal circumstances these are re-calculated generated during a deployment by looking at the order of the elements.
I suspect that this is not happening which is why the elements are jumbled.
If possible can you share with me the datapack of the OmniScript, you can mask any customer sensitive data as I am only interested in the structure of the datapack so I can reproduce it and confirm the root cause.
@a470836-abloomfield this should be fixed in the next release; order and level are now re-calculated at deploy time.
See sommit c9c08f1 for the details.
@Codeneos I would love to contribute to this project. Let me know if you need any help.
@a470836-abloomfield this should be fixed in the next release; order and level are now re-calculated at deploy time.
See sommit c9c08f1 for the details.
I am curious because it is not happening to all users though. Just some
When you export an OmniScript or IP in the past it included a Level__c
and Order__c
property which determine the position of the element in the script tree,
Later versions the datapack strip these properties while exporting and automatically recalculate them while importing based on the order of the elements in the datapack. The part responsible for recalculating these properties was not yet ported to vlocode's direct deploy strategy and only available in the compatibility strategy.
If you see jumbled up elements in the script tree it is definitely related to either of these properties not being deployed correctly.
Another solution is to make sure that Level__c
and Order__c
properties are exported, this can be done by using an override definition which to instruct the export to not filter these properties. This way you can be sure the elements are deployed in the correct order.
Sample:
OverrideSettings:
SObjects:
vlocity_namespace__Element__c:
BuildOnlyFields: {}
FilterFields:
- vlocity_namespace__OmniScriptVersion__c
@Codeneos I would love to contribute to this project. Let me know if you need any help.
Currently I am not actively looking for contributors but I am very much open to the idea.
The next major item I intend to work on is adding flex-card to LWC compilation support to the direct deployment mode. This is one of the major features lacking from the Vlocode direct
deploy strategy and flex cards still require manual activation after deployment.
Other features that I have in mind are visualizing OmniScripts in vscode to allow changing of common properties inside of vscode instead of having to go through the designer. And adding a context action for generating the LWC components for an OmniScript directly from vscode.
The above should be fixed in the 0.19.x branch; if the issue still occurs please re-open the issue.