public WorkflowReuseContextInstanceFactory(Class<? extends ContextInstance> cls){
this.cls = cls;
}
public ContextInstance getContextInstance(Context context, ContextInstanceContainer contextInstanceContainer, ProcessInstance processInstance) {
ContextInstance result = contextInstanceContainer.getContextInstance( context.getType(), context.getId() );
if (result != null) {
return result;
}
try {
AbstractContextInstance contextInstance = (AbstractContextInstance) cls.newInstance();