Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardW98 authored and openshift-merge-robot committed Mar 29, 2023
1 parent f02bc72 commit 03a78a4
Show file tree
Hide file tree
Showing 21 changed files with 366 additions and 246 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* @author Richard Wang (Github: richardw98)
* @author Annel Ketcha (Github: anludke)
*/
public enum WorkStatus {
public enum ParodosWorkStatus {

FAILED, COMPLETED, PENDING
FAILED, COMPLETED, PENDING, IN_PROGRESS

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
*/
public enum WorkFlowTaskStatus {

FAILED, COMPLETED, IN_PROGRESS
FAILED, COMPLETED, IN_PROGRESS, PENDING

}
2 changes: 2 additions & 0 deletions workflow-service-sdk/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ components:
- FAILED
- COMPLETED
- IN_PROGRESS
- PENDING
type: string
type: object
WorkFlowDefinitionResponseDTO:
Expand Down Expand Up @@ -735,6 +736,7 @@ components:
- FAILED
- COMPLETED
- PENDING
- IN_PROGRESS
type: string
type:
enum:
Expand Down
1 change: 1 addition & 0 deletions workflow-service-sdk/docs/WorkFlowCheckerTaskRequestDTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Name | Value
FAILED | "FAILED"
COMPLETED | "COMPLETED"
IN_PROGRESS | "IN_PROGRESS"
PENDING | "PENDING"



1 change: 1 addition & 0 deletions workflow-service-sdk/docs/WorkStatusResponseDTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Name | Value
FAILED | "FAILED"
COMPLETED | "COMPLETED"
PENDING | "PENDING"
IN_PROGRESS | "IN_PROGRESS"



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public enum StatusEnum {

COMPLETED("COMPLETED"),

IN_PROGRESS("IN_PROGRESS");
IN_PROGRESS("IN_PROGRESS"),

PENDING("PENDING");

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public enum StatusEnum {

COMPLETED("COMPLETED"),

PENDING("PENDING");
PENDING("PENDING"),

IN_PROGRESS("IN_PROGRESS");

private String value;

Expand Down
4 changes: 2 additions & 2 deletions workflow-service/generated/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
"properties" : {
"status" : {
"type" : "string",
"enum" : [ "FAILED", "COMPLETED", "IN_PROGRESS" ]
"enum" : [ "FAILED", "COMPLETED", "IN_PROGRESS", "PENDING" ]
}
}
},
Expand Down Expand Up @@ -593,7 +593,7 @@
},
"status" : {
"type" : "string",
"enum" : [ "FAILED", "COMPLETED", "PENDING" ]
"enum" : [ "FAILED", "COMPLETED", "PENDING", "IN_PROGRESS" ]
},
"type" : {
"type" : "string",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2022 Red Hat Developer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.redhat.parodos.workflow.exceptions;

/**
* The WorkflowExecutionNotFoundException wraps unchecked standard Java exception and
* enriches them with a custom error code. You can use this exception when a Workflow
* Execution is not Found.
*
* @author Richard Wang (Github: richardW98)
*/

public class WorkflowExecutionNotFoundException extends RuntimeException {

private static final long serialVersionUID = 1L;

public WorkflowExecutionNotFoundException(String message) {
super(message);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2022 Red Hat Developer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.redhat.parodos.workflow.exceptions;

/**
* The WorkflowPersistenceFailedException wraps unchecked standard Java exception and
* enriches them with a custom error code. You can use this exception when a Database
* Operation is not Failed.
*
* @author Richard Wang (Github: richardW98)
*/

public class WorkflowPersistenceFailedException extends RuntimeException {

private static final long serialVersionUID = 1L;

public WorkflowPersistenceFailedException(String message) {
super(message);
}

}
Loading

0 comments on commit 03a78a4

Please sign in to comment.