Search in sources :

Example 1 with WorkflowExecutionConfigurationDialog

use of org.apache.hop.ui.workflow.dialog.WorkflowExecutionConfigurationDialog in project hop by apache.

the class HopGuiWorkflowRunDelegate method executeWorkflow.

public void executeWorkflow(IVariables variables, WorkflowMeta workflowMeta, String startActionName) throws HopException {
    if (workflowMeta == null) {
        return;
    }
    WorkflowExecutionConfiguration executionConfiguration = getWorkflowExecutionConfiguration();
    // Remember the variables set previously
    // 
    Map<String, String> variableMap = new HashMap<>();
    // the default
    variableMap.putAll(executionConfiguration.getVariablesMap());
    executionConfiguration.setVariablesMap(variableMap);
    executionConfiguration.getUsedVariables(workflowMeta, variables);
    executionConfiguration.setStartActionName(startActionName);
    executionConfiguration.setLogLevel(DefaultLogLevel.getLogLevel());
    WorkflowExecutionConfigurationDialog dialog = newWorkflowExecutionConfigurationDialog(executionConfiguration, workflowMeta);
    if (!workflowMeta.isShowDialog() || dialog.open()) {
        workflowGraph.workflowLogDelegate.addWorkflowLog();
        ExtensionPointHandler.callExtensionPoint(LogChannel.UI, workflowGraph.getVariables(), HopExtensionPoint.HopGuiWorkflowExecutionConfiguration.id, executionConfiguration);
        workflowGraph.start(executionConfiguration);
    }
}
Also used : HashMap(java.util.HashMap) WorkflowExecutionConfigurationDialog(org.apache.hop.ui.workflow.dialog.WorkflowExecutionConfigurationDialog) WorkflowExecutionConfiguration(org.apache.hop.workflow.WorkflowExecutionConfiguration)

Aggregations

HashMap (java.util.HashMap)1 WorkflowExecutionConfigurationDialog (org.apache.hop.ui.workflow.dialog.WorkflowExecutionConfigurationDialog)1 WorkflowExecutionConfiguration (org.apache.hop.workflow.WorkflowExecutionConfiguration)1