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

Top 5 Contributors of the Month
Post New Web Links

Want to Load and schedule a child activity from a database

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

View Complete Post

More Related Resource Links

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. 


huge number of data from database ... so how to minimize load time


Hi ...

I have used the above method to configure my crystal report ...

Its working fine , But i have huge number of data in database ....

So , it take long time to load the report ...

So , i have decided to show only the last 50 records inserted into the database , not all the 500 records to be loaded every time.

Plz help me with this issue  ...


Also , Plz explain me abt index legend in crystal report.

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

Retrieve the child ActivityContext from the Sequence activity

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?

How to schedule activity loaded from external source inside NativeActivity

I have a NativeActivity that takes an InArgument<int> that is the primary key of some table that contains a piece of xaml. When the activity runs, it loads the xaml from the database and uses ActivityXamlServices to turn the xaml into an activity. Then I try to schedule the activity using NativeActivityContext.ScheduleActivity. This fails with the message: The provided activity was not part of this workflow definition when its metadata was being processed.  The problematic activity named 'Sequence' was provided by the activity named 'RunWorkflowFromStore'. This makes sense because I never added the activity I'm trying to run to the metadata. However, when can I do that? It is only at runtime that I know the value of the primary for the xaml I'm trying to load. Or am I doing this the wrong way? Here is my code: public sealed class RunWorkflowFromStore : NativeActivity<ApprovalState> { private Activity _activity; public InArgument<int> WorkflowId { get; set; } protected override void CacheMetadata(NativeActivityMetadata metadata) { var workflowIdArgument = new RuntimeArgument("WorkflowId", typeof(int), ArgumentDirection.In); metadata.Bind(WorkflowId, workflowIdArgument); metadata.AddArgument(workflowIdArgument); } protected override void Execute(NativeActivityContext context) { // Load activity

SSIS FOR each loop to load 1 file after other into database for particaular folder

HI I am using ssis 2008,i have folder in which i have 10 excel file.i wont to load them one after other in data  base I have created a Dataflow task that load one file into database.i have inserted this dataflow task into For each loop and in For each loop i have give that folder path and *.XLSX  and in variable mapping i have created one variable  which i have passed in Database destination connecion string (properties->expression) but still i get error "cannot acquire connection from connection manager" please guide me or provide me with some reference so that i cud load file from folder into database one after other

ASP.NET: How to Load image and save to database form clientside

Hello, can any one help? I am using HTTPHandlers for loading the image from the database I need to change the image and save it back to the database from the client side, that is I need to browse image at client side and save the image as bytes in to databases, how to do this? Regards, satish  

Incremental data load from MySQL database to SQL server 2008 using SSIS


I am looking for best solution to perform incremental data load from MySQL database to SQL Server 2008.  I tried to follow instructions from articles on incremental data load in SSIS  using MD5 hashes but I failed to make connection in Lookup transformation editor between MySQL Id (4 byte unsigned integer) and Id in SQl Server 2008 table which is  bigint. i tried to add  data conversion and convert MySQl Id to string. It works fine when you map this field directly to OLEDB destination but in Lookup component it failed. 


Any input greatly appriciated.



load new page and populate the values without database



I'm creating a website of 5 pages using c# (asp.net).

How do i link 2 pages, ie., on click of a button on first page should take me to second page.

Advance thanks,


Load XAMLX from database


I've seen a few posts discussing this scenario, but I'm still struggling with what might be the best solution...


1. I've a rehosted designer to allow users to create XAMLX
2. These XAMLX are stored on a database
3. I now need to be able to expose these XAMLX in IIS to be consumed by clients
4. Clients will be able to compose the right addresses to reach these XAMLX. Examples: http://server/WFSite/V1/MyService.xamlx; http://server/WFSite/V2/MyService.xamlx; or similar for non-http protocols

My question is, what is the best solution to load and expose the xamlx services in IIS?

Possible solutions that I've found so far:

1. Use a ServiceHostFactory with a ServiceHost to load the XAMLX from the database
     Option 1:
          a. Requires an .svc file for each .xaml file stored in database. The .svc file is needed to specify the ServiceHostFactory for each XAMLX.
          b. Clients would reference the XAMLX by referencing the .svc endpoint address

Cannot load Access database from SharePoint into client access


I'm starting to think this is a bug but here's what happens...

We've just deployed Access Services and are testing it.  I've created a new database on my mysite and can edit it fine via the web interface.  However, if I click Options --> Open in Access, I'm presented with this error message:

"Microsoft Access could not open the Web Application from https://mysite.moss.domain.tld/personal/tim/projects.  Please verify that the server is available."

The server is definitely available.  I'm at a loss here.  I'm using Access 2010.

How to load "Database Instance" for "Database Trace Listener" at runtime



I have been searching for a while now without success. On how when using EntLib 5.0 Logging, Data; to be able to set the database (i.e. the connection string) at runtime for a Database Trace Listener. The reason being we will have the same configurations on all levels of the environments (dev, test, stage, prod), but the connection string is different for each and we do not store the connection string data in the config file. The connection string data is loaded using a custom configuration manager for security reasons.


Any help and any code sample much appreciated. 



User Not Found: Could not load profile data from the database



       i am trying to get the Department of a user , using the following code 

                objWeb = SPContext.Current.Web;

                strCurrentUser = objWeb.CurrentUser.Name;

                objList = objWeb.Lists["MyList"];

                SPSite _site = SPContext.Current.Site;


size of schedule database backup bigger than the manual backup


i've created a job to schedule backup everyday, here the script used:


NAME = N'ON_KEY_4-Full Database Backup', SKIP, NOREWIND, NOUNLOAD,  STATS = 10

this back up is too big about 120g but when i do manual backup the database is only 3g. i think the DB is not being overwritten but back up on top of each one.

how can i make to overwrite each time the script is executes.


thanks in advance

User not found. Could not load profile data from the database



We have our intranet on MOSS 2007. Some of the users (particularly those who have edited their account names in AD) are getting the above error when they try to 'Edit Details' from 'My Profile' in 'My Site'.

I am not sure how to resolve this issue. Can someone kindly help me please?



I need complete tutorial about MSSQL 2008 Database mirroring for load balancing


I need complete tutorial about MSSQL 2008 Database mirroring for load balancing

i want to load balance my SQL workload

all database insert update and delete queries will be mirrored

all select queries will be load balanced

sql servers will run at windows server 2008r2 at different computers (VPS)

Browser based Pokemon MMORPG Pokemon Craft Developer Used asp.net 4.0 routing at it's Pokedex

Database column in Activity Monitor is Blank


When we remotely manage a SQL 2008 instance the Database column in Activity Monitor is Blank, but when connected directly it shows up. We do have one user where the database column dose populate but he cannot remember if he did something to fix/enable it or not. These users are logging into this SQL server to get this info instead of managing remotely which I would like them to stop doing but I need to resolve this before they can since this info is critical.


I cannot imagine it is permission related since the column is blank for me as well and I have sysadmin rights over the instance.

Lossless Audio Addict
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