Class<?> workflowInteface, WorkflowType workflowType) {
final Object instanceProxy = workflowImplementations.get(workflowImplementationType);
if (instanceProxy == null) {
throw new IllegalArgumentException("unknown workflowImplementationType: " + workflowImplementationType);
}
return new POJOWorkflowImplementationFactory() {
@Override
public Object newInstance(DecisionContext decisionContext) throws Exception {
WorkflowScope.setDecisionContext(decisionContext);
return instanceProxy;