|
| 1 | +/* |
| 2 | + * Copyright 2020-Present The Serverless Workflow Specification Authors |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | +package io.serverlessworkflow.impl.lifecycle; |
| 17 | + |
| 18 | +import io.serverlessworkflow.impl.LifecycleEvents; |
| 19 | + |
| 20 | +public enum EventType { |
| 21 | + TASK_STARTED(LifecycleEvents.TASK_STARTED), |
| 22 | + TASK_COMPLETED(LifecycleEvents.TASK_COMPLETED), |
| 23 | + TASK_SUSPENDED(LifecycleEvents.TASK_SUSPENDED), |
| 24 | + TASK_RESUMED(LifecycleEvents.TASK_RESUMED), |
| 25 | + TASK_FAULTED(LifecycleEvents.TASK_FAULTED), |
| 26 | + TASK_CANCELLED(LifecycleEvents.TASK_CANCELLED), |
| 27 | + TASK_RETRIED(LifecycleEvents.TASK_RETRIED), |
| 28 | + WORKFLOW_STARTED(LifecycleEvents.WORKFLOW_STARTED), |
| 29 | + WORKFLOW_COMPLETED(LifecycleEvents.WORKFLOW_COMPLETED), |
| 30 | + WORKFLOW_SUSPENDED(LifecycleEvents.WORKFLOW_SUSPENDED), |
| 31 | + WORKFLOW_RESUMED(LifecycleEvents.WORKFLOW_RESUMED), |
| 32 | + WORKFLOW_FAULTED(LifecycleEvents.WORKFLOW_FAULTED), |
| 33 | + WORKFLOW_CANCELLED(LifecycleEvents.WORKFLOW_CANCELLED), |
| 34 | + WORKFLOW_STATUS_CHANGED(LifecycleEvents.WORKFLOW_STATUS_CHANGED); |
| 35 | + |
| 36 | + private final String lifecycleId; |
| 37 | + |
| 38 | + @Override |
| 39 | + public String toString() { |
| 40 | + return this.lifecycleId; |
| 41 | + } |
| 42 | + |
| 43 | + EventType(String lifecycleId) { |
| 44 | + this.lifecycleId = lifecycleId; |
| 45 | + } |
| 46 | +} |
0 commit comments