public void TestSimpleExecution()
        {
            //string xmlContent = 
               // "<?xml version='1.0' encoding='utf-16'?>    <BioWFML>      <Workflow name='eLabDemoWorkflow-godbless' description='Auto generated wf'>        <BeginFlow>          <FlowElement level='0'>            <Sequential>              <Activity clsname='Microsoft.Research.ScientificWorkflow.Activities.WriteToConsole' id='WriteToConsole_0'>                <InputValue name='InputText' value='helloWorld' />              </Activity>            </Sequential>          </FlowElement>        </BeginFlow>      </Workflow>    </BioWFML>";

            workflowsvc.WorkflowServiceClient service = new workflowsvc.WorkflowServiceClient();
            //service.SaveANDExecuteWFAsync(xmlContent);
        }
        public void TestParseDoubleSequential()
        {
            workflowMang.AddActivities("start_0", StartNode);
            workflowMang.AddActivities("sequential_1", Node1);
            workflowMang.AddActivities("sequential_2", Node2);

            workflowMang.AddActivityLink("start_0", "sequential_1");
            workflowMang.AddActivityLink("sequential_1", "sequential_2");

            string xmlContent = workflowMang.GetWorkflowXML();

            workflowsvc.WorkflowServiceClient service = new workflowsvc.WorkflowServiceClient();
            //service.SaveANDExecuteWFAsync(xmlContent);
        }
        public void TestExecuteWorkflow()
        {
            string xmlContent =
                "<?xml version='1.0' encoding='utf-16'?> " +
                "    <BioWFML> " +
                "      <Workflow name='TestBioPatMLSample1' description='Auto generated wf'> " +
                "        <BeginFlow> " +
                "          <FlowElement level='0'> " +
                "            <Parallel> " +
                "              <Activity clsname='BioPatMLActivities.BioPatMLParser' id='BioPatMLParser_3'> " +
                "                <InputValue name='BioPatFilePath' value='D:\\TestData\\BioPatML\\Motif.xml' /> " +
                "              </Activity> " +
                "              <Activity clsname='MBF.Workflow.GenBankParserActivity' id='GenBankParserActivity_4'> " +
                "                <InputValue name='InputFile' value='D:\\TestData\\GenBank\\AE001582.gbk' /> " +
                "              </Activity> " +
                "            </Parallel> " +
                "          </FlowElement> " +
                "          <FlowElement level='1'> " +
                "            <Sequential> " +
                "              <Activity clsname='BioPatMLActivities.BioPatSeeker' id='BioPatSeeker_1'> " +
                "                <InputValue name='ListMBFSequence' linkFrom='GenBankParserActivity_4.SequenceList' /> " +
                "                <InputValue name='PatternModel' linkFrom='BioPatMLParser_3.PatternDefinition' /> " +
                "              </Activity> " +
                "            </Sequential> " +
                "          </FlowElement> " +
                "          <FlowElement level='2'> " +
                "            <Sequential> " +
                "              <Activity clsname='BioPatMLActivities.HitsViewer' id='HitsViewer_2'> " +
                "                <InputValue name='ListHits' linkFrom='BioPatSeeker_1.Hits' /> " +
                "                <InputValue name='Index' value='1' /> " +
                "                <OutputValue name='MatchDetails' dataValue='true' /> " +
                "              </Activity> " +
                "            </Sequential> " +
                "          </FlowElement> " +
                "       </BeginFlow> " +
                "      </Workflow> " +
                "    </BioWFML> ";

            workflowsvc.WorkflowServiceClient service = new workflowsvc.WorkflowServiceClient();
            //service.SaveANDExecuteWFAsync(xmlContent);
            
        }
        public void TestParseNestedParallels()
        {
            workflowMang.AddActivities("start_0", StartNode);
            workflowMang.AddActivities("Item_1", Node1);
            workflowMang.AddActivities("Item_2", Node2);
            workflowMang.AddActivities("Item_3", Node3);
            workflowMang.AddActivities("Item_4", Node4);
            workflowMang.AddActivities("Item_5", Node5);

            //First parallel
            workflowMang.AddActivityLink("start_0", "Item_1");
            workflowMang.AddActivityLink("start_0", "Item_2");
            //Nested Parallel
            workflowMang.AddActivityLink("Item_2", "Item_3");
            workflowMang.AddActivityLink("Item_2", "Item_4");

            workflowMang.AddActivityLink("Item_1", "Item_5");

            string xmlContent = workflowMang.GetWorkflowXML();
            // System.Diagnostics.Debug.WriteLine(xmlContent);
            workflowsvc.WorkflowServiceClient service = new workflowsvc.WorkflowServiceClient();
            //service.SaveANDExecuteWFAsync(xmlContent);
        }
        public void TestParseSequentialInParallel()
        {
            workflowMang.AddActivities("start_0", StartNode);
            workflowMang.AddActivities("sequential_1", Node1);
            workflowMang.AddActivities("sequential_2", Node2);

            workflowMang.AddActivityLink("start_0", "sequential_1");
            workflowMang.AddActivityLink("start_0", "sequential_2");

            string xmlContent = workflowMang.GetWorkflowXML();
            //System.Diagnostics.Debug.WriteLine(xmlContent);

            workflowsvc.WorkflowServiceClient service = new workflowsvc.WorkflowServiceClient();
            //service.SaveANDExecuteWFAsync(xmlContent);
        }
        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);
        }
        public void TestReadAdvParamBinderFrmXML()
        {
            ParamBinder binder = new ParamBinder("Node_1", "SequenceList");
            ParamInputModel inputParam1 = new ParamInputModel()
            {
                Name = "InputText",
                DataType = "System.String",
                Value = binder
            };

            Node2.InputParam.Add(inputParam1);

            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 Case - Adv linkage param value");
            System.Diagnostics.Debug.WriteLine(xmlContent);

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

        }
        public void TestReadBasicParamValuesFrmXML()
        {
            ParamInputModel inputParam1 = new ParamInputModel()
            {
                Name = "InputFile",
                DataType = "System.String",
                ValueStr = "C:\\TestDocument.txt"
            };

            ParamInputModel inputParam2 = new ParamInputModel()
            {
                Name = "InputText",
                DataType = "System.String",
                ValueStr = "HelloWorld"
            };

            Node1.InputParam.Add(inputParam1);
            Node2.InputParam.Add(inputParam2);

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

            //First parallel
            workflowMang.AddActivityLink("start_0", "Item_1");
            workflowMang.AddActivityLink("start_0", "Item_2");

            System.Diagnostics.Debug.WriteLine("Test Case - direct inputvalue for param");
            string xmlContent = workflowMang.GetWorkflowXML();
            System.Diagnostics.Debug.WriteLine(xmlContent);

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

        }