Context Store

A Sequential workflow executes various tasks. If these tasks need to pass information between each other, you need Contexts.

A Context store is a data container. Each task can produce some data, which is then saved into the Context. The following task can read the data from the context (and produce data in a different context or update the source context).

In programming terms, Contexts would be something like variables. But Contexts are much more capable than simple variables. They automatically provide the following functionalities:

  • Merging
  • Original Values
  • XML


When a task finishes and produces some results, the resulting data is saved into the Context. They are not just simply replaced. Leveraging the knowledge of the whole data model, ORIGAM allows you to do enhanced merging easily.

Let’s say you want to load data from the database, update some records and then save the data. For that, you need to create a workflow:

  1. Calling the DataService.LoadData service call will load the data
  2. Calling the TransformationService.Transform service call will take the data and produce a copy with updated values
  3. Calling the DataService.StoreData service call will save the updated data

For this, you need to create one Context:

  • Data

The first service will load data from the database and since the Context is empty, all the records will appear in the dataset.

After the second service call the resulting records will be looked up and updated in the Context of the following way:

  1. Every record will be looked up by the primary key in their respective entity
  2. Records will be compared and the Context will be updated with the changes.

Original Values

When the Context gets updated, the original values (The ones loaded from the database) will always be preserved. So the Context will always store the original values and the current values (updated by different tasks in the sequential workflow).

These values will be used especially when saving the data for concurrency checks.


Any data structure-based data contained in a context can be accessed as XML, e.g. when using Data Transformation Service.