All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fivefaces.cloud.workflow.awsonprem.impl.PassStateInvokerImpl Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
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