com.fivefaces.cloud.workflow.awsonprem.impl.PassStateInvokerImpl Maven / Gradle / Ivy
package com.fivefaces.cloud.workflow.awsonprem.impl;
import com.amazonaws.services.stepfunctions.builder.states.PassState;
import com.fivefaces.cloud.workflow.awsonprem.PassStateInvoker;
import com.fivefaces.cloud.workflow.awsonprem.model.Execution;
import com.fivefaces.cloud.workflow.awsonprem.utils.JsonUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public class PassStateInvokerImpl implements PassStateInvoker {
private final JsonUtil jsonUtil;
@Override
public Object execute(PassState state, Execution execution) {
String resultJson = state.getResult();
if (resultJson == null) {
return null;
}
return jsonUtil.read(resultJson);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy