In this article, Nathalie Lammelin explains how C-EMS contexts are managed.



 

Session ID

 

User sessions are accessed through session IDs (like JSESSIONID in Tomcat), which contain a reference to session information.

IDs must be transferred by the browser, so that the application can link the HTTP request and the associated user session together.

The transfer of these IDs is managed through use of browser cookies.

 

  Convertigo itcenter welcome page graphic developper

 

Convertigo Context

 

Each time a request is sent to C-EMS a new context is created. It contains all the relevant information required to process the request.

The CONTEXTID is based on the session ID.
The standard template is: [JSESSIONID]_[contextName]

In most cases, contextName value is “default” but in the following situations:

 

  • It has been initialized, as a request parameter: __context=XXXX
  • It has explicitly been specified or automatically generated for transaction requests initiated by a sequence through a TransactionStep.
  • It has been automatically generated for sequence requests initiated by a sequence through a SequenceStep.

 

Sequence processing

 

A sequence is executed within a given C-EMS context. It can itself transparently call other requests through TransactionStep and SequenceStep steps.
A request initiated by a sequence cannot be executed within the same initial sequence context and therefore requires another context.
Globally, a sequence:

 

    • Has its own context
      • CONTEXTID value is [JSESSIONID]_default or
      • CONTEXTID value is [JSESSIONID]_XXXX (if __context=XXXX)

 

    • Generates an execution context name for its own transaction requests
      • CONTEXTID value is [JSESSIONID]_Container-[project]-[sequence].[N]
      • Where
        • – project = project name
        • – sequence = initializing sequence name
        • – N = initiating sequence instance number

 

    • Generates an execution context name for each sequence request
      • CONTEXTID value is [JSESSIONID]_Container-[project]-[sequence].[N].[I]
      • Where
        • – project = project name
        • – sequence = initializing sequence name
        • – N = initiating sequence instance number
        • – I = processed sequence ID

 

  • Generates an execution context name for each request processed in parallel
    • CONTEXTID value is [JSESSIONID]_Container-.[P].[N]-[T].[I]
    • Where
      • – P = initiating object ID
      • – N = initiating object instance number
      • – T = initiating object execution time
      • – I = processed transaction/sequence ID

 

NB: it is also possible to specify a particular context name for a transaction request processing instead of using the default generated name. This allows, within the same session, two different sequences initiating transaction request on the same context. In that case, the “Context” property of the TransactionStep object must be supplied and CONTEXTID value is [JSESSIONID]_XXXX (with Context = XXXX).*

 

Summary

 

  Convertigo itcenter welcome page graphic developper

 

Context removal

 

All the contexts created during sequence execution are automatically removed, but those with a specified name (e.g. not automatically generated).

Leave a comment