this.inbound = context.getInboundPayload();
this.outbound = context.getOutboundPayload();
this.scope = job.getScope();
this.name = job.getName();
if (eventBroker == null) {
eventBroker = job.getEventBroker() == null ? new AdminCommandEventBrokerImpl() : job.getEventBroker();
}
((AdminCommandInstanceImpl) job).setEventBroker(eventBroker);
((AdminCommandInstanceImpl) job).setState(revert ? AdminCommandState.State.REVERTING : AdminCommandState.State.RUNNING_RETRYABLE);
JobManager jobManager = habitat.getService(JobManagerService.class);
jobManager.registerJob(job);