.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

Retrieve the child ActivityContext from the Sequence activity

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :Windows Application
Hi all, I create my own sequence activity, which will report to DB. I would like to retrieve OutArgument from nested activity, but here is my problem - to access OutArgument I need child context. I would like to avoid adding to the children code responsible for raport to DB. Is this scenario (retrieve the child ActivityContext from the Sequence activity or something else) possible?

View Complete Post

More Related Resource Links

Properties of a child activity are null when the activity executes

I have an activity library containing several activites; one of my activities, let's call it MainActivity, contains another one, InnerActivity. A code block in MainActivity sets some properties of InnerActivity, but then when InnerActivity is executed, these properties are null. Some of these properties being set are dependency properties, other are "plain" properties. I had done the same thing in another activity and had got no problems at all. Any hints why this is happening? Thanks, PaoloPaolo Tedesco - http://cern.ch/idm

Custom sequence activity deriving from System.Workflow.Activities.SequenceActivity

Hi, I try to create custom sequence activity. I found some sample (http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/f54e8eb2-29d9-46f6-ad96-766fe6fad333/). But this custom activity looks ugly (to separate nested activity using ellipses instead of arrows). My question is - how to create custom sequence activity, which will look like sequence activity. I also found this sample - <ContentPresenter x:Uid="ContentPresenter_1" Content="{Binding}" Style="{x:Static sacdt:DesignerStylesDictionary.SequenceStyle}"/> When I used this ContentPresenter my custom activity looks like System.Workflow.Activities.SequenceActivity, but I couldn't put on it another activity. I also created class, which derives from System.Workflow.Activities.SequenceActivity, but I couldn't see it in toolbox. My question is - how to create class, which derives from System.Workflow.Activities.SequenceActivity and is visible in toolbox or how to use ContentPresenter for sequence activity, which allows put on itself another activity.

Want to Load and schedule a child activity from a database

I've been looking at other threads for this answer and it does not seem to exist. The DynamicActivity created by ActivityXamlServices cannot be scheduled as a child of another Activity (for instance a NativeActivity) unless it is instantiated in the constructor, which precludes using an input argument as a database key. My conclusion is that the only pattern for storing XAML in a database is when the XAML contains the entire Workflow. This is not very useful if you want to dynamically select your Workflow based on some parameter that may be an input argument to the Workflow. For my application, this greatly limits the usefulness of WF 4.0. Does anyone have a solution to this problem?------------------------ Mark Northup

retrieve the previous activity in state machine


using VS2008, WWF 3.5, state machine workflow


I am supporting a project written sometime ago by a team no longer here... it uses the WCSFContrib from CodePlex that has had no discussion activity in a year.  At the heart this is a state machine workflow, so I suspect that anyone can point me in the right direction. 

I need to know the actual path taken by a user through the workflow so that I may transition to a previous activity.  How can I do this?

Need to schedule non-child activity


Hi all,

I have created a few custom activities, the root activity is a custom workflow (customized activity)  which contain 2 sections, the first section is a sequencing logic, the second section is a container for my user function activities (custom sequence also). The user functions only can be executed if there is invocation from the call activity.

The problem is the call activity need to schedule a user function activity which is not a direct child of my call activity, The scheduler is not allow me to do this. I am thinking to use a bookmark to implement this, but i have no idea how do it also. Or any other better ways to implement this feature

Please advice. 


Error when adding one instance of activity multiple time into Sequence activity



Hi all, 

I encounter this error when I tried to add same Writeline instance into two different Sequence activities as shown in the code below:


      ActivityBuilder ab = XamlServices.Load(ActivityXamlServices.CreateBuilderReader(new XamlXmlReader(new StringReader(_designer.Text)))) as ActivityBuilder;
      //inspecting ab ...
      Console.WriteLine("There are {0} arguments in the activity builder.", ab.Properties.Count);
      //ProcessActivity(ab.Implementation, "");
      //test code to add two same instances of activities in a sequence and execute them 
      if(ab.Implementation is Sequence)
        Sequence seq = ab.Implementation as Sequence;

How do I retrieve the baseaddress from within a hosted workflow activity?


I'm extending some activities on top of a product that heavily utilizes workflow.  The problem is that because of a bug, it doesn't send me back the endpoint address of my hosted activity.

Is there anyway to retrieve WorkflowServiceHost.BaseAddresses from within the activity so I can push it out to the client in an out-of-band mechanism?



ex-MSFT developer, now FIM/MIIS/ILM/WPF/Silverlight consultant | http://blog.aesthetixsoftware.com/

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.

How to retrieve data from SqlDataSource and pass to a variable?


Hi there,

I have a page in my website where there is very little code-behind. I only have two lines of code in Page_Load() and the rest of the code is declarative ASP.NET code. I have a FormView control which uses a SqlDataSource to get some order information. The SqlDataSource calls a stored procedure called usp_GetOrderDetails, here's the code for the SqlDataSource:

    <asp:SqlDataSource ID="sdsFormOrderDetails" runat="server" 
ConnectionString="<%$ ConnectionStrings:ForexDB %>"
ProviderName="<%$ ConnectionStrings:ForexDB.ProviderName %>"
SelectCommand="usp_GetOrderDetails" SelectCommandType="StoredProcedure"
UpdateCommand="usp_UpdateOrder" UpdateCommandType="StoredProcedure"
<asp:ControlParameter Name="orderId" ControlID="grdOrders" PropertyName="SelectedDataKey.Value" />
<asp:ControlParameter Name="orderId" ControlID="frmOrderDetails" PropertyName="SelectedValue" />

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

Win32 Resources: Using C++ to Programmatically Retrieve a Global Cursor's Shape and ID


Getting global cursor information is useful when developing software that drives or gathers information about other UI-based applications, including information about a remote machine. This article describes a way to programmatically identify the current cursor's ID and bitmap at any point in time. The first technique described is based on polling for information and shows how to get the handle of the current global cursor. This handle will then allow you to get information about the cursor. You can also monitor WinEvents for changes to the global cursor.

Dmitri Klementiev

MSDN Magazine October 2001

A Simple XML-driven Tool: Monitor Your Web Site's Activity with COM and Active Scripting


This article describes a simple Web site monitoring tool built with XML, JScript, Windows Script Host, and COM objects. Although it is not intended to replace complete Web site monitoring software products, it has many useful features that help to keep Web servers up and running. An XML configuration file specifies which Web sites to monitor and the actions to be taken if the site isn't functioning properly. In addition, the tool can be scheduled to run at any specified interval using the Windows Task Scheduler. Functions that probe the sites, log events, and send e-mail notifications are written in JScript.

Panos Kougiouris

MSDN Magazine July 2000

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