View Complete Post
There is a scenario that the custom NativeActivity need to access to params or args defined in parent activity. What i have done as below
protected override void Execute(NativeActivityContext context)
WorkflowInstanceProxy proxy = context.GetExtension<WorkflowInstanceInfo>().GetProxy();
Activity root = proxy.WorkflowDefinition;
Activity rootChild = WorkflowInspectionServices.GetActivities(root).ElementAt(0);
EditingContext ec = new EditingContext();
ModelTreeManager mtm = new ModelTreeManager(ec);
ModelItem modelItem = mtm.Root;
ModelProperty c1 = modelItem.Properties["Variables"];
ModelItemCollection c2 = c1.Collection;
dynamic c3 = c2.GetCurrentValue();
string value = c3.Get(context);
Apparently it is not possible to access to external params with local context so the error prompt "An activity can only access its own implementation variables."
My question is how to get it ? Is there another easy way to do so ?
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).
Is there any other way to do, what I described?
As part of my custom activity development, I have a requirement to change the value of one property acording to another property's value.
For example, I have two properties- Position and Qualification in my custom activity. Once I select a position, the qualification should change according to the selected position value. Both, Position and Qualification are string properties and
the value of Position is populated with a TypeConverter.
I tried with TypeConverter for Qualification property too. Issue is how to refresh the Qualification values on change of Position property?
I tried with PropertyEditor also. But not sure how to pass the data from my ActivityDesigner to PropertyEditor. I am handling the ModelItem.PropertyChanged
event and getting the Qualification values. How to pass this values either to my TypeConverter or to My PropertyEditor?
PropertyEditor Code is as follows
I've created my own customÃÂ PropertyBindDialog because the one that Microsoft provides is pretty deficient.ÃÂ Unfortunately my own custom PropertyBindDialog will not be used after I call Activity.SetBinding - after I do this for a given property my own custom PropertyBindDialog is ignored and the Microsoft BindDialog is used.ÃÂ
Here's some of my source code...
The problem occurs when I call SetBinding on the property Test.ÃÂ After I call SetBinding, my PropertyBindDialog is no longer used when I want to edit the Test propertyÃÂ - the Microsoft BindDialog is used and my custom PropertyBindDialog is ignored.
Anyone out there have any ideas??
ÃÂ public partial class MySpecialActivity: Activity, IEventActivity, IActivityEventListener<QueueEventArgs
I have read the blog posted regarding of source control address on controller by Ewlad Hofman, but I can't still seem to figure out how to have my custom activity working on my team server.
I have checked in simply everything (solution file, all related folders, codes, .xaml template file, etc.)
I'm just not sure which directory I should put for the controller to recognize my custom activity. Ah, the statement about that HostEnvironmentOption.All thing is already included in the .cs code.