...
...
...
Use of different version in composition definition element
it will be log a WARN if the version of the target composition element is not compatible to the composition element version.
Example:
Creation composition "1.2.3" and prime (compositionId):
...
Code Block | ||
---|---|---|
| ||
var automationComposition = participantIntermediaryApi.getAutomationComposition(instanceId); var compositionId = automationComposition.getCompositionId(); var acElementDefinitionsFrom = participantIntermediaryApi.getAcElementsDefinitions(compositionId); var acElementDefinitionFrom = acElementsDefinitionsFrom.values().stream() .filter(el -> el.getAcElementDefinitionId().getName().equals(element.getDefinition().getName())).findFirst().get(); var outPropertiesFrom = acElementDefinitionFrom.getOutProperties(); var acElementDefinitionTo = participantIntermediaryApi.getAcElementDefinition(compositionTargetId, element.getDefinition()); var outPropertiesTo = acElementDefinitionTo.getOutProperties(); |
...
Migration precheck
Assumptions:
- Only the participants can execute a precheck.
- Precheck is executed before the migration, if it fail the migration will be not executed.
- User needs to receive the result of the precheck.
- Acm-runtime needs to handle the precheck fail in a different way it handles migration fail.
Solution 1: change the current flow of migration (not backwards-compatible)
- Acm-runtime stores the migration data (instance properties and composition target) in secondary table. the instance will be in "MIGRATING-PRECHECK" state
- Acm-runtime sends migration-precheck message to participants
- Participant receives migration-precheck message and executes the precheck and sends the result
- Acm-runtime receives precheck-result messages from all participants
- If all precheck result are OK for all participants, Acm-runtime update properties and composition target from secondary table and sends migration-execution message to participants. The instance will be in "MIGRATING" state
- If there is a precheck result failed, Acm-runtime has to show this result into the instance, deployState will be in "DEPLOYED" state, (instance properties will be as before). Data in secondary table will be cleaned.