8000 Add Support for Custom Errors by mitchspano · Pull Request #40 · google/flow-lens · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Support for Custom Errors #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@goog/flow-lens",
"version": "0.1.5",
"version": "0.1.6",
"license": "Apache",
"exports": "./src/main/main.ts",
"imports": {
Expand Down
13 changes: 12 additions & 1 deletion src/main/flow_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export interface ParsedFlow {
apexPluginCalls?: flowTypes.FlowApexPluginCall[];
assignments?: flowTypes.FlowAssignment[];
collectionProcessors?: flowTypes.FlowCollectionProcessor[];
customErrors?: flowTypes.FlowCustomError[];
decisions?: flowTypes.FlowDecision[];
loops?: flowTypes.FlowLoop[];
orchestratedStages?: flowTypes.FlowOrchestratedStage[];
Expand Down Expand Up @@ -138,6 +139,7 @@ export class FlowParser {
this.beingParsed.collectionProcessors = ensureArray(
flow.collectionProcessors
);
this.beingParsed.customErrors = ensureArray(flow.customErrors);
this.beingParsed.decisions = ensureArray(flow.decisions);
setDecisionRules(this.beingParsed.decisions);
this.beingParsed.loops = ensureArray(flow.loops);
Expand Down Expand Up @@ -174,6 +176,7 @@ export class FlowParser {
this.beingParsed.apexPluginCalls,
this.beingParsed.assignments,
this.beingParsed.collectionProcessors,
this.beingParsed.customErrors,
this.beingParsed.decisions,
this.beingParsed.loops,
this.beingParsed.orchestratedStages,
Expand Down Expand Up @@ -275,7 +278,8 @@ export class FlowParser {
isScreen(node) ||
isSubflow(node) ||
isTransform(node) ||
isRecordRollback(node)
isRecordRollback(node) ||
isCustomError(node)
) {
transitions.push(...this.getTransitionsFromConnector(node));
}
Expand Down Expand Up @@ -391,6 +395,7 @@ export class FlowParser {
| flowTypes.FlowSubflow
| flowTypes.FlowRecordRollback
| flowTypes.FlowTransform
| flowTypes.FlowCustomError
): Transition[] {
const result: Transition[] = [];
if (node.connector) {
Expand Down Expand Up @@ -618,3 +623,9 @@ function isFlowActionCall(
): node is flowTypes.FlowActionCall {
return (node as flowTypes.FlowActionCall).actionName !== undefined;
}

function isCustomError(
node: flowTypes.FlowNode
): node is flowTypes.FlowCustomError {
return (node as flowTypes.FlowCustomError).customErrorMessages !== undefined;
}
Loading
0