IBM Cast Iron: Prefer Batch over Looping

Cast Iron is the product that serves as the cloud adapter in the IBM middleware ecosystem.
In the following examples we will  take a look  at the TIPs (provided in the database provided by IBM) and how these examples can be modified to use batch processing resulting in more efficient and simple code.


The Following examples will update or insert (upsert) account records in SalesForce.

Clipboard Image2

In the example above there are 2 options

  • In the first Scenario (this is the one we downloaded from the TIP database) the poll detects a change and pulls the first record. This record will then be processed by the Orchestration and will be upserted in salesforce. The following record will be only be processed in when the following poll time is reached.
  • With minimal change we can achieve a second, improved scenario in which we pull all new records (up to a defined maximum) from the database and upsert them to Salesforce one by one using a loop
Clipboard Image1

In the example above we optimized the orchestration even further and do not only use batch processing to get the records from the database but to upsert them to SalesForce (the maximum amount of objects that the SalesForce API supports is 200 so this would be the optimal size) as well.


When possible use batch processing IBM Cast Iron. It increase the throughput of an orchestration and reduces the system load as well.
It speaks for itself that in the examples used above error-handling is to be implemented in a real world scenario.

Author: Tom



Curious to know more about this topic?

Working at i8c

i8c is a system integrator that strives for an informal atmosphere between its employees, who have an average age of approx 30 years old. We invest a lot of effort in the professional development of each individual, through a direct connection between the consultants and the management (no multiple layers of middle management). We are based in Kontich, near Antwerp, but our customers are mainly located in the triangle Ghent-Antwerp-Brussels and belong to the top 500 companies in Belgium (Securex, Electrabel, UCB, etc…).

Quality Assurance

i8c is committed to delivering quality services and providing customer satisfaction. That’s why we invested in the introduction of a Quality Management System, which resulted in our ISO9001:2000 certification. This guarantees that we will meet your expectations, as a reliable, efficient and mature partner for your SOA & integration projects.

i8c - ISO9001-2015

Also worth reading

AWS AppFlow: Streamlining SaaS Integrations with AWS Services

In today’s digital world, organizations are constantly looking for ways to streamline their workflows and improve their data management processes. One of the key challenges that organizations face is integrating their various software as a service (SaaS) applications with their data management systems. This is

Read More »

Apigee Scope Validation using OpenAPI Specification

In API security and management, we often use a lot of different security mechanisms to protect the requested resource behind the API Gateway. One of these mechanisms is the validation of scopes to authorize a client on a specific sub-resource of the API. Most of

Read More »