-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #437 from vlocityinc/beta
Updates for New Minor Version of VBT
- Loading branch information
Showing
57 changed files
with
30,526 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//include BaseUtilities.cls; | ||
|
||
List < String > allCardsNames = new List < String > (); | ||
|
||
for (Map < String, Object > obj : dataPackDataSet) | ||
{ | ||
if (obj.get('VlocityRecordSObjectType') == 'vlocity_namespace__VlocityCard__c') { | ||
allCardsNames.add((String)obj.get('Name')); | ||
} | ||
} | ||
|
||
|
||
List < OmniUiCard > cards =[SELECT Id, Name, IsActive FROM OmniUiCard WHERE Name in : allCardsNames AND IsActive = true]; | ||
|
||
for (OmniUiCard temp : cards) | ||
{ | ||
temp.IsActive = false; | ||
} | ||
|
||
if (cards.size() > 0) { | ||
update cards; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//include BaseUtilities.cls; | ||
|
||
List<String> allFlexCardNames = new List<String>(); | ||
|
||
for (Map<String, Object> obj : dataPackDataSet) | ||
{ | ||
if (obj.get('VlocityRecordSObjectType') == 'OmniUiCard') | ||
{ | ||
allFlexCardNames.add((String)obj.get('Name')); | ||
} | ||
|
||
} | ||
|
||
List<OmniUiCard> flexCards = [SELECT Id, Name, IsActive FROM OmniUiCard WHERE Name in :allFlexCardNames AND IsActive = true]; | ||
|
||
for (OmniUiCard temp : flexCards) | ||
{ | ||
temp.IsActive = false; | ||
} | ||
|
||
if (flexCards.size() > 0) | ||
{ | ||
update flexCards; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
String Acct1Id = ''; | ||
List < Account > accts =[SELECT Id, Name FROM Account WHERE Name = 'VBT_TestAutomation1']; | ||
if (accts.size() > 0) { | ||
Acct1Id = accts[0].Id; | ||
Contact[] contacts = [SELECT Id, Name FROM Contact WHERE AccountId = : Acct1Id]; | ||
if (contacts.isEmpty()) { | ||
upsert(new Contact(FirstName = 'VBT_', LastName = 'TestAutomation', AccountId = accts[0].Id)); | ||
} | ||
} else { | ||
Account newAcct = (new Account(Name = 'VBT_TestAutomation1')); | ||
upsert newAcct; | ||
upsert(new Contact(FirstName = 'VBT', LastName = 'TestAutomation', AccountId = newAcct.Id)); | ||
Acct1Id = newAcct.Id; | ||
upsert(new Account(Name = 'VBT_TestAutomation2')); | ||
upsert(new Account(Name = 'VBT_TestAutomation3')); | ||
} | ||
|
||
vlocity_namespace.DRProcessResult result = vlocity_namespace.DRGlobal.processObjectsJSON('{"Name":"TestAuto"}', 'datapacktest_Extract'); | ||
List < Object > outputDr1 = (List < Object >)result.convertToMap().get('returnResultsData'); | ||
System.assertEquals(outputDr1.size(), 2); | ||
System.assert(JSON.serialize(outputDr1[0]).contains('VBT_TestAutomation1')); | ||
System.assert(JSON.serialize(outputDr1[1]).contains('VBT_TestAutomation2')); | ||
|
||
result = vlocity_namespace.DRGlobal.processObjectsJSON('{"Name":"TestAuto"}', 'datapacktest_Turbo'); | ||
String outputDrTurbo = JSON.serialize(result.convertToMap()); | ||
System.assert(outputDrTurbo.contains('VBT TestAutomation')); | ||
System.assert(outputDrTurbo.contains(Acct1Id)); | ||
|
||
|
||
Map < String, Object > ipOutput = (Map < String, Object >) vlocity_namespace.IntegrationProcedureService.runIntegrationService('DataPackTest_DRExtractWithInput', new Map < String, Object > { 'Name' => 'TestAuto' }, new Map < String, Object > ()); | ||
System.assertEquals((String)ipOutput.get('accountId'), Acct1Id); | ||
System.assertEquals((String)ipOutput.get('accountName'), 'VBT_TestAutomation1'); | ||
System.assertEquals((String)ipOutput.get('firstName'), 'VBT'); | ||
System.assertEquals((String)ipOutput.get('lastName'), 'TestAutomation'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.