protected internal virtual IActivityBehavior CreateMuleActivityBehavior(TaskWithFieldExtensions task, IList <FieldExtension> fieldExtensions) { try { Type theClass = Type.GetType("Sys.Workflow.Mule.MuleSendActivitiBehavior"); IList <FieldDeclaration> fieldDeclarations = CreateFieldDeclarations(fieldExtensions); return((IActivityBehavior)ClassDelegate.DefaultInstantiateDelegate(theClass, fieldDeclarations)); } catch (Exception e) { throw new ActivitiException("Could not find Sys.Workflow.Mule.MuleSendActivitiBehavior: ", e); } }
protected internal virtual IActivityBehavior CreateCamelActivityBehavior(TaskWithFieldExtensions task, IList <FieldExtension> fieldExtensions) { try { Type theClass = null; FieldExtension behaviorExtension = null; foreach (FieldExtension fieldExtension in fieldExtensions) { if ("camelBehaviorClass".Equals(fieldExtension.FieldName) && !string.IsNullOrWhiteSpace(fieldExtension.StringValue)) { theClass = Type.GetType(fieldExtension.StringValue); behaviorExtension = fieldExtension; break; } } if (behaviorExtension != null) { fieldExtensions.Remove(behaviorExtension); } if (theClass == null) { // Default Camel behavior class theClass = Type.GetType("Sys.Workflow.Camel.Impl.CamelBehaviorDefaultImpl"); } IList <FieldDeclaration> fieldDeclarations = CreateFieldDeclarations(fieldExtensions); AddExceptionMapAsFieldDeclaration(fieldDeclarations, task.MapExceptions); return((IActivityBehavior)ClassDelegate.DefaultInstantiateDelegate(theClass, fieldDeclarations)); } catch (Exception e) { throw new ActivitiException("Could not find Sys.Workflow.Camel.CamelBehavior: ", e); } }
public virtual ShellActivityBehavior CreateShellActivityBehavior(ServiceTask serviceTask) { IList <FieldDeclaration> fieldDeclarations = CreateFieldDeclarations(serviceTask.FieldExtensions); return((ShellActivityBehavior)ClassDelegate.DefaultInstantiateDelegate(typeof(ShellActivityBehavior), fieldDeclarations)); }
protected internal virtual MailActivityBehavior CreateMailActivityBehavior(string taskId, IList <FieldExtension> fields) { IList <FieldDeclaration> fieldDeclarations = CreateFieldDeclarations(fields); return((MailActivityBehavior)ClassDelegate.DefaultInstantiateDelegate(typeof(MailActivityBehavior), fieldDeclarations)); }