public ActivityCodeDom Build(Activity activity)
 {
     var activityCodeDom = new ActivityCodeDom();
     activityCodeDom.ClassesToGenerate = new CodeNamespaceCollection();
     activityCodeDom.InvocationCode = this.GenerateCodeInvocation((WriteToLogActivity)activity);
     return activityCodeDom;
 }
Exemplo n.º 2
0
 public ActivityCodeDom Build(Activity activity)
 {
     var activityCodeDom = new ActivityCodeDom();
     activityCodeDom.ClassesToGenerate = this.GenerateActivityClasses(((GroupActivity)activity).Activities);
     activityCodeDom.InvocationCode = this.InvocationMethod(activity);
     return activityCodeDom;
 }
Exemplo n.º 3
0
 public ActivityCodeDom Build(Activity activity)
 {
     var activityCodeDom = new ActivityCodeDom();
     activityCodeDom.ClassesToGenerate = new CodeNamespaceCollection();
     activityCodeDom.InvocationCode = this.DefaultInvocationMethod(activity);
     return activityCodeDom;
 }
Exemplo n.º 4
0
        public CodeStatementCollection DefaultInvocationMethod(Activity activity)
        {
            var invocationCodeCollection = new CodeStatementCollection();
            invocationCodeCollection.AddRange(DefaultActivityBuilder.LogActivity(activity));

            return invocationCodeCollection;
        }
        public ActivityCodeDom Build(Activity activity)
        {
            var activityCodeDom = new ActivityCodeDom();
            activityCodeDom.ClassesToGenerate = new CodeNamespaceCollection();

            var errorActivity = (GenerateErrorActivity)activity;
            activityCodeDom.InvocationCode = this.GenerateCodeInvocation(errorActivity);
            return activityCodeDom;
        }
Exemplo n.º 6
0
        public Activity Parse(XElement inputElement)
        {
            var activity = new Activity ();

            activity.Name = inputElement.Attribute ("name").Value;
            activity.Type = (ActivityType) inputElement.Element (XmlnsConstant.tibcoProcessNameSpace + "type").Value;

            return activity;
        }
        public ActivityCodeDom Build(Activity activity)
        {
            CallProcessActivity callProcessActivity = (CallProcessActivity)activity;

            var activityCodeDom = new ActivityCodeDom();
            activityCodeDom.ClassesToGenerate = new CodeNamespaceCollection();
            activityCodeDom.InvocationCode = this.GenerateCodeInvocation(callProcessActivity);
            return activityCodeDom;
        }
Exemplo n.º 8
0
 public CodeStatementCollection DefaultInvocationMethod(Activity activity)
 {
     var activityServiceReference = new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), VariableHelper.ToVariableName(activity.Name));
     var methodInvocation = new CodeMethodInvokeExpression(activityServiceReference, "Execute", new CodeExpression[] { });
     var invocationCodeCollection = new CodeStatementCollection();
     invocationCodeCollection.AddRange(LogActivity(activity));
     invocationCodeCollection.Add(methodInvocation);
     return invocationCodeCollection;
 }
Exemplo n.º 9
0
        public ActivityCodeDom Build(Activity activity)
        {
            JavaActivity javaActivity = (JavaActivity) activity;

            var result = new ActivityCodeDom();

            result.ClassesToGenerate = new CodeNamespaceCollection();
            result.InvocationCode = this.GenerateCodeInvocation (javaActivity);

            return result;
        }
Exemplo n.º 10
0
        public static CodeStatementCollection LogActivity(Activity activity)
        {
            var activityServiceReference = new CodeFieldReferenceExpression(new CodeThisReferenceExpression(), VariableHelper.ToVariableName("logger"));
            var methodInvocation = new CodeMethodInvokeExpression(
                activityServiceReference,
                "Info",
                new CodeExpression[]
                {
                    new CodePrimitiveExpression("Start Activity: " + activity.Name + " of type: " + activity.Type)
                });

            var logCallStatements = new CodeStatementCollection();
            logCallStatements.Add(methodInvocation);
            return logCallStatements;
        }
Exemplo n.º 11
0
        public CodeNamespaceCollection GenerateClassesToGenerate(EaiConverter.Model.Activity activity, Dictionary <string, string> variables)
        {
            var namespaces = new CodeNamespaceCollection();

            if (ConfigurationApp.GetProperty("IsSubscriberInterfaceAlreadyGenerated") != "true")
            {
                namespaces.AddRange(this.subscriberBuilder.GenerateClasses());
                ConfigurationApp.SaveProperty("IsSubscriberInterfaceAlreadyGenerated", "true");
            }

            if (ConfigurationApp.GetProperty("IsTimerSubscriberImplemAlreadyGenerated") != "true")
            {
                namespaces.Add(this.GenerateTimerSubscriberImplementation());
                ConfigurationApp.SaveProperty("IsTimerSubscriberImplemAlreadyGenerated", "true");
            }

            return(namespaces);
        }
Exemplo n.º 12
0
        private CodeStatementCollection InvocationMethod(Activity activity)
        {
            var invocationCodeCollection = new CodeStatementCollection();
            invocationCodeCollection.AddRange(DefaultActivityBuilder.LogActivity(activity));

            var groupActivity = (GroupActivity)activity;

            if (groupActivity.GroupType == GroupType.simpleGroup)
            {
                invocationCodeCollection.AddRange(this.GenerateCoreGroupMethod(groupActivity));
            }
            else
            {
                var forLoop = this.GenerateForLoop(groupActivity);
                invocationCodeCollection.Add(forLoop);
            }

            return invocationCodeCollection;
        }
Exemplo n.º 13
0
        public static CodeExpression[] GenerateParameters(List<string> existingParamaters, Activity activity)
        {
            var parameterLists = new List<CodeExpression> { };
            //Add existing Parameter
            if (existingParamaters != null)
            {
                foreach (var parameter in existingParamaters)
                {
                    parameterLists.Add(new CodeSnippetExpression(parameter));
                }
            }

            //Add Activity Paramters
            if (activity.Parameters != null)
            {
                foreach (var parameter in activity.Parameters)
                {
                    parameterLists.Add(new CodeSnippetExpression(parameter.Name));
                }
            }

            return parameterLists.ToArray();
        }
Exemplo n.º 14
0
 public static CodeExpression[] GenerateParameters(Activity activity)
 {
     return GenerateParameters(null, activity);
 }