package cn.stylefeng.workflow.instance.modular.task.strategy.sameneighbor;

import cn.stylefeng.workflow.api.entity.task.RuTask;
import cn.stylefeng.workflow.api.enums.TaskStatusEnum;
import cn.stylefeng.workflow.api.enums.strategy.AdjacentApproverSkipPolicyEnum;
import cn.stylefeng.workflow.instance.modular.task.strategy.sameneighbor.base.SameNeighborRule;
import org.springframework.stereotype.Component;

@Component
public class SameNeighborJumpRule extends SameNeighborRule {

    @Override
    public AdjacentApproverSkipPolicyEnum getStrategyType() {
        return AdjacentApproverSkipPolicyEnum.JUMP;
    }

    @Override
    public void processTask(RuTask originTask) {
        originTask.setTaskStatus(TaskStatusEnum.JUMPED.getCode());
    }

}
