1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.workflows.type; 18 19import "google/protobuf/timestamp.proto"; 20 21option go_package = "cloud.google.com/go/workflows/type/typepb;typepb"; 22 23// Logged during the lifetime of Workflow Execution. 24message ExecutionsSystemLog { 25 // Possible states of the execution. There could be more states in the future. 26 enum State { 27 // Invalid state. 28 STATE_UNSPECIFIED = 0; 29 30 // The Workflow Execution is in progress. 31 ACTIVE = 1; 32 33 // The Workflow Execution has finished successfully. 34 SUCCEEDED = 2; 35 36 // The Workflow Execution failed with an error. 37 FAILED = 3; 38 39 // The Workflow Execution has been stopped intentionally. 40 CANCELLED = 4; 41 } 42 43 // Detailed information about the start of the execution. 44 message Start { 45 // The execution input argument. 46 string argument = 2; 47 } 48 49 // Detailed information about the successful finish of the execution. 50 message Success { 51 // The final result of the execution. 52 string result = 2; 53 } 54 55 // Detailed information about the execution failure. 56 message Failure { 57 // The exception message, e.g. "division by zero". The size limit is 1 kB. 58 string exception = 1; 59 60 // The code location of the statement that has created the log. For example, 61 // a log created in subworkflow 'Foo' in step 'bar' will have its source 62 // equal to 'Foo.bar'. The size limit is 1 kB. 63 string source = 2; 64 } 65 66 // Human readable contents of the log in English. The size limit is 5 kB. 67 string message = 1; 68 69 // The absolute point in time when the activity happened. 70 google.protobuf.Timestamp activity_time = 2; 71 72 // State of the execution when the log was created. 73 State state = 3; 74 75 // Detailed log information. 76 oneof details { 77 // Appears only in the log created when the execution has started. 78 Start start = 4; 79 80 // Appears only in the log created when the execution has finished 81 // successfully. 82 Success success = 5; 83 84 // Appears only in the log created when the execution has failed. 85 Failure failure = 6; 86 } 87} 88