By Andy Garratt
Business processes in IBMÂ® Business Process Manager should store only the data that is needed for the process or a service in the process as the process runs. Avoid large “cargo” object data being carried through the process because that data needs to be persisted as process instance state.
When large amounts of data are stored as variables, they use memory and disk space in the process database, require serializing and deserializing, and they will be copied on by-value invocations. According to theÂ IBM Business Process Manager V8.5 Performance Tuning and Best Practices Redpaper, “In general, objects that are 5 MB or larger might be considered â€ślargeâ€ť and require special attention. Objects of 100 MB or larger are â€śvery largeâ€ť and generally require significant tuning to be processed successfully.”
One way to avoid carrying data is to use the Claim Check pattern; the large object is persisted in a separate system of record and only a reference to it is used in the process. Claim Check is an enterprise integration pattern (eaipatterns.com/StoreInLibrary.html). For information about using the claim check pattern with BPEL, see Improving application efficiency with the Claim Check pattern in WebSphere Integration Developer V18.104.22.168.
In addition, retrieve data only when it is needed, and carry data for only as long as it is needed. Consider the following examples:
- A process refers to a customer and displays the customer’s address and order history at a point in the process. If the process does not need this information elsewhere, it should not be stored in the process; the information should be retrieved from the system of record as reference data before it is displayed.
- A call to a web-service brings in 100 fields of data. The process needs only 2 fields of this data. Ensure that the rest of the data that is retrieved from the call is not stored and that the variables are nulled after use so the JVM can do garbage collection.
- A process requires a file to be uploaded by a user and added to an Enterprise Content Management system. This scenario is best handled by using the Document List coach view which allows uploading of a document directly from a userâ€™s machine without using an intermediate process or service variable to hold the contents of the file.
Applicable editions: Express, Standard, and Advanced
Applicable releases: All