...
- ACM-R receives message from participant intermediary that is restarted
- if Participant is Oslo version (replicaId is not equal to participantId)
- ACM-R sends restarting message to participant intermediary replica
- Participant intermediary handles the restarting message (to save data in memory) and calls participant
- Participant saves local data
- if Participant is New Delhi version (replicaId is equals to participantId)
- ACM-R set the restarting flag to true of all compositions/instances (user cannot do actions)
- ACM-R sends restarting message to participant intermediary
- Participant intermediary handles the restarting message (to save data in memory) and calls participant
- Participant saves local data and does actions if the composition/instance was in priming/deploying/...,
- Participant sends to ACM-R the final state
- ACM-R receives message from participant about the final state and set restarting flag to null
- Participant is Oslo version
Old implementation:
Code Block | ||||
---|---|---|---|---|
| ||||
@Override public void handleRestartInstance(CompositionElementDto compositionElement, InstanceElementDto instanceElement, DeployState deployState, LockState lockState) throws PfModelException { if (DeployState.DEPLOYING.equals(deployState)) { deploy(compositionElement, instanceElement); return; } if (DeployState.UNDEPLOYING.equals(deployState)) { undeploy(compositionElement, instanceElement); return; } if (DeployState.UPDATING.equals(deployState)) { update(compositionElement, instanceElement, instanceElement); return; } if (DeployState.DELETING.equals(deployState)) { delete(compositionElement, instanceElement); return; } if (LockState.LOCKING.equals(lockState)) { lock(compositionElement, instanceElement); return; } if (LockState.UNLOCKING.equals(lockState)) { unlock(compositionElement, instanceElement); return; } intermediaryApi.updateAutomationCompositionElementState(instanceElement.instanceId(), instanceElement.elementId(), deployState, lockState, StateChangeResult.NO_ERROR, "Restarted"); } |
Refactored and will be never called:
Code Block | ||||
---|---|---|---|---|
| ||||
@Override public void handleRestartInstance(CompositionElementDto compositionElement, InstanceElementDto instanceElement, DeployState deployState, LockState lockState) throws PfModelException { } |
...