syntax = "proto3";
package conductor.proto;

import "model/workflowdef.proto";
import "model/task.proto";
import "google/protobuf/struct.proto";

option java_package = "com.netflix.conductor.proto";
option java_outer_classname = "WorkflowPb";
option go_package = "github.com/netflix/conductor/client/gogrpc/conductor/model";

message Workflow {
    enum WorkflowStatus {
        RUNNING = 0;
        COMPLETED = 1;
        FAILED = 2;
        TIMED_OUT = 3;
        TERMINATED = 4;
        PAUSED = 5;
    }
    Workflow.WorkflowStatus status = 1;
    int64 end_time = 2;
    string workflow_id = 3;
    string parent_workflow_id = 4;
    string parent_workflow_task_id = 5;
    repeated Task tasks = 6;
    map<string, google.protobuf.Value> input = 8;
    map<string, google.protobuf.Value> output = 9;
    string correlation_id = 12;
    string re_run_from_workflow_id = 13;
    string reason_for_incompletion = 14;
    string event = 16;
    map<string, string> task_to_domain = 17;
    repeated string failed_reference_task_names = 18;
    WorkflowDef workflow_definition = 19;
    string external_input_payload_storage_path = 20;
    string external_output_payload_storage_path = 21;
    int32 priority = 22;
    map<string, google.protobuf.Value> variables = 23;
    int64 last_retried_time = 24;
    repeated string failed_task_names = 25;
    repeated Workflow history = 26;
}
