@Override public HandlerResult handle(ProcessState state, ProcessInstance process) { Instance instance = (Instance) state.getResource(); String chainProcess = null; boolean start = DataAccessor.fromMap(state.getData()).withScope(InstanceProcessOptions.class).withKey(InstanceProcessOptions.START).withDefault(false) .as(Boolean.class); if (start) { chainProcess = InstanceConstants.PROCESS_START; } else if (Boolean.TRUE.equals(state.getData().get(InstanceConstants.REMOVE_OPTION)) || InstanceConstants.ON_STOP_REMOVE.equals(instance.getInstanceTriggeredStop())) { chainProcess = objectProcessManager.getStandardProcessName(StandardProcess.REMOVE, instance); } return new HandlerResult().withChainProcessName(chainProcess); }
setHostname(from.getHostname()); setZoneId(from.getZoneId()); setInstanceTriggeredStop(from.getInstanceTriggeredStop()); setAgentId(from.getAgentId()); setDomain(from.getDomain());