.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 set PrimitiveDataProperties Value in the Workflow DurableInstancing.Instances Table

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :Windows Application
Hi, I'm simply trying to persist my Variables (or designated Variables) from my Workflow and I came across this article (http://msdn.microsoft.com/en-us/library/ee960223.aspx) on how to read the Values from the PrimitiveDataProperties Column in the DurableInstancing.InstancesTable, but I can't seem to find any documenation on how to save the Variables to this Column.  I thought my Variables would automatically save into the PrimitiveDataProperties Column after persisting, but it does not. I only find articles about using Promotable Properties or Tracking Participants in order to get Data out of a Workflow Instance, but both require configuration and/or custom Views in the Persistence Database, etc.  I simply just want to have my Variables persisteced when I use the PersistActivity and  then be able to read them at a later time. Thanks Devaron Ruggiero

View Complete Post

More Related Resource Links

How to run multiple instances of workflow



I've created simple sequential workflow. It's only creates one task and is waiting in while loop until task is Approved. It works fine when I run only one instance of this workflow, but if I start another instance before first one is finished it gets stack and doesn't complete task an workflow stays in In Progress state forever.

SSRS2005: Is it safe to manually remove instances from the Keys table in the report server database?

I have a problem with redundant reporting services instances still hanging around in the initialization pane of the RS configuration wizard and I can't get rid of them. The problem arose when we had new webfarms and before I had removed all references to the old ones from the initialization screen, the old webfarms had been switched off, removed from the network and dismantled. Therefore when I try to 'de-initialize' them, I get an error stating that reporting services cannot connect to them and when I run reports, a fair few are trying to run on the old webfarms which no longer exist and are disappearing into the void. There's a table in the report server database called Keys whch contains details of these intances and i'm wondering if its safe to remove these via SQL commands without breaking reporting services on other machines.   As a side note: All this stems from the fact that when you uninstall Reporting Services, not all of the files / references are removed. So as a general word of warning, if you do an uninstall of RS2005, you'll need to make sure everything's gone before re-installing, throwing away old machines etc. These include folders in IIS and these old instances as mentioned above.  

Suspend / Resume Instances within Workflow Service Host (in Windows Service)

We are hosting WF 4 worklfow instances within a Windows Service that uses the Workflow Service host container.   On the Windows Service OnStart we start the workflow service host (w/ multiple WCF endpoints such as start workflow instance, cancel workflow instance, poll workflow instance status, etc.) and these endpoints create or work on one or more long running workflow instances.     My question is, if a user attempts to stop the Windows Service while workflow instance(s) are running, what is the best way to manage this scenario.   Our inclination is to persist these workflows (using sql persistence) and then on the next start of the Windows Service, resume these workflow instances and allow them to continue to completion.    In OnStart, we have a handle to the Workflow Service host.    How can we iterate through all the active workflow instances in OnStop and then in OnStart, resume these after the workflow service host is opened and running?   Are there are any methods of managing this scenario?    Thanks

Workflow: How best to continue workflow using the same list (table)?


Hi, been able to have good success in using a workflow on a list (table).  When the workflow is done it lists the task as COMPLETED.  All good, but what if I want to initiate another workflow after that one, using the same list and using the same row of data in the list.  So in otherwords more of the empty fields would be filled out.

Probably more than one way to skin this cat?  Can I kick off another (different) workflow on the same list task?

Other suggestions?

Thank you!


Reading Infopath Repeating Table data in .Net Workflow


Hello, i have an infopath for that has a repeating table on it that i am using for users to add comments. The table contains a couple of textboxes, one that automatically inserts the users name into it and the other for the user to enter their own comments. I want to be able to read the contents of the repeating table when a manual workflow is started against the form list in sharepoint so that i can email all the users who have left comments on the form.

I am struggling to find any info on reading repeating table data from an infopath form in a .net workflow. I have tried using an XPathNavigator to select the repeating table but it only displays the first comment in the table.

Can anyone provide any info on accomploshing this or point me to any articles that explain how to do this?

thanks a lot



Loading persisted workflow instances with WorkflowApplication


I understand I may be doing this wrong.  I read the topic at http://social.msdn.microsoft.com/Forums/en-CA/wfprerelease/thread/a11eb75d-65de-4787-9745-2fd634d0eee9 but I still don't get it, exactly.

I have an application that uses WorkflowApplications to handle the workflows.  I have a workflow that contains a one minute Delay activity.  When this activity is hit, the workflow Idles, persists (SqlWorkflowDataStore), and unloads.  This is all fine.  If the app runs for the minute, it will be resumed and will complete.

However, if I stop the app during the minute that it is delayed, and then start it up again at some point later, the workflows do not resume.  A little digging shows that WorkflowApplication does not resume automatically, and that I have to do that manually.  That's fine.  The problem is, I don't know how.

I see there is a WorkflowApplication.LoadRunnableInstance, and I see in the db that there are records in the RunnableInstancesTable table.  But when I call LRI, I get back this:

System.Runtime.DurableInstancing.InstancePersistenceCommandException was unhandled
  Message=In order to match and load a runnable instance in the store, the requesting InstanceOwner must have specified a workflow host type when it was created. To do so, add a key-value pair to the CreateWorkflowOwner

Caching data to share between workflow instances


I have a wf4 workflow that correlates an SMS message to an internal input channel. For part of the workflow I have a code activity that uses LINQ to SQL to load up a bunch of input channels (rows from a table) from a SQL db. For each workflow instance, the query is run each time against the db.

Is there a mechanism or model people use to cache this sort of stuff (table data) so that each workflow instance can use that instead of re-querying?

Create multiple workflow instances from within the workflow


I am creating workflow service that uses a pick activity with multiple pick branches having multiple ReceiveActivity instances, the first pick branch supports workflow initialization by using RecieveAndSendReply activity, CanCreateInstance property is set to 'true', while others use the initialized workflow (they have Receive activity only and CanCreateInstance property is set to false). Content-based correlation is used. The workflow is working without any problem.

But It does not work when I call the service operation of the first pick branch from one of other branches.  I want to create a new instances of the same worklow by calling the initilization branch. What is best way to accomplish this?


Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Insert value using Table Value Functions

a real gem in Sql Server 2008. mostly people still using Stored procedure may be they shifted to SQL Server but they are not using TVF right now.

Using jQuery to Filter Table Rows

The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

RadioButton Groups, Table Rows And NamingContainers in asp.net

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

RadioButton Groups, Table Rows And NamingContainers

(In which AJAX-enhanced CheckBoxes become more useful than RadioButtons but inheritance saves the day, and a simple RadioButton-derived control establishes the purpose of a control's naming container)

The RadioButtonList. Very handy for inviting users to select just one item from a list although because of the screen real estate it takes up, used less and less in favour of the DropDownList. In plain HTML, the browser knows to enforce the unique selected value amongst a list of radio buttons because they all have the same value for their name attributes.

Building a 3-Tier App with Silverlight 3, .NET RIA Services, and Azure Table Storage

Silverlight 3, .NET RIA Services, and Windows Azure Services Platform makes a 3-tier Cloud application easier to build: Silverlight 3 as presentation tier, .NET RIA services as the business logic and data access tier, and Windows Azure Table as the data storage tier. The sample application in this article demonstrates the architecture with a simple Survey application with all these technologies working together from Windows Azure.

Free Series of SharePoint Workflow How-to Videos

This is the series of "How to" Document Workflow with SharePoint using Visual Studio 2008 (using the .NET Framework 3.0 for backward compatibility to Visual Studio 2005). I have created video's that show the most common requests that I have seen around MOSS/SharePoint 2007 workflow & document workflow.

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.
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