Context

Definition

A context is a set of key / value pairs.

Motivation

The context structure and management is similar to a function context in a programming language. Some factory component elements declare value contexts while others use them. The issue is to manage context stacks: a context can successively be enriched by different factory components with new key/value pairs; the getValue(key) function must returns the value of the last key/value declaration.

Structure

A context is a set of context elements. Basically, a context element is a key/value pair. A key is a string name. A value has a type, typically defined by a Java class (e.g., String). The value can be simple (e.g., "Hello, world!" for a String), or complex (e.g., an array).

A context is valued at the orchestration level, in two different ways:

Note: a contract element is built on the same principle. A contract element can declare values or references contract elements of used factory components. For the latter, this avoids a useless context element declaration.

Context Structure

Figure 1. Context Structure

Context Stacking and Context Visibility

The context management is the same than for functions: