Skip to content

Commit

Permalink
Pipeline executor - can't select the pipeline name from a field #4495
Browse files Browse the repository at this point in the history
  • Loading branch information
nadment committed Nov 6, 2024
1 parent 8811c7d commit bfe1977
Showing 1 changed file with 30 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public class PipelineExecutorDialog extends BaseTransformDialog {

private PipelineMeta executorPipelineMeta = null;

protected boolean jobModified;

private Button wInheritAll;

private TableView wPipelineExecutorParameters;
Expand Down Expand Up @@ -151,7 +149,6 @@ public PipelineExecutorDialog(
PipelineMeta pipelineMeta) {
super(parent, variables, transformMeta, pipelineMeta);
pipelineExecutorMeta = transformMeta;
jobModified = false;
}

@Override
Expand Down Expand Up @@ -1230,30 +1227,37 @@ private void ok() {

transformName = wTransformName.getText(); // return value

if (Utils.isEmpty(wPath.getText())) {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setText(BaseMessages.getString(PKG, "PipelineExecutorDialog.FilenameMissing.Header"));
mb.setMessage(BaseMessages.getString(PKG, "PipelineExecutorDialog.FilenameMissing.Message"));
mb.open();
return;
}
if (isSelfReferencing()) {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setText(BaseMessages.getString(PKG, "PipelineExecutorDialog.SelfReference.Header"));
mb.setMessage(BaseMessages.getString(PKG, "PipelineExecutorDialog.SelfReference.Message"));
mb.open();
return;
}
// No check if the pipeline to be executed comes from the stream field.
if (!wbPipelineNameInField.getSelection()) {

try {
loadPipeline();
} catch (HopException e) {
new ErrorDialog(
shell,
BaseMessages.getString(PKG, "PipelineExecutorDialog.ErrorLoadingSpecifiedPipeline.Title"),
BaseMessages.getString(
PKG, "PipelineExecutorDialog.ErrorLoadingSpecifiedPipeline.Message"),
e);
if (Utils.isEmpty(wPath.getText())) {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setText(BaseMessages.getString(PKG, "PipelineExecutorDialog.FilenameMissing.Header"));
mb.setMessage(
BaseMessages.getString(PKG, "PipelineExecutorDialog.FilenameMissing.Message"));
mb.open();
return;
}

if (isSelfReferencing()) {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setText(BaseMessages.getString(PKG, "PipelineExecutorDialog.SelfReference.Header"));
mb.setMessage(BaseMessages.getString(PKG, "PipelineExecutorDialog.SelfReference.Message"));
mb.open();
return;
}

try {
loadPipeline();
} catch (HopException e) {
new ErrorDialog(
shell,
BaseMessages.getString(
PKG, "PipelineExecutorDialog.ErrorLoadingSpecifiedPipeline.Title"),
BaseMessages.getString(
PKG, "PipelineExecutorDialog.ErrorLoadingSpecifiedPipeline.Message"),
e);
}
}

pipelineExecutorMeta.setFilename(wPath.getText());
Expand Down

0 comments on commit bfe1977

Please sign in to comment.