Skip to content

propagating translation failure #53

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

Draft
wants to merge 2 commits into
base: freshservice_staging
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ public void validateWorkflowDef(WorkflowDef workflowDef) {
*/
public void updateWorkflowDefs(List<WorkflowDef> workflowDefs) {
Validate.notNull(workflowDefs, "Workflow defs list cannot be null");
put("metadata/workflow", null, workflowDefs);
try {
put("metadata/workflow", null, workflowDefs);
} catch (Exception e) {
throw new RuntimeException("Error while updating workflow definitions", e);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,17 @@ public void shutdown() {

public boolean registerWorkflow(WorkflowDef workflowDef, boolean overwrite) {
try {
LOGGER.info("^CONDUCTOR^: Starting workflow registration for: " + workflowDef.getName());
if (overwrite) {
metadataClient.updateWorkflowDefs(Arrays.asList(workflowDef));
} else {
metadataClient.registerWorkflowDef(workflowDef);
}
LOGGER.info("^CONDUCTOR^: Workflow registration successful for: " + workflowDef.getName());
return true;
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
LOGGER.error("^CONDUCTOR^: Workflow registration failed for: "
+ workflowDef.getName() + ", error: " + e.getMessage(), e);
return false;
}
}
Expand Down