.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How do I process Child activities

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :WPF
Hi! I have built a for each loop to process to process two activities grouped in a sequence activity. When I step through this code and get to the executionContext.ExecuteActivity it recognizes the child sequence activity but I don't drop into it what have I missed? Thanks foreach (MissingResult MR in ChecklistResponse) { string NotamID = MR.NOTAMID.ToString(); string Acountbility = MR.AccountID.ToString(); // Build the Query URL SingleQueryURL = String.Format(SingleQueryBase, AIDAPAccount, AIDAPPassword, JournalType, Acountbility, NotamID); // Access the first Child Activity Activity a = this.EnabledActivities[0]; // Subscribe to the closed event a.Closed += ChildActivityCountinuation; // Execute the activity executionContext.ExecuteActivity(a); // Increment the Loop counter LoopCounter++; }

View Complete Post

More Related Resource Links

How to find child (model item) activities of a flow chart model item?

Hello,In an earlier post, I asked how to find the children of a given model item.  If the model item I'm working with is a FlowChart, then the strategies given in that earlier post don't work.  How can I, given a model item that contains a FlowChart activity, find the direct children of the model item?  I'm not particularly interested in the order in which the child will execute, I just want a list of all the immediate children. (I'm not interested in child activities nested within an activity that is a direct child of the FlowChart activitiy).Also, I would like to get the model item representing the child activities, rather than the activities directly themselves.  I think I could do something like this: Flowchart flowChart = _activeflowChartDesigner.ModelItem.GetCurrentValue() as Flowchart;            if (flowChart != null)            {                foreach (FlowNode node in flowChart.Nodes)                {                    FlowStep flowStep = node as FlowStep;    

Exposing InArguments to child activities

The Scenario:

I have a sequence activity B with InArgument X and I want  child activity Z to be able to use the data passed into InArgument X.

How do I do this?

My current attempt as been to take the value from InArgument X and Place it in a variable that is expected to be there. But I get an exception:

Activity '1: Sequence<String>' cannot access this variable because it is declared at the scope of activity '1: Sequence<String>'.  An activity can only access its own implementation variables.

Current code on my parent sequence where I try to take the value from Argument1 and place it in Variable1

protected override void Execute(NativeActivityContext context)


            var tempVars = _variables.Where(v => v.Name == "Variable1");

            if (tempVars.Count() == 1)


                Variable _inVariable1 = tempVars.First();

                _inVariable1.Set(context, Argument1.Get(context));



            foreach (Activity ac

Process.Start() Method : Dont want to close the Parent process without closing the Child


Hi there,

     I wanna call a child process to run from the parent process. In that case the parent process should not be accessible before closing the child. I nearly accomplished this stuff by using the following code.


ProcessStartInfo pStart = new ProcessStartInfo();
      pStart.FileName = @"D:\Child.exe";
      using (Process proc = Process.Start(pStart))


The above code works successfully but my problem is different. In my child application there are totally two exe's.

  1. Login.exe
  2. Child.exe

In child application generally we used to call the Login.exe to login then the Login.exe will automatically close and the Child.exe will open.

In my present scenario I have to cal the Child application from the Parent. If I used the above coding, the Login.exe is called successfully. But after logon the Login.exe will close and then Child.exe will run then the Parent.exe is available now.


So I need the Parent.exe remain unaccessible until the Child.exe is closed.



How to get tracking information from the child activities


Hi guys!

I have a WF4 service which is processing some requests. The service definition includes some basic activities like Receive and SendReply etc. and some activities which are exported from another project in the solution. Those activities are actually sequences of even more activities.

I have some tracking profiles which instruct the runtime to collect all possible information about instances' states and activities' states. BUT: when I execute my parent activity (WF service xamlx) I can see no tracking data about the child activities, just the points at which those activiries are invoked.

Here is how it looks:

  1. ActivityStateRecord - Root xamlx - SendReplyToReceive
  2. ActivityStateRecord - Root xamlx - Receive request and reply
  3. ActivityStateRecord - Root xamlx - Receive
  4. ActivityStateRecord - Referenced project (assembly) - Business Process <- here a child activity is invoked (nothing is visible inside it)

Is it possible to look inside those child activities?

Thank you.


GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

ASP.NET Architecture - ASP.NET Worker Process - HTTP Pipleline - Http Modules and Handlers

"ASP.NET is a powerful platform for building Web applications, that provides a tremendous amount of flexibility and power for building just about any kind of Web application. Most people are familiar only with the high level frameworks like WebForms and WebServices which sit at the very top level of the ASP.NET hierarchy. In this article I'll describe the lower level aspects of ASP.NET and explain how requests move from Web Server to the ASP.NET runtime and then through the ASP.NET Http Pipeline to process requests.

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Display column from child table. Possible ?



I'am using dnamic entity with EF4. On a list page of a table, I would like to display a column containing information from a child table of the current element. Sample :

Order List :

Order Data | Required Date | Shipped Date | etc... | ... | Customer Name (foreign key with tostring() method override) | Customer Postal Code (Column that I want to add) |

I don't known how to do that. Is it possible ? Maybe I have to to create my own Metadata proxy that will add dynamicly a column on the MetaColumn list of the table.

Does someone have an easier or better idea ?

Thank you for any help.

For Multi-Language website which process is better in asp.net


 I want to build multi-language website in asp.net 2008 and asp.net 2010. So, which process is better for building application? Using either Local and Global Resource or New Folder to make separate according to language?


Application performance should be good and also easy manageable.


Please suggest me in which way I will build the application either using resource or folder. If there is any other better solution then please share.

Display homepage node along with child nodes


If the first Sitemap node is your homepage/default and all other nodes are supposed to be children / grandchildren of the first sitemap node in a web.sitemap, how do I set up my web.sitemap to enable me to display my cssFriendlyMenu with the homepage node along with the nodes that are 1 level down from it at the same time as in :

Home   Products   Services   About us


...or is it not possible to have the first sitemap node displayed along with the nodes that are 1 level down from it?  Do I need to have a different starting node rather than my homepage node?

How to keep the hover for Parent menu and set the selected menu item css for child menu item?



I'm using cssfriendly control adapter for menu. My asp.net menu control's datasource is a sitemap file I'm using which contains all the urls.

I have the following questions:

  1. Is there a way to keep the parent menu item hovered while hovering over the respective child menu items?
  2. Is there a way to keep the child menu item selected? I am able to set the css for the parent menu, however I was wondering if the same is possible with the child items.

Please help! Smile


Moneka Smile

CLR Inside Out: In-Process Side-by-Side


The new .NET Framework 4.0 maintains backward compatibility while allowing core innovations by using a new feature called In-Process Side-by-Side. Learn about how it works and some problems it didn't solve.

Luiz Fernando Santos, Jesse Kaplan

MSDN Magazine December 2009

Team System: Streamline Team Projects With Process Templates


See how you can streamline your team projects using Process Templates in Visual Studio Team System (VSTS)

Brian A. Randell

MSDN Magazine December 2008

Security Briefs: Threat Models Improve Your Security Process


Using threat models to drive your security engineering process helps prioritize the code review, fuzz testing, and attack surface analysis tasks.

Michael Howard

MSDN Magazine November 2008

Foundations: Unit Testing Workflows And Activities


Matt Milner takes a look at some of the challenges and techniques related to testing Windows Workflow Foundation activities, workflows, and associated components.

Matt Milner

MSDN Magazine November 2008

Security Briefs: Reinvigorate your Threat Modeling Process


In this column the author outlines some approaches to threat modeling that can be employed by development teams of any size.

Adam Shostack

MSDN Magazine July 2008

CI Server: Redefine Your Build Process with Continuous Integration


Jay Flowers demonstrates how to set up and use a Continuous Integration server using both discrete tools and the more comprehensive CI Factory solution.

Jay Flowers

MSDN Magazine March 2008

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend