package cn.stylefeng.workflow.instance.core.actions.gateway;


import cn.stylefeng.workflow.api.entity.design.Node;
import cn.stylefeng.workflow.api.enums.NodeTypeEnum;
import cn.stylefeng.workflow.api.pojo.InstanceContext;
import cn.stylefeng.workflow.instance.api.node.NodeAction;
import cn.stylefeng.workflow.instance.api.pojo.NodeActionResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class EventGatewayNodeAction extends NodeAction {

    @Override
    public NodeTypeEnum getNodeType() {
        return NodeTypeEnum.EVENT_GATEWAY;
    }

    @Override
    public NodeActionResult doAction(Node nodeInfo, InstanceContext instanceContext) {

        return new NodeActionResult(null, null, instanceContext.getInstanceVariable());
    }

}
