You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #99 from vlocityinc/feature/build_manifest
Update Readme to include Manifest info.
Add ability to build manifest as a command.
Better test for breaking JSON responses.
Updates for better error handling
Show more consistent time.
Add "key" as argument alternative to manifest style.
When developing on a large project, exporting DataPacks through Queires is not the ideal process. Instead, each developer should keep track of the major items that they are working on and extract those items as needed to commit to Version Control.
674
+
675
+
## Manifest Driven Workflow
676
+
The `manifest` section of the Job File can be used to create a collection of DataPacks to be exported or deployed. Manifests are based on the VlocityDataPackKey of each DataPack.
677
+
678
+
### VlocityDataPackKey Overview
679
+
Each DataPack has a VlocityDataPackKey that represents its Unique Name in the DataPacks system. After Exporting a DataPack this VlocityDataPackKey is also the `VlocityDataPackType/FolderName` of the DataPack.
680
+
681
+
For Product2 DataPacks, the VlocityDataPackKey is built using the `vlocity_namespace__GlobalKey__c`. Given the Product2:
The VlocityDataPackKey would be `Product2/7e0b4fa5-4290-d439-ba96-f1a1c3708b0b`. This is also the same as the Folder Name of the Product2 DataPack when saved to the file system. This is because the `GlobalKey__c` of the Product2 is meant to be a unique field, and the Folders must also have unique names.
694
+
695
+
Here is the `iPhone 6s Plus` Product2 DataPack in its folder with the same VlocityDataPackKey as shown above:
696
+
697
+

698
+
699
+
### Using the VlocityDataPackKey in the Manifest
700
+
This VlocityDataPackKey can be added to the `manifest` of the Job File to drive Export of this Product along with all its dependencies.
701
+
702
+
```yaml
703
+
projectPath: .
704
+
manifest:
705
+
- Product2/7e0b4fa5-4290-d439-ba96-f1a1c3708b0b
706
+
```
707
+
708
+
You can see all the available VlocityDataPackKeys for your Manifest by running:
709
+
`vlocity packGetAllAvailableExports --nojob`
710
+
711
+

712
+
713
+
This will additionally create the file `VlocityBuildLog.yaml` which will save all the results in a format that you can move to your job file.
714
+
715
+
```yaml
716
+
manifest:
717
+
- AttributeCategory/CLOUD_SERVICES
718
+
- AttributeCategory/MOBILE_HANDSET
719
+
- AttributeCategory/INTERNET
720
+
- AttributeCategory/MOBILE_CONTRACT
721
+
- AttributeCategory/MOBILE_TRADE_IN
722
+
- AttributeCategory/SIM_CARD
723
+
- AttributeCategory/WATCH
724
+
- CalculationMatrix/AgeRating
725
+
- DataRaptor/Billing Import Bundle
726
+
```
727
+
728
+
### Adding to Job Files
729
+
When defining your project through a Manifest, it is best to create 2 Job Files.
730
+
731
+
1. Export Job File
732
+
2. Deploy Job File
733
+
734
+
#### Export Job File
735
+
The Export Job File will be used to *only* export the listed manifest items plus their dependencies. For someone only working on a set of Products, this Job File would look like:
736
+
737
+
**Export.yaml**
738
+
```yaml
739
+
projectPath: .
740
+
expansionPath: vlocity
741
+
manifest:
742
+
- Product2/1b1b6c6f-c1b0-1c1d-e068-4651202cb07b
743
+
- Product2/6e28982d-57c8-5bd3-e6db-d66c02c20e43
744
+
- Product2/7e0b4fa5-4290-d439-ba96-f1a1c3708b0b
745
+
- Product2/9a86f5d9-2e05-ef0d-3492-3479db233ef8
746
+
```
747
+
748
+
Running `packExport -job Export.yaml` would also export any DataPacks that these Products depend on by default. To only export the exact manifest you can use `-depth 0` to your command.
749
+
750
+
#### Deploy Job File
751
+
The manifest is also used to control what is deployed, but in the deploy case it will only deploy waht is specified. This allows deploying only a specific set of local folders to the Org, as the VlocityDataPackKeys are the Folder Paths of the DataPacks.
752
+
753
+
Therefore, it is best to create a second job file for Deploy. This job file only needs projectPath as it will deploy the entire contents of the project by default.
754
+
755
+
**Deploy.yaml**
756
+
``` yaml
757
+
projectPath: .
758
+
expansionPath: vlocity
759
+
```
760
+
761
+
Running `packDeploy -job Deploy.yaml` will then deploy all of the DataPacks in the `vlocity` folder as there is no manifest being defined.
762
+
763
+
# Other Job File Settings
671
764
------------
672
765
The Job File has a number of additonal runtime settings that can be used to define your project and aid in making Exports / Deploys run successfully. However, the Default settings should only be modified to account for unique issues in your Org.
673
766
@@ -789,6 +882,7 @@ These types are what would be specified when creating a Query or Manifest for th
0 commit comments