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

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

Exposing InArguments to child activities

Posted By:      Posted Date: October 02, 2010    Points: 0   Category :Windows Application
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

View Complete Post

More Related Resource Links

How do I process Child activities

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++; }

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;    

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.

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.

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

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

Windows Workflow: Build Custom Activities To Extend The Reach Of Your Workflows


This article covers the core components required for building custom activities in Windows Workflow Foundation.

Matt Milner

MSDN Magazine December 2006

Cutting Edge: A Tour of Windows Workflow Activities


Windows Workflow Foundation supports virtually any scenario where human opera¬tors are involved. Learn how to use it to tame your workflows.

Dino Esposito

MSDN Magazine November 2006

way of calling "javascript function of parent window from child window."

The article way of calling "javascript function of parent window from child window." was added by raja.s on Sunday, June 06, 2010.

Hi,Here i am going to explain how to call the javascript function of a parent window from the child window(pop-Up).Some may know before reading this post.Parent Java Script Function:script language="Javascript" type="text/javascript">

How to get child Descendants by Xdocument

xml file:-

<name>Patrick Hines</name>
<name>Gretchen Rivas</name>

Linq to xml

var Root = from feed in feedhotel.Descendants( "contact")
                           select new xmlcontact()
                               datestart = feed.Element("name").Value,
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