.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

Custom Workflow Activity Designer Serialization Issues

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :JQuery

I have an activity which has collection properties as below


    public sealed class TaskActivity : NativeActivity
        public TaskActivity()
            TaskParameters = new ObservableCollection<PMTaskParameter>();
            TaskExceptions = new ObservableCollection<Guid>();

View Complete Post

More Related Resource Links

the joy of writing a custom workflow activity for SharePoint Designer...


So, I need an activity that will replace some old text into new text in a given string.
Not present OOTB in SharePoint Designer, so - oh boy! oh boy! - we can develop it ourselves using Visual Studio!

Ok great, I did some reading about it on SP2007 in the past, but never needed it, so never actually tried it.
Now I'm on SP2010, so I googled again to find guides on how to write my very first custom workflow activity to use in SharePoint Designer 2010.
Nothing to be found.... The few posts about 2010 were only stating that it works still the same as in SP2007, and to look for guides on 2007.

Ok, so I googled some guides on how to do this in SP2007. I found one from MSDN, perfect to start with you'd say: http://msdn.microsoft.com/en-us/library/cc627284.aspx 
But really, it doesn't work the same... When I create an Activity Library project in VS2010, I don't have a class, like in the guide. All I have is a xaml file, no cs at all, and I have absolutely no clue what I should add in order to get the same class as in the guide. Adding a regular class is not it, since in the guide they're using a partial class. So I'm blocked 5secs after I started reading the guide... just great.

I'm so fed up with the lack of information on development for SharePoint. I hit

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 to display breakpoint and debug visual cues with custom activity designer based on WorkflowViewE

Hi,   I am developing custom activity designers based on "WorkflowViewElement" instead of "ActivityDesigner" in my xaml. It allows me to have greater control of the look and feel of the designer. However I noticed that with this approach, the breakpoint visual cue (Dark red solid circle that appears on the left side of the designer when you set breakpoint on the designer) is not visible. It works fine when you write your designed based on "ActivityDesigner". The same behavior happens to the debug visual cue when you debugging the WF. It appears as bright yellow rectangle surrounding the activity designer if you are based on "ActivityDesigner", but it is not available when your designer is based on"WorkflowViewElement". Any help is highly appreciated. Li

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.

Custom designer for a Flowchart activity?

Can anyone point me in the right direction for developing a custom designer for a Flowchart activity?  In actual fact, the Flowchart control we are using is a custom activity - it's not the regular .NET Flowchart activity, but our own creation with a collection for FlowNodes/etc.  We'd like to put a UI around it now as well ... mimicking the .NET Fllowchart designer.  Is that really possible, or extremely difficult?  It seems there's no real API or anything available for constructing the node connectors, arrows, etc.

Disable an activity in Designer at run time in workflow 4.0

There are couple of activities in my workflow & based on some condition, I need to make an activity disabled i.e. I don't want that activity to be seletable by the user. I am opening my workflow in designer at run time to give an overview of WF to the user. Something like  (new DesignerMetadata()).Register(); this.wd = new System.Activities.Presentation.WorkflowDesigner(); this.designerSection.Child = (this.wd.View); I was going thru the MS sample of CommentOut Activity but that won't solve my requirement as Activity needs to be disabled at run time based on some condition.

Custom Workflow Activity dependency property FieldNames

I have a custom actvity in VS2008. All is well until I added a new dependancy property like so: public static DependencyProperty EventLookupColumnNameProperty = DependencyProperty.Register("EventLookupColumnName",typeof(string),typeof(FTFSyncEventToAttachmentListItem)); public static DependencyProperty EventLookupColumnIDProperty = DependencyProperty.Register("EventLookupColumnID",typeof(string),typeof(FTFSyncEventToAttachmentListItem)); [Description("Event Lookup Column Name")][DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)][Browsable(true)][ValidationOption(ValidationOption.Required)]public string EventLookupColumnName{get { return ((string)(base.GetValue(EventLookupColumnNameProperty))); }set { base.SetValue(EventLookupColumnNameProperty, value); } [Description("Event Lookup Column ID")][ValidationOption(ValidationOption.Required)][Browsable(true)][DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]public int EventLookupColumnID{get { return ((int)(base.GetValue(EventLookupColumnIDProperty))); }set { base.SetValue(EventLookupColumnIDProperty, value); }}Then in the actions file:    <Action Name="FTF Sync Event To Attachment List Item"   ClassName="DP.Sharepoint.Workflow.FTFSyncEventToAttachmentListItem"   Assembly="DP.Sharepoint.Workflow, Version=, Cultur

Flowchart workflow, custom "FlowDecision" activity?

Dear all, in order to simplify the workflow "design" we would like to build our own activities that return a result with one or more nodes. Something like the "True/False" nodes that come out of the FlowDecision Activity. I know that one could normally add a FlowDecision activity after our custom activity and insert the condition expression to redirect the flow based on the result... however this requires the ability to know the "content" of the previous activity, and for some users we're targeting it's not immediate. Thank you!Adriano

SharePoint Designer Workflow to email multiple recipients listed in a custom list


Hi all,

I created a workflow in designer attached to a form library. I also have a custom list "Admins" containing names of persons that serves a different purpose but would also like to be used as recipients for the workflow email everytime a new item in the form library is created.

I have been searching the net and tried out few work arounds but so far able to send to only one person in the "Admins" list. The list has a column "Admin Name" which is of type "Person or Group".

Thanks in advance!

Custom Task form of a SharePoint Designer workflow is not displaying correctly


We have created a custom workflow using SharePoint Designer. We are using one action “Collect Data from a User”. As you know, this action sends an email to a user with a link to a task form where user is supposed to accept or reject a request. We are encountering following issues with this form:

  1. Form is not a workflow form, it is a task item of the task list that the “Collect Data from a User” action of the workflow creates.
  2. Form opens as an item of the workflow task list in View mode (DispForm.ASPX) instead of Edit mode (EditForm. ASPX)
  3. When user clicks on “Edit Item” button, it displays all the fields of the task as editable – we want only the Approve/Reject option buttons and the comments TextBox (that we created during the workflow design) to be displayed as editable

Can someone please explain what is going on and how can we resolve the above issues?

How to update workflow status in a custom workflow using SharePoint Designer


We have created a two-level custom workflow using SPD as follows:

Submitter submits request form in a form libraryàApprover A approves/rejectsàApprover B approves/rejectsàSubmitter receives an email and workflow stops

Exception: If Approver A rejectsàsubmitter receives email and workflow stops

Question: Users may have noticed that the default view of the form library has a column with the same name as the workflow. Let us call our workflow as “WF1” So the default view of the form library would show a column named WF1. When yo

Does Useful Sharepoint Designer Custom Workflow Activities work across servers - pls HELP


Not usre if this is the right place to post this but sure many guys must have used this
I have a siteA at



and Site B at



when i try and use the
Copy List Item Extended Activity to copy the list items across i keep getting error:

System.IO.FileNotFoundException: The Web application at http://myserverA/sites/pop/lists/mylistname could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

My AAM looks like this:

Internal URL                  Zone        Plublic URL for Zone

http://myserverA:8080    Default     http://myserverA:8080

http://myserverA.domainname:8080  Default  http://myserverA.domainname:8080

http://myserverA.domainname:2020 Default     http://myserverA.domainname:2020  -- this is been extended for FBA

Any ideas what i ne

Custom Workflow Activity Works 'Manually' but can't be fired using CodePlex's 'Start Another Wo


Consider 2 lists.  In one list, a workflow runs on an item and if conditions are right, it creates an item in another list, pauses for 5 min, then starts another workflow on that newly created list item (using CodePlex's old 'Start Another Workflow' routine).

All of that works great, used it many times in many situations without fail, so long as I put a pause between the item creation and calling the workflow on the newly created item.

I've started writing my own custom workflow activities, all of them work just fine, up to 5 now, really useful to do little things that SPD Workflow can't do by itself.  The 5th one I added was a very simple 'Now' routine.  The class itself is called 'GetNow' and has a 'RightNow' property that's DateTime and it works great.  I have the need to stamp something with the current date/time, and I haven't modified the underlying record yet, and setting a Date/Time variable only takes Today or a static date/time, with 'Today' returning the current date, but '12 am', which is redunculous, but I digress.

So my step compiles, updated my .ACTIONS file which holds the definition for the other 4 custom routines.  I have the context 'in' parameter and one 'out' parameter for 'RightNow' defined as System.DateTime (which I think is where the problem is, possibly), and it all works if I

Error: Workflow Custom Activity



I have a custom activity, which is available under Designer Actions.
I can see and set parameters. However on the Finish step, I encounter following error:

Errors were found when compiling the workflow. The workflow files were saved but cannot be run.

On clicking Advanced, I get this:
(14, 47) The type name 'SendMailWithAttachmentActivity' does not exist in the type 'SendMailWithAttachmentActivity.SendMailWithAttachmentActivity')

Here is Action tag:

   <Action Name="Send Attachments"
      Assembly="SendMailWithAttachmentActivity, Version=, Culture=neutral, PublicKeyToken=ff5f77ebcbc6469d"
      Category="Email Actions">
      <RuleDesigner Sentence="Send Attachs to %1 besides %2">
        <FieldBind Field="EmailID" Text="people field" Id="1" DesignerType="TextArea"/>
        <FieldBind Field="Junk" Text="enter jun

Create custom workflow using Managed Metadata and Sharepoint Designer


Hello all,


We have a very specific question from one of our customers concerning managed metadata and workflows that I can’t seem to figure out. Maybe you could give me a hand. This is the situation:


They want a taxonomy store with managed metadata. The departments of the customer are stored here (in a branched way). When a user adds an document to a document library he or she has to fill in the metadata field for the department so it will be connected to this document. Depending on the department they want to assign an approval task to a different manager.


SharePoint Designer Workflow Activity to generate Word Document from Infopath xml




I am considering the follow implementation.

I have a workflow that user fills out to get funding and once approved (via workflow) I want to at the end of the approval generate the letter dynamically based on the values out of the infopath form.

Now I am thinking of the following solutions.

A custom activity where you point it to the word document to use and then set the fields out of the infopath that you want transfered into the word document.

Is this going to be even possible.

The type of data I have is fields from lookup, people pickers, text, curreny etc.

Is there another option maybe having a document lib with these fields as text and create new item in it and move these values into there (is that possible via designer?)


The document has to be able to be easily editable by the end user to change the template and also to be able to edit the actual document once created.


Any help would be great.

How to drop Activities in Custom Activity Designer having custom style template?



I have designed a custom activity designer developed using Activity Designer XAML and using that in a rehosted Workflow environment on a WPF. I have changed the outer design of the Activity designer by setting the style template to my required style. If I do this, I am unable to add the activities to the custom activity having my custom activity designer.

Am I missing anything.? Please help me in this regard.

Thanks in advance,



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