private void WriteOutputParam(XmlWriter writer, ParamOutputModel param)
 {
     if (param.AsDataOutput)
     {
         writer.WriteStartElement("OutputValue");
         writer.WriteAttributeString("name", param.Name);
         writer.WriteAttributeString("dataValue", "true");
         writer.WriteEndElement();
     }
 }
        private List<ParameterModel> CopyParameters(List<ParameterModel> paramCollection, string parentName)
        {
            List<ParameterModel> parameters = new List<ParameterModel>();

            foreach (ParameterModel param in paramCollection)
            {
                ParameterModel clonedModel = null;

                if (param.IsInputParam)
                    clonedModel = new ParamInputModel() { IsMandatory = (param.isMandatory) };
                else
                    clonedModel = new ParamOutputModel();

                AssignParamValues(param, clonedModel, parentName);

                parameters.Add(clonedModel);
            }

            AssignSiblingsValue(parameters);

            return parameters;
        }
        public void TestFinalizeProduct()
        {
            ParamOutputModel outputParam1 = new ParamOutputModel()
            {
                Name = "SequenceList",
                DataType = "System.Collection.Generic.IList<Sequence>",
                AsDataOutput = true
            };

            Node1.OutboundParam.Add(outputParam1);

            workflowMang.AddActivities("start_0", StartNode);
            workflowMang.AddActivities("Item_1", Node1);
            workflowMang.AddActivities("Item_2", Node2);

            //double sequential activities 
            workflowMang.AddActivityLink("start_0", "Item_1");
            workflowMang.AddActivityLink("Item_1", "Item_2");

            string xmlContent = workflowMang.GetWorkflowXML();

            
            System.Diagnostics.Debug.WriteLine("Test highlighting output param as data product in trident");
            System.Diagnostics.Debug.WriteLine(xmlContent);

            workflowsvc.WorkflowServiceClient service = new workflowsvc.WorkflowServiceClient();
            //service.SaveANDExecuteWFAsync(xmlContent);
        }