Skip to content

Commit

Permalink
Merge pull request #388 from jfgarcia268/master
Browse files Browse the repository at this point in the history
Fix variable reference for OS LWC Compilation and Fix for the unwanted json getting printed during the retry due to LWC
  • Loading branch information
Adam Rutland authored Jul 27, 2021
2 parents 6c6c3d4 + a9f6314 commit 23c4831
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 6 additions & 2 deletions lib/datapacktypes/omniscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ OmniScript.prototype.onDeployFinish = async function(jobInfo) {
if (jobInfo.resusableOSToCompile) {
VlocityUtils.verbose('Parent OmniScripts to Compile', jobInfo.resusableOSToCompile);
var idsArray = Object.keys(jobInfo.resusableOSToCompile);
// To handle the Retry in the case of only manifest error as that prints unwanted json
if (idsArray.length < 1){
return;
}
VlocityUtils.report('Starting Parent OmniScript LWC Activation', 'Number of OmniScript to Activate: ' + idsArray.length);
for (let i = 0; i < idsArray.length; i++) {
var omniScriptId = idsArray[i];
Expand Down Expand Up @@ -261,7 +265,7 @@ OmniScript.prototype.compileOSLWC = async function(jobInfo, omniScriptId,omniScr
}

if (tries == maxNumOfTries) {
errorMessage = 'Activation took longer than ' + defaultMinToWaitForLWCOmniScript + ' minutes - Aborting';
errorMessage = 'Activation took longer than ' + jobInfo.defaultMinToWaitForLWCOmniScript + ' minutes - Aborting';
}

if (errorMessage) {
Expand Down Expand Up @@ -543,4 +547,4 @@ OmniScript.prototype.getBulkJobObjectName = function() {

OmniScript.prototype.getBulkJobObjectKey = function () {
return this.vlocity.namespacePrefix + "OmniScriptId__c";
}
}
8 changes: 7 additions & 1 deletion lib/datapacktypes/vlocitycard.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ VlocityCard.prototype.onDeployFinish = async function(jobInfo) {
if (jobInfo.ignoreLWCActivationCards) {
return;
}
// To handle the Retry in the case of only manifest errors as that prints unwanted json
var idsArray = Object.keys(jobInfo.flexCardsToCompile);

if (idsArray.length < 1){
return;
}

try {

Expand Down Expand Up @@ -231,4 +237,4 @@ VlocityCard.prototype.addParentUILayoutForCard = async function(jobInfo,carKey)
}
}
}
}
}

0 comments on commit 23c4831

Please sign in to comment.