code: public <T> void transitionLock(String topologyId, boolean errorOnNoTransition, StatusType changeStatus, T... args)
              throws Exception {
          // get ZK's topology node's data, which is StormBase
          StormBase stormbase = data.getStormClusterState().storm_base(topologyId, null);
          if (stormbase == null) {
              LOG.error("Cannot apply event: changing status " + topologyId + " -> " + changeStatus.getStatus() +
                      ", cause: failed to get StormBase from ZK");
              return;
          }
  
          StormStatus currentStatus = stormbase.getStatus();
          if (currentStatus == null) {
              LOG.error("Cannot apply event: changing status " + topologyId + " -> " + changeStatus.getStatus() +
                      ", cause: topologyStatus is null in ZK");
              return;
          }
  
          // <currentStatus, Map<changingStatus, callback>>
          Map<StatusType, Map<StatusType, Callback>> callbackMap = stateTransitions(topologyId, currentStatus);
  
          // get current changingCallbacks
          Map<StatusType, Callback> changingCallbacks = callbackMap.get(currentStatus.getStatusType());
  
          if (changingCallbacks == null || !changingCallbacks.containsKey(changeStatus) ||
                  changingCallbacks.get(changeStatus) == null) {
              String msg = "No transition for event: changing status:" + changeStatus.getStatus() +
                      ", current status: " + currentStatus.getStatusType() + ", topology-id: " + topologyId;
              LOG.info(msg);
              if (errorOnNoTransition) {
                  throw new RuntimeException(msg);
              }
              return;
          }
  
          Callback callback = changingCallbacks.get(changeStatus);
  
          Object obj = callback.execute(args);
          if (obj != null && obj instanceof StormStatus) {
              StormStatus newStatus = (StormStatus) obj;
              // update status to ZK
              data.getStormClusterState().update_storm(topologyId, newStatus);
              LOG.info("Successfully updated " + topologyId + " to status " + newStatus);
          }
  
          LOG.info("Successfully apply event: changing status " + topologyId + " -> " + changeStatus.getStatus());
      }
docs: Changing status
  
  @param args -- will be used in the status changing callback