package com.cmvr.test.flow.runtime.dispatcher;

import com.cmvr.test.flow.runtime.message.TaskNodeExecuteMessage;
import com.cmvr.test.flow.runtime.message.TaskNodeExecuteResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component("BRANCH")
@RequiredArgsConstructor
public class FlowBranchNodeHandler implements FlowNodeTypeHandler {

    @Override
    public TaskNodeExecuteResult handle(TaskNodeExecuteMessage message) {
        return TaskNodeExecuteResult.success(message.getInputParams());
    }
}
