Document Cache:
Document cache shape in Boomi helps us to store documents at one part of the process and then retrieve it anywhere within the process. Document cache helps in overcoming the limitations of Dynamic Document and Dynamic Process Property as below:
Dynamic Document Property limitation: Data stored in one Branch one can’t be retrieved in any other Branch. Document Cache data can be retrieved anywhere in the process
Dynamic Process Property limitation: It can store only one value at a time. Document cache can store data of thousands of documents
Document cache can be configured in the following ways:
- Use Add to Cache Shape from the shapes pallet and add it to your flow where you want to store data
- Certain Connector Operations allow us to Cache the document passing through them. For example:
It’s pretty similar to adding an Add to cache shape after the connection
How to Add Documents to Cache:
Step 1:
In your Boomi process add the Add to Cache shape where you want to store the data.
In the document cache you could add the following five profile types:
- Database
- XML
- JSON
- Flat File
- EDI
- None
Step 2:
After specifying the profile type, you need to create/import a Profile. Make sure that the profile type should match with the Profile type mentioned in Step 1.
Step 3:
The next option is if you want to Enforce one index entry per document. If you check this box and if there are duplicate indexes you would receive an error while doing a document cache lookup.
The process wouldn’t fail while adding data to cache but will fail while retrieving data from it as when there are duplicates Boomi wouldn’t know which document to return.
Step 4:
In the last step you need to add an Index, which acts like an identifier/key for the documents being added to the cache. For ex: If you are adding Sales Order data to Cache you can keep the order number as the Index or if you are adding SAP idocs to Cache you can keep the idoc Number as the index.
The index specified will then be used to lookup the documents from Cache.
References:
- Boomi Help page for Document cache configuration can be found here
Cover Photo by Sergei Starostin