.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

The values provided for the root activity's arguments did not satisfy the root activity's requirem

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :Windows Application
I have flowchart as implementation  of activitybuilder and added two dynamicactivityproperty to it. The flowchart is having flowdecision and 3 other customized activities with same defined arguments. But when i invoke the workflow and pass dictionary, it gives the error: The values provided for the root activity's arguments did not satisfy the root activity's requirements: 'Sample Workflow': The following keys from the input dictionary do not map to arguments and must be removed: FolderName, FolderSize.  Please note that argument names are case sensitive. Parameter name: rootArgumentValues Flowchart       fc = new Flowchart();  protected override void OnInitialized(EventArgs e) { wd.Load(new ActivityBuilder { Implementation =  fc});             ModelTreeManager mtm = wd.Context.Services.GetService<ModelTreeManager>();             ModelItem ab = mtm.Root;             ModelItemCollection argsAndProperties = ab.Properties["Properties"].Collection;                     InArgument<string> foldername = new InArgument<string>();    &n

View Complete Post

More Related Resource Links

Failed to display the IActivityTemplateFactory designer as a root activity on the rehosted applicati


Hi guys,

I have created a custom composite activity that derived from the Activity and IActivityTemplateFactory. When I try to deploy this composite activity as a root activity on the rehosted application. It failed to display its designer probably. If I put a sequence as a root activity, and the composite activity as a child activity inside the sequence activity,  I got my composite activity designer display nicely on my rehosted designer. Is it a limitation for us to put a IActivityTemplateFactory designer as root activity in the rehosted app. Please advice.


public class CustomCompositeActivity : Activity, IActivityTemplateFactory
  public Activity Create(System.Windows.DependencyObject target)

    return new Sequence
       Activities = 
          new WriteLine
            Text = "Hello"
          new WriteLine
            Text = "WF 4.0"

Is there a plan to support a custom activity type as a root document in xaml on VS workflow designer



Referring to the post below. It seems that the current VS workflow designer only support "Activity" type as a root document. Is there a plan to support a custom activity type as a root document in xaml on next release of WF?




How do I get the root activity from WorkflowDesigner?


I am using the WorkflowDesigner to load and edit XAML workflows, as per this post. I now need to get the root activity from the designer and pass it into a WorkflowApplication so that I can execute the workflow (the reason that I cannot reload the workflow from XAML is because I am having to implement custom visual workflow tracking (see this post) and need make sure that the same activity instances are loaded into the WorkflowDesigner and the WorkflowApplication). I was originally getting the root activity using:


This was working fine until I tried loading a XAML workflow that had InArguments defined at the top level e.g.:

<Activity x:Class="..."...>

SSAS 2008 Dimension root values changes after incrementally loading the dimension with 'process_up

The Dimension root  members (below 'ALL') changes after incrementally loading the dimension with 'process_update'.  How do I prevent that from happening ? There was no changes to data of the underlying table of the dimension.   

Get Activity Arguments programmatically



I am wanting to execute any workflow dynamically. However when setting up the workflow schedule I need to be able to work out if there

are any arguments which the workflow activity is expecting. How via code and not within the designer can I work out what arguments the

activity is expecting?



Parsing Dynamic Activity Argument Default Values


Is it possibly to access the default value of a dynamic activity's argument through the API? I would like to do this outside of the scope of execution.

So far I've attempted to load the XAML as a DynamicActivity and access the individual DynamicActivityProperty types. In a DynamicActivityProperty, there is a Value property, but it returns a type of InArgument with actual type of the argument set as a generic. I would like to get the actual value of the InArgument, rather than InArgument<T>. I would assume this would be the actual default value of my argument.

The code I have so far looks something like this:

      System.Activities.Activity activity = null;
      DynamicActivity dynActivity = null;

      // Get bytes from string .xaml
      using (Stream stream = new MemoryStream(ASCIIEncoding.Default.GetBytes(xamlString)))
        activity = ActivityXamlServices.Load(stream);

      dynActivity = activity as DynamicActivity;

      // Iterate through workflow arguments
      foreach (Dy

Dynamically adding design time arguments to a custom native activity.


In my senario, the activity has a string[] which has an associated DialogPropertyValueEditor.  When entries are added or removed from this array, CacheMetadata() is called on the activity.  What I want to do from here is add or remove arguments for the activity based on the contents of this string[].  These arguments should then be controllable from the designer (ie, associate variables, or vb expressions) in either a rehosted, or native VisualStudio environment.  I'm having some trouble figuring this out.  With WF3 I used the WorkflowParameterBindingCollection.  Anyone tackled this already, or got an idea how it might be accomplished?

Debugging: Root Out Elusive Production Bugs with These Effective Techniques


Errors happen. But in production, error logs often provide little or no help in pinpointing the exact line of code in which the problem originates. You can't usually isolate the root cause by modifying code in a production environment because recreating the exact same environment is very difficult due to the large number of potential software and hardware configurations. This article provides some concrete steps you can take to get at the heart of the problems in your production code.

Matt Adamson

MSDN Magazine July 2005

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

Wrong root, absolute paths '~' don't work.


Hi guys,

I have some kind of strange problem. I use Visual Studio 2008 Standard Edition, and whenever I use ~ in links (like PostBackUrl = "~/Admin/AddProduct.aspx"),  ~ is translated into "C:\DocumentAndSettings\User\Desktop" instead of my application root. Of course I dont have any project on Desktop. It happens in every project I run , even in project from pendrive which works properly on other computers.

How can i solve this problem ? What and where should i change ? I will be very thankful for any help.


System.NullReferenceException: At Createtask Activity



I created  Approval Workflow application(.net3.0), it has successfully deployed at sharepoint server, but when executing  workflow at createTask activity, the following errror has occured.

System.NullReferenceException: Object reference not set to an instance of an object.     at BasicApprovalWorkflow.Workflow2.createApprovalTask_MethodInvoking(Object sender, EventArgs e)

below is the code :



void createApprovalTask_MethodInvoking(object sender, EventArgs e)



How to Cancel a Workflow Activity - LogToHistoryListActivity


How can I cancel a LogToHistoryListActivity? I don't understand how to get access to the ActivityExecutionContext. I guess one way is to add an IfElse before entry to avoid the activity completely. Casting the sender object does not work. Help anyone?

  private void logToHistoryListActivity_WorkflowActivated_MethodInvoking(object sender, EventArgs e)
   LogToHistoryListActivity log = (LogToHistoryListActivity)sender;
   string msg = string.Format("Work Request has been SAVED by {0}. Awaiting submittal.", workflowProperties.Originator);
   WFHelper.LogMessageToHistoryList(log, msg, null);

XmlSerializer - how to define class to not generate attributes in root element?

Hi! I have simple class that I serialize to xml file: <?xml version="1.0" encoding="utf-8"?> <MyRootElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Area="East">   <Products>     <SalesProduct Taxable="true">       <Name>Sofa</Name>     </SalesProduct>     <Product>       <Name>Television</Name>     </Product>   </Products> </MyRootElement> I don`t want have in xml file attributes xmlns:xsi and xmlns:xsd. How can I define class to not have these two attributes in xml file? I tried use XmlRoot attribute but there is no control for these two attributes. They are always generated. Regards

C# - Creating web client for automating user activity on a HTTPS site

I've been wracking my brain for a couple of weeks on this.  I need to create a web client (I don't want to use the webBrowser control because I need this to be as lightweight as possible) to log in to a secure web site, and then effectively click links and fill in fields to get the data that would normally be displayed in the web browser.  I'm then going to parse the data and perform other actions with it. I have been working with HttpWebRequest and HttpWebResponse and many permutations of suggestions I have found while Googling my issue, but I can't get rid of my problem:  Sometimes when I effictively click the ultimate link that I need to click to get to my data, I get what I am looking for.  However, MOST of the timel, I get a response page that tells me my connection timed out and that I need to log in again.  I have tried messing with cookies and such, but to no avail. I know it's good form to post my code, but it is so sloppy and screwed up right now from tweaking this and trying that, that I'd rather not take the approach of fixing what's there, rather I'd like to start with solid, clean code to begin with. Your help will be greatly appreciated. Thanks, ALo

SQL Server 2008 - Job Activity Monitor Failing

I recently began migrating to Windows 2008. One of the first servers is a server which we install our tools on. This is a new server which currently is only running the SQL Server management tools. On this server I installed the SQL Server 2008 R2 management tools, prior to this install there were no other SQL Server tools installed on this server. The majority of the functionality works and I can connect and manage multiple databases servers from SQL Server version 2000 through 2008. But when I try to bring up the Job Activity monitor I get an error ==> Can not show requested dialog. From Windows XP Windows Server 2003 SP2 this functionality works. I get this error if I connect to a SQL Server 2005 or 2008 database instance. I have tried re-installing the client tools but I still get this error..... any ideas?

Is all this activity wasted

I support a third party application that is absolutely terrible.  Most of the bad I understand, but my SQL Profiler comes back with these types of entries RPC:Starting declare @p1 int set @p1=-1 exec sp_prepare @p1 output,NULL,N'SELECT * FROM Payments',1 select @p1 SP:Statement complete SELECT * FROM Payments RPC:complete declare @p1 int set @p1=-1 exec sp_prepare @p1 output,NULL,N'SELECT * FROM Payments',1 select @p1 Even when their is an SP_sqlexecute, they don't pass the plan handle and the SQL is more select * from payments where customer = 111 What are they trying to do   Thanks for any replies   mark      

Add root xsi attributes to existing documents

I am looking for a way to perform a table update of an XML column containing strongly typed data. Recently, we modified our schema to include xmlns:xsi and xsi:schemaLocation. The thousands of documents already in the table, do not contain these new root element attributes, and I would like to add them. Sample old xml doc: <ROOT xmlns="http://www.xyz.com"><br/> <TAG>12345</TAG><br/> </ROOT>   Sample new xml doc: <ROOT xmlns="http://www.xyz.com"<br/> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br/> xsi:schemaLocation="http://www.xyzcom/schemas/A http://www.xyz.com/schemas/A/a.xsd"><br/> <TAG>12345</TAG><br/> </ROOT> Any thoughts or suggestions on how this might be accomplished?
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