public <T> void afterCommand(Command<T> command) {
if (command instanceof DeployCmd) {
DeployCmd deployCmd = (DeployCmd) command;
registerProcessListeners();
} else if (command instanceof DeleteDeploymentCmd) {
DeleteDeploymentCmd deleteDeploymentCmd = (DeleteDeploymentCmd) command;
workflowDefByKey.flush();
}
}