I have a functioning custom workflow activity developed in VisualStudio, deployed successfully and visible in SharePoint Designer.

My problem is that I'm trying to collect a Workflow Variable of type Number from SPD as a parameter for the activity, and can't find the right combination of values for my .ACTIONS XML file...

As a simple example/test WF Activity, I'm trying to just increment a variable and return the new value to another variable. Since this is an increment (variable++) I want both variables to be defined of type Number in SPD, not String. For an example of what
I want, take a look at the "Do Calculation" OotB WFA in SPD and it's (Output To _variable:_ ) , where clicking on the parameter placeholder displays a drop-down list of all Workflow Variables in the current WF.

If I set the FieldBind attribute DesignerType to Text (and the Parameter attribute Type to "System.String, mscorlib") then I get the textbox with the "..." and "fx" buttons, allowing me to select any Workflow Data variables.

But if I change that to Integer and "System.Int32, mscorlib" I get the same control, but nothing is available in the Workflow Data variables list. And if I use FieldBind.DesignerType="ParameterNames" and Parameter.Type="System.int, mscorlib" I get an empty
drop-down-

Hi,
Inside execute "protected override void Execute" of the NativeActivity i want to get its parent.
protected override void Execute
(
NativeActivityContext context
)
{
this.Parent
Actually my problem is that i want to check if this activity is in sequence or parallel during execution. Please help me.
ilogik

Hello,
I'm using code posted here http://blogs.msdn.com/b/tilovell/archive/2009/12/31/freeform-custom-activity-designers-using-icompositeview.aspx hosted
in a designer taken from Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4( UsingWorkflowItemPresenter.sln). However, I can't drag & drop Activity1 given as sample into Canvas or any other kind
of activity for that matter. Could you tell me what I'm doing wrong, please?
Also, I would like to know how I could make the Canvas activity fill the WorkflowDesigner and not being able to be deleted.
Thank you

How can I prevent the expand feature of my custom activity with custom designer ?
I have custom WF4 activities with Custom designers. These activities are not container activities. I just want to prevent the expand feature of the same; just like Assign activity. I set the
Collapsible
attribute of teh ActivityDesigner false; but still it is expanding to the next level.
Thanks
AmbilyIT Analyst

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

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.

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.

I can't seem to find a way of determining the parent activity of an activity when it is moved about. I have an activity that needs to be bound to a parent activity when it is inside a certain parent activity, but when outside of the parent, it needs
to have the inarg blanked out so that it can be manually bound to the parent.
I have all the logic worked out other than determining the parent activity.
I'm using the ModelService_changed event in my rehost to detect the movement of the activity (this seems to be the only way of detecting when an activity is added, moved or copied). The only problem is that when an activity is moved within the
patern (dragged to a new location) the ModelService_changed event fires before the activities model item has been updated. So my attemps to bind always end up binding to the previous parent activity!
Is there either
1. A way of getting the current (new) parent activity from the modelItem inside the ModelService_changed event?
2. Another way of detecting if an activity has been added, moved, or pasted into a new location in the workflow?
Any help will be greatly appreciated.
Cheers,
JasonJason Bolstad

I wrote a simple Native activity which implements
CacheMetadata(NativeActivityMetadata metadata) to
declare arguments and variables.
The activity works great but when I tried to use it inside a flowchart activity I found out that
CacheMetadata is not called by visual studioo when the activity is dragged from the toolbox into
the flow chart . This of course prevents my activity from working correctly.
How can a custom activity be used inside a flowchart activity if
CacheMetadata not called? Is there a way to make
CacheMetadata run when the custom activity is placed inside a flowchart activity?
Thanks
Manu

I have one Custom Activity which I have used in a dynamic workflow. Dynamic means I have re hosted the designer in windows form application. Now if I try to access this Custom Activity in any other Activities I got following message.
"The type of the member "messageActivity1" could not be determined. Ensure that the declaration is correct"
The Dll of this activity is in GAC and in Win Form Bin. If do the same in .Net designer it works fine. Any idea to solve this??? farukh

I am trying to implement activity feed functionality for SharePoint sites. User should be able to follow activities (document added, delete etc.) on multiple SharePoint
sites by subscribing to it. All sites are available for all authenticated users. Users have the option of unsubscribing to it at any time. I know that I can add custom activities. The question that I have is how can I publish these events to only users who
have subscribed to the site. There are about 50K users. Does SharePoint 2010 provide any mechanism for storing who has subscribed to what site and use that to publish the events?

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

To run the workflows from XAML I use WorkflowApplication.Run. I would like to change
behavior of the custom activity depends on how the activity was running. I mean - in some situations my custom activity should report to DB, but in other situation shouldn't. I can add InArgument (or property) to this
activity, but I don't know how to pass to my custom activity value for this InArgument (property).