RESOVLED - 507570: Provide hook for customizing workflow instance after
creation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=507570
diff --git a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/BasicWorkflowRunnerOperation.java b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/BasicWorkflowRunnerOperation.java
index 7d6c04c..23619a4 100644
--- a/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/BasicWorkflowRunnerOperation.java
+++ b/plugins/org.eclipse.sphinx.emf.mwe.dynamic/src/org/eclipse/sphinx/emf/mwe/dynamic/operations/BasicWorkflowRunnerOperation.java
@@ -12,6 +12,7 @@
  *     itemis - [463980] org.eclipse.sphinx.emf.mwe.dynamic.operations.BasicWorkflowRunnerOperation.run(IProgressMonitor) should not be final

  *     itemis - [503063] Provide launching support for Sphinx Workflows

  *     itemis - [506671] Add support for specifying and injecting user-defined arguments for workflows through workflow launch configurations

+ *     itemis - [507570] Provide hook for customizing workflow instance after creation

  *

  * </copyright>

  */

@@ -156,7 +157,7 @@
 			}

 

 			// Create workflow instance

-			final Workflow workflowInstance = workflowInstanceFactory.createWorkflowInstance(workflow);

+			final Workflow workflowInstance = createWorkflowInstance();

 			if (workflowInstance == null) {

 				return;

 			}

@@ -225,6 +226,10 @@
 		}

 	}

 

+	protected Workflow createWorkflowInstance() throws CoreException {

+		return workflowInstanceFactory.createWorkflowInstance(workflow);

+	}

+

 	protected IWorkflowContext createWorkflowContext(Object model, Map<String, Object> arguments, IProgressMonitor monitor) {

 		return new ModelWorkflowContext(model, arguments, monitor);

 	}