001/** 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019package org.apache.oozie.client; 020 021import java.util.Date; 022 023/** 024 * Bean that represents a workflow action in a workflow job. 025 */ 026public interface WorkflowAction { 027 028 /** 029 * Defines the possible stati of a action. 030 */ 031 enum Status { 032 PREP, 033 RUNNING, 034 OK, 035 ERROR, 036 USER_RETRY, 037 START_RETRY, 038 START_MANUAL, 039 DONE, 040 END_RETRY, 041 END_MANUAL, 042 KILLED, 043 FAILED, } 044 045 /** 046 * Return the action action ID. 047 * 048 * @return the action action ID. 049 */ 050 String getId(); 051 052 /** 053 * Return the action name. 054 * 055 * @return the action name. 056 */ 057 String getName(); 058 059 /** 060 * Return the Credential. 061 * 062 * @return the Credential. 063 */ 064 String getCred(); 065 066 /** 067 * Return the action type. 068 * 069 * @return the action type. 070 */ 071 String getType(); 072 073 074 /** 075 * Return the action configuration. 076 * 077 * @return the action configuration. 078 */ 079 String getConf(); 080 081 /** 082 * Return the current status of the action action. 083 * 084 * @return the current status of the action action. 085 */ 086 Status getStatus(); 087 088 /** 089 * Return the number of retries of the action. 090 * 091 * @return the number of retries of the action. 092 */ 093 int getRetries(); 094 095 /** 096 * Return the number of user retry of the action. 097 * 098 * @return the number of user retry of the action. 099 */ 100 int getUserRetryCount(); 101 102 /** 103 * Return the max number of user retry of the action. 104 * 105 * @return the max number of user retry of the action. 106 */ 107 int getUserRetryMax(); 108 109 /** 110 * Return the interval of user retry of the action, in minutes. 111 * 112 * @return the interval of user retry of the action, in minutes. 113 */ 114 int getUserRetryInterval(); 115 116 /** 117 * Return the start time of the action action. 118 * 119 * @return the start time of the action action. 120 */ 121 Date getStartTime(); 122 123 /** 124 * Return the end time of the action action. 125 * 126 * @return the end time of the action action. 127 */ 128 Date getEndTime(); 129 130 /** 131 * Return the transition a action took. 132 * 133 * @return the transition a action took. 134 */ 135 String getTransition(); 136 137 /** 138 * Return the action data. 139 * 140 * @return the action data. 141 */ 142 String getData(); 143 144 /** 145 * Return the action statistics. 146 * 147 * @return the action statistics. 148 */ 149 String getStats(); 150 151 /** 152 * Return the external child IDs of the action. 153 * 154 * @return the external child IDs of the action. 155 */ 156 String getExternalChildIDs(); 157 158 /** 159 * Return the external ID of the action. 160 * 161 * @return the external ID of the action. 162 */ 163 String getExternalId(); 164 165 /** 166 * Return the external status of the action. 167 * 168 * @return the external status of the action. 169 */ 170 String getExternalStatus(); 171 172 /** 173 * Return the URL to programmatically track the status of the action. 174 * 175 * @return the URL to programmatically track the status of the action. 176 */ 177 String getTrackerUri(); 178 179 /** 180 * Return the URL to the web console of the system executing the action. 181 * 182 * @return the URL to the web console of the system executing the action. 183 */ 184 String getConsoleUrl(); 185 186 /** 187 * Return the error code of the action, if it ended in ERROR. 188 * 189 * @return the error code of the action. 190 */ 191 String getErrorCode(); 192 193 /** 194 * Return the error message of the action, if it ended in ERROR. 195 * 196 * @return the error message of the action. 197 */ 198 String getErrorMessage(); 199}