package cn.stylefeng.workflow.instance.api.pojo;

import cn.stylefeng.workflow.api.entity.design.Node;
import cn.stylefeng.workflow.api.entity.instance.RuntimeNode;
import cn.stylefeng.workflow.api.pojo.InstanceVariable;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
public class NodeActionResult {

    private RuntimeNode currentRuntimeNode;

    private List<Node> nextNodeList;

    private InstanceVariable newInstanceVariable;

    private boolean changeInstancePath = false;

    private Long parentInstanceId;

    public NodeActionResult(RuntimeNode currentRuntimeNode, List<Node> nextNodeList, InstanceVariable newInstanceVariable) {
        this.currentRuntimeNode = currentRuntimeNode;
        this.nextNodeList = nextNodeList;
        this.newInstanceVariable = newInstanceVariable;
    }

    public NodeActionResult(InstanceVariable newInstanceVariable) {
        this.newInstanceVariable = newInstanceVariable;
    }

}
