-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #346 from vmware/feature/340-canvas-item-default-e…
…rror-handler [vrotsc, vrotsc-annotations] (#339) Added a new canvas item for Default Error Handler
- Loading branch information
Showing
26 changed files
with
465 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
typescript/vrotsc/e2e/cases/canvas-items/default-error-handler-custom-item.wf.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Workflow, RootItem, In, Out, Item, DefaultErrorHandler, WorkflowEndItem } from "vrotsc-annotations"; | ||
|
||
@Workflow({ | ||
name: "Default Error Handler Custom Item", | ||
path: "VMware/PSCoE", | ||
description: "Default error handler workflow with error handler redirecting to a workflow item", | ||
attributes: { | ||
errorMessage: { | ||
type: "string" | ||
} | ||
} | ||
}) | ||
export class HandleDefaultError { | ||
|
||
@RootItem() | ||
public initiateWorkflow() { | ||
System.log("Initiating workflow execution"); | ||
} | ||
|
||
@Item({ | ||
target: "workflowEnd" | ||
}) | ||
public processError(@In errorMessage: string) { | ||
System.log(`Processing error using custom task with message '${errorMessage}'`); | ||
} | ||
|
||
@DefaultErrorHandler({ | ||
exceptionVariable: "errorMessage", | ||
target: "processError" | ||
}) | ||
public defaultErrorHandler(@Out errorMessage: string) { | ||
// NOOP | ||
} | ||
|
||
@WorkflowEndItem({ | ||
endMode: 0, | ||
exceptionVariable: "errorMessage", | ||
}) | ||
public workflowEnd(@Out errorMessage: string) { | ||
System.log(`Terminating workflow with error ${errorMessage}`); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
typescript/vrotsc/e2e/cases/canvas-items/default-error-handler-happy.wf.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Workflow, RootItem, DefaultErrorHandler } from "vrotsc-annotations"; | ||
|
||
@Workflow({ | ||
name: "Default Error Handler Happy", | ||
path: "VMware/PSCoE", | ||
description: "Default error handler workflow", | ||
attributes: { | ||
errorMessage: { | ||
type: "string" | ||
} | ||
} | ||
}) | ||
export class HandleDefaultError { | ||
|
||
@RootItem() | ||
public initiateWorkflow() { | ||
// NOOP | ||
} | ||
|
||
@DefaultErrorHandler({ | ||
exceptionVariable: "errorMessage", | ||
target: "end" | ||
}) | ||
public defaultErrorHandler() { | ||
// NOOP | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.