diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java
old mode 100644
new mode 100755
index b4735f1..c7cb548
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandler.java
@@ -29,6 +29,8 @@
 import org.onap.policy.clamp.models.acm.concepts.AcTypeState;
 import org.onap.policy.clamp.models.acm.concepts.AutomationComposition;
 import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionElementDefinition;
+import org.onap.policy.clamp.models.acm.concepts.DeployState;
+import org.onap.policy.clamp.models.acm.concepts.LockState;
 import org.onap.policy.clamp.models.acm.concepts.ParticipantDeploy;
 import org.onap.policy.clamp.models.acm.concepts.ParticipantRestartAc;
 import org.onap.policy.clamp.models.acm.concepts.ParticipantUtils;
@@ -264,6 +266,7 @@
             int startPhase = ParticipantUtils.findStartPhase(
                     cacheProvider.getCommonProperties(automationComposition.getInstanceId(), acElement.getId()));
             if (startPhaseMsg.equals(startPhase)) {
+                acElement.setDeployState(DeployState.UNDEPLOYING);
                 listener.undeploy(messageId, automationComposition.getInstanceId(), acElement.getId());
             }
         }
@@ -275,6 +278,7 @@
             int startPhase = ParticipantUtils.findStartPhase(
                     cacheProvider.getCommonProperties(automationComposition.getInstanceId(), acElement.getId()));
             if (startPhaseMsg.equals(startPhase)) {
+                acElement.setDeployState(DeployState.DELETING);
                 listener.delete(messageId, automationComposition.getInstanceId(), acElement.getId());
             }
         }
@@ -293,6 +297,7 @@
             int startPhase = ParticipantUtils.findStartPhase(
                     cacheProvider.getCommonProperties(automationComposition.getInstanceId(), acElement.getId()));
             if (startPhaseMsg.equals(startPhase)) {
+                acElement.setLockState(LockState.LOCKING);
                 listener.lock(messageId, automationComposition.getInstanceId(), acElement.getId());
             }
         }
@@ -311,6 +316,7 @@
             int startPhase = ParticipantUtils.findStartPhase(
                     cacheProvider.getCommonProperties(automationComposition.getInstanceId(), acElement.getId()));
             if (startPhaseMsg.equals(startPhase)) {
+                acElement.setLockState(LockState.UNLOCKING);
                 listener.unlock(messageId, automationComposition.getInstanceId(), acElement.getId());
             }
         }
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java
index 8d906c0..6b025c7 100755
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ParticipantHandler.java
@@ -29,7 +29,6 @@
 import org.onap.policy.clamp.acm.participant.intermediary.comm.ParticipantMessagePublisher;
 import org.onap.policy.clamp.models.acm.concepts.AcTypeState;
 import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionElementDefinition;
-import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionInfo;
 import org.onap.policy.clamp.models.acm.concepts.ParticipantState;
 import org.onap.policy.clamp.models.acm.messages.dmaap.participant.AutomationCompositionDeploy;
 import org.onap.policy.clamp.models.acm.messages.dmaap.participant.AutomationCompositionStateChange;
@@ -236,24 +235,4 @@
 
         return heartbeat;
     }
-
-    /**
-     * get AutomationComposition Info List.
-     *
-     * @return list of AutomationCompositionInfo
-     */
-    private List<AutomationCompositionInfo> getAutomationCompositionInfoList() {
-        List<AutomationCompositionInfo> automationCompositionInfoList = new ArrayList<>();
-        for (var entry : cacheProvider.getAutomationCompositions().entrySet()) {
-            var acInfo = new AutomationCompositionInfo();
-            acInfo.setAutomationCompositionId(entry.getKey());
-            acInfo.setDeployState(entry.getValue().getDeployState());
-            acInfo.setLockState(entry.getValue().getLockState());
-            for (var element : entry.getValue().getElements().values()) {
-                acInfo.getElements().add(automationCompositionOutHandler.getAutomationCompositionElementInfo(element));
-            }
-            automationCompositionInfoList.add(acInfo);
-        }
-        return automationCompositionInfoList;
-    }
 }
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java
old mode 100644
new mode 100755
index 6509491..cb7e560
--- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java
+++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java
@@ -21,6 +21,7 @@
 package org.onap.policy.clamp.acm.participant.intermediary.handler;
 
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
@@ -37,6 +38,8 @@
 import org.onap.policy.clamp.models.acm.concepts.AcElementDeploy;
 import org.onap.policy.clamp.models.acm.concepts.AcTypeState;
 import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionElementDefinition;
+import org.onap.policy.clamp.models.acm.concepts.DeployState;
+import org.onap.policy.clamp.models.acm.concepts.LockState;
 import org.onap.policy.clamp.models.acm.concepts.ParticipantDeploy;
 import org.onap.policy.clamp.models.acm.messages.dmaap.participant.AutomationCompositionDeploy;
 import org.onap.policy.clamp.models.acm.messages.dmaap.participant.AutomationCompositionDeployAck;
@@ -87,6 +90,9 @@
         var ach = new AutomationCompositionHandler(cacheProvider, participantMessagePublisher, listener);
         ach.handleAutomationCompositionStateChange(automationCompositionStateChange);
         verify(listener, times(automationComposition.getElements().size())).undeploy(any(), any(), any());
+        for (var element: automationComposition.getElements().values()) {
+            assertEquals(DeployState.UNDEPLOYING, element.getDeployState());
+        }
     }
 
     @Test
@@ -104,6 +110,9 @@
         var ach = new AutomationCompositionHandler(cacheProvider, participantMessagePublisher, listener);
         ach.handleAutomationCompositionStateChange(automationCompositionStateChange);
         verify(listener, times(automationComposition.getElements().size())).lock(any(), any(), any());
+        for (var element: automationComposition.getElements().values()) {
+            assertEquals(LockState.LOCKING, element.getLockState());
+        }
     }
 
     @Test
@@ -121,6 +130,9 @@
         var ach = new AutomationCompositionHandler(cacheProvider, participantMessagePublisher, listener);
         ach.handleAutomationCompositionStateChange(automationCompositionStateChange);
         verify(listener, times(automationComposition.getElements().size())).unlock(any(), any(), any());
+        for (var element: automationComposition.getElements().values()) {
+            assertEquals(LockState.UNLOCKING, element.getLockState());
+        }
     }
 
     @Test
@@ -138,6 +150,9 @@
         var ach = new AutomationCompositionHandler(cacheProvider, participantMessagePublisher, listener);
         ach.handleAutomationCompositionStateChange(automationCompositionStateChange);
         verify(listener, times(automationComposition.getElements().size())).delete(any(), any(), any());
+        for (var element: automationComposition.getElements().values()) {
+            assertEquals(DeployState.DELETING, element.getDeployState());
+        }
     }
 
     @Test
