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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

XAML Workflow Definition into SQL database

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :Windows Application
 

I have created a workflow using VS 2010 Beta2. Later I have created a table and stored the whole XAML workflow definition into database. My Idea is to invoke the worklfow using the ActivityXAMServices. But I am facing lot of issues. Please let me know wether we can invoke the workflow using the  ActivityXAMServices for the workflow created by VS 2010 beta 2? I am facing lot of issues about the local variales. 

 Please any one can let me know how can I invoke the workflow which is stored in database and later on invoke the workflow through the  ActivityXAMServices or any othre way is there?

Please go through the following code:

 

string deoXaml = utild.getWorkflowDefinition(workflowName);

 



View Complete Post


More Related Resource Links

Display XAML workflow image in browser and hightlight the current Activity

  
I have a requirement in project to display the XAML workflow in browser as image like the Visual studio designer displaying and it should Hightlight the current activity in workflow.  Please guide me on this.rajeevkalyan

Hosted Designer fails to load workflow xaml that has InArguments with default values (xaml saved by

  
I have hosted the designer in our app. Using the hosted designer, workflows are saved as xaml to a database. When an end user wishes to edit a workflow the xaml is downloaded to a file and loaded into the designer via the .xaml file. The user can also associate assemblies with the workflow and there is a mechanism which makes sure that these assemblies are loaded into the appdomain and available. The problem we are hitting occurs when the top level activity (Sequence) has InArgument with default value. I create a simple Sequence, add InArguments (type of Int32 and String)  and set some default values. I save the workflow xaml to the database and close down the designer. When I wish to edit the workflow and try to load I get the following errors Could not find member '{clr-namespace:}_e905.argument3'. Could not find member '{clr-namespace:}_e905.argument1'. suggesting that some assembly/namespace missing. Here is the xaml I try to load: <Activity mc:Ignorable="sap" x:Class="{x:Null}" this:_e905.argument3="99" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorl

Start workflow on database update

  
HiIs there a way to start a workflow when something in a database has changed (e.g. a row was added)? I am looking for something similar to a Receive activity, but which monitors parts of a database.Could that be achieved by having a "master" workflow that spins off sub-workflows?ThanksAlex

Input parameters from Workflow No-Code Or Xaml Only

  
I have many activities and a customized workflow Only Xaml and I can not pass a value to a property of a custom activity, following the example of Workflow1.xoml   <pre lang="x-xml"><SequentialWorkflowActivity x:Name="Workflow1" xmlns:ns0="clr-namespace:CustomActivities;Assembly=CustomActivities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/workflow"> <ns0:ReadLineActivity x:Name="readLineActivity1" InputText="" /> <ns0:WriteLineActivity x:Name="writeLineActivity1" OutputText="{ActivityBind readLineActivity1,Path=InputText}" /> </SequentialWorkflowActivity> based on this workflow I pass a value for the property InputText activity readLineActivity1   Thanks a lot!

Windows Workflow Persistence Service using Oracle Database

  

Hi,

We are using windows state machine workflow. We need to use Oracle for persisteing and tracking workflow instances. Can anyone provide custom services for Oracle?

We have even tried WFTools but not able to connect to Oracle database. Please provide the same code if anyone has tried.

 

 

 

 


Unhandled exception in XAML editor from control that accesses database. - "System.Data.SqlServerCe.S

  

Hello,

Im having a bit of difficulty with some WPF/C#/SQL Server CE code.

I have a WPF User Control with the following line of code in the constructor:

MyDatabase database = new
 MyDatabase("Data Source=|DataDirectory|\\MyDatabase.sdf"
 );

where MyDatabase is a class generated using SQLMetal.exe from MyDatabase.sdf.

 

When I added this control to other controls, the application runs fine and I'm able to access my database. When I try to edit these parent controls,  the XAML editor throws the following error:

 

>System.Data.SqlServerCe.SqlCeException
>The database file cannot be found. Check the path to the database. [ Data Source = D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MyDatabase.sdf ]

 

Why does the XAML editor redirect my DataDirectory to "D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\" and why does the XAML editor execute my database access code?

 

How can I fix this so I can use this control in a XAML editor?

Thanks,

Greg S.

 


Unhandled exception in XAML editor from control that accesses database. - "System.Data.SqlServerCe.S

  

Hello,

Im having a bit of difficulty with some WPF/C#/SQL Server CE code.

I have a WPF User Control with the following line of code in the constructor:

MyDatabase database = new
 MyDatabase("Data Source=|DataDirectory|\\MyDatabase.sdf"
 );

where MyDatabase is a class generated using SQLMetal.exe from MyDatabase.sdf.

 

When I added this control to other controls, the application runs fine and I'm able to access my database. When I try to edit these parent controls,  the XAML editor throws the following error:

 

>System.Data.SqlServerCe.SqlCeException
>The database file cannot be found. Check the path to the database. [ Data Source = D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MyDatabase.sdf ]

 

Why does the XAML editor redirect my DataDirectory to "D:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\" and why does the XAML editor execute my database access code?

 

How can I fix this so I can use this control in a XAML editor?

Thanks,

Greg S.

 


Reuse XAML Declarative Workflow in Workflow Service (xamlx) Results in Server Error of System.Argume

  

We attempted to reuse a XAML (declarative activity workflow) in a few places within the same XAMLX and it doesn't appear to allow this.   On the WCF client side, it reported an obscure error of something to the effect of unknown message received and a communication error stating the service instance couldn't be used at this time and to ensure the call order is correct or order delivery guarantee is enabled.   However, this appears to mask the true issue which is on the server side.   Apparently, when the server side WCF end point is trying to start the workflow instance, it throws this error building a dictionary of workflow children...

System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Activities.Debugger.InstrumentationTracker.InitializeUninstrumentedSubRoots()
   at System.Activities.Debugger.DebugManager.EnsureInstrumented(Activity activity)
   at System.Activities.Debugger.DebugManager.OnEnterState(ActivityInstance instance)
   at System.Activities.Debugger.DebugController.ActivityStarted(ActivityInstance activityInstance)
  

Workflow instance id from wsHttpContextBinding vs database InstanceTable.Id

  

I'm working with SqlWorkflowInstanceStore and i'm using wshttpcontextbinding to get workflow instance id for corellation of workflow requests:

IContextManager oContextManager =

oProxy.InnerChannel.GetProperty<IContextManager>();

string oInstanceId = oContextManager.GetContext()["instanceId"];

but oInstanceId does not map to value of column "Id in System.Activities.DurableInstancing.InstanceTable. Can anyone tell me how to get row of InstanceTable using "instanceId" form IContextManager?


udione

Share point database and site collection size, and restrictions and workflow

  

Sharepoint site collections

 

More Detail

 

 

We had a 3rd party into to develop the share-point service, This is really a very difficult situation not the solution but the documents that are stored and the way it was retrieved.

 

The real thing is that we receive an item it is booked into SAP and then we send an automated xml to set up a local site this site will then have details from the SAP system fed by ABAP. After the site is created, and then we add documents files and .jpg. These documents must show a detailed audit trail so that if challenged in a court of law can show who had access and who updated documents. 

 

SO the problem is 

 

1 Site Collection that is 170gig and the design means that we have 1600 sites and these contain images that are stored in the single site collection. How do we remove the full documents and images and replace with links rather than the doc, img. 

 

2. We have around 8 business units the problem is that they can share information acros

Differences between SQL Server database definition and dynamyc data .edmx model

  

I am trying to customize a ForeignKey_Edit under a different name but I am having a problem with this: If I am listing one of the entities I have 4 columns that appear as links. My guess is that they are the Foreign Keys because they are the same fields listed as DropDownLists on top of the page.

One of this fields is the one I am trying to customize but if I use the UIHint attribute or property I got an error message saying that the columns can't be used as a Foreign Key because it isn't  a Foreign Key, but it is.

I have checked the database definition and in it the column appears as Foreign Key but in the Dynamic Data .edmx model appears as a simple field because it doesn't show the small key on the left icon. Only primary keys have the key.

Is this a bug or am I going the wrong direction?

 


VIEW DEFINITION database permission

  

Am I looking at this wrong or is this how it is supposed to be?

Why is it that if I do

GRANT VIEW DEFINITION TO some_db_user

the properties window in Mgmt Studio for some_db_user doesn't show this in Securables? Don't you think this is confusing? If someone is not familiar with system views and doesn't know to a query like

select p.name, perm.*
from sys.database_permissions perm
join sys.database_principals p
on p.principal_id = perm.grantee_principal_id
where
perm.permission_name = 'VIEW DEFINITION'

 

then you would never know that some_be_user had this permission.


Cannot use an existing contract to design a xaml workflow

  

I am trying to use a contract first approach in designing Workflows but am facing problems. 

For Eg. If I have a Service Contract

[ServiceContract (Namespace="http://abc.com")]

    [ExceptionShielding("Test")]

    public interface IRegistry

    {

        [OperationContract]

        [FaultContract(typeof (CustomFault))]

        List<string> Update1(string projectToAdd);

 

        [OperationContract]

        List<string> Update2(string projectToAdd);

    }

I set the ServiceContract name as {http://abc.com/}IRegistry for the receive activity. But I was not able to make it hookup to the interface where I have a service attribute attached. 

How can I make sure that I implement the same interface when building a workflow in the designer. I was able to implement the same in a coded workflow though. Or even if I use a WorkFlowServiceHost I am able to attach service behaviors but am unable to do so without a WorkFlowServiceHost.

Bottom line is that is there any way we can use a Contract first approach for a XAML workflow and not a cod

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

  

Hi,

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?

http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/25b6669e-7e51-4d47-812e-684bdc0db37e

 

Thanks.


SQL Tracking Service XAML only (Type, Workflow and Activity db tables)

  

Ok, we've implemented workflow completely into our system now and I've starting to see the tracking database grow fairly quickly, which was expected

 

I am now working on a purge routine and or partitioning.

 

What I have noticed is that the Workflow and Type db tables will constantly grow no matter what.  They are not considered "partitioned" tables.

 

My main question is the architectural decision around this XAML only approach of tracking versus the code behind\beside approach.  I have a hypothesis I will present below.

 

In code behind\beside.

Steps

Programmatically editing a XAML workflow?

  

I want to be able to load a XAML workflow, programmatically edit the values of the InArguments of some of the activities, and then run the workflow. I can do steps 1 and 3 but can't figure out how to edit the InArguments.

Can anyone point me in the right direction? Thanks.


Multiple database support with Entity Framework

  
One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.
Categories: 
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