Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

At the moment, the update of the properties in the cache at migrate time happens as soon as the participant receives the call. The participant may need to be aware of both the old properties and the new while it is carrying out checks and other processes.

    

@Override
public void migrate(UUID instanceId, AcElementDeploy element, UUID compositionTargetId, Map<String, Object> properties) throws PfModelException {

Current implementation

...

Code Block
languagejava
public record CompositionDtoCompositionElementDto(UUID compositionId, ToscaConceptIdentifier elementDefinitionId,
     Map<String, Object> inProperties, Map<String, Object> outProperties) {
}
 
public record InstanceElementDto(UUID instanceId, UUID elementId, ToscaServiceTemplate toscaServiceTemplateFragment,
     Map<String, Object> inProperties, Map<String, Object> outProperties) {
}



Code Block
languagejava
/**
 * Migrate a automation composition element.
 *
 * @param compositionDtocompositionElement the old composition element, if new element elementDefinitionId will be null
 * @param instanceElementDtocompositionElementTarget the oldcomposition instanceelement elementtarget, if newremoved element elementIdelementDefinitionId will be null
 * @param compositiontargetDtoinstanceElement the old compositioninstance targetelement, if removednew element elementDefinitionIdelementId will be null 
 * @param  instanceElementMigrateDto instanceElementMigrate the instance element with  removed properties, if new element elementId will be null
 */
@Override public void migrate(CompositionDtoCompositionElementDto compositionDtocompositionElement, InstanceElementDtoCompositionElementDto instanceElementDtocompositionElementTarget,
    CompositionDtoInstanceElementDto compositiontargetDtoinstanceElement, InstanceElementDto instanceElementMigrateDtoinstanceElementMigrate) throws PfModelException {
}

...