The Methods and Tools Special Interest Group met from 5 pm till 6:30 pm Central European Time.


Transition strategy on COBIA


U.S. Environmental Protection Agency (represented by Bill BARRETT), AmsterCHEM (represented by Jasper van BATEN), Bryan Research & Engineering (represented by Michael HLAVINKA), Michel PONS (contractor to CO-LaN as Chief Technology Officer)


The transition case studied considers that a Flowsheet has been persisted by a PME relying on COM middleware for the CAPE-OPEN based interoperability. In that Flowsheet there is a least one CAPE-OPEN PMC. Since the Flowsheet was persisted, at least one Process Modelling Component implementing CAPE-OPEN interfaces has been updated to COBIA, keeping the same ClassID. The Flowsheet is being depersisted by the PME (the same version or an updated version always relying on COM middleware for CAPE-OPEN). The steps involved to obtain a successful depersistence of the Flowsheet are described such as:

  1. The PME calls CoCreateInstance on the PMC. COMBIA intercepts the CoCreateInstance call and creates COMBIA as an inproc server. The COBIA version of the PMC is created by COMBIA.
  2. The PME depersists the PMC through COMBIA.
    1. The PME obtains the IPersistStream interface pointer from the COMBIA wrapper.
    2. The PME calls IPersistStream.Load on the COMBIA wrapper passing an IStream that contains the data.
    3. COMBIA examines the incoming data to determine whether the data came from a COM IPersistStream interface or using COBIA persistenc method.
    4. COMBIA passes the data to the PMC through the ICapeCOMPersistedData interface.
    5. If the COBIA version of the PMC does not support ICapeCOMPersistedData, COMBIA raises an error condition towards the PME. The PME then decides how to continue restoring the Flowsheet, knowing that the PMC in question was not restored properly.

The analysis above leads to the need of an additional interface on the PMC, ICapeCOMPersistedData. This interface needs to be specified. It has one method per type of COM persistence interface, For IPersistStream and IPersistStreamInit, the method is LoadFromCOMStreamData that returns an ICapeBinary.

When updating a COM-based PMC to COBIA, the PMC will need to implement the ICapeCOMPersistedData interface if its developer wants the PMC to support the transition from COM to COBIA.

Next meeting is scheduled for September 12, 2018.



Contact Bill BARRETT, representative U.S. Environmental Protection Agency within CO-LaN, should you wish to join the Methods & Tools Special Interest Group.