Dependency properties in custom callexternalmethod activity

I've created an activity to automate sending data back from a statemachine workflow.
But no matter how I try I can't get the activity to see the value of the DependencyProperty on the C2BRuntimeWorkflow object. I can get the Property itself but when trying to GetValue it returns null, but only when in the context of this activity, if I break at the C2BRuntimeWorkflow and use GetValue(DependencyProperty.FromName("OutputData", typeof(C2BRuntimeWorkflow))) it reads it no problem... Am I missing something

Garick

/// <summary>
/// Update the data in the exchange service
/// </summary>
[ToolboxItemAttribute(typeof(ActivityToolboxItem))]
public partial class C2BUpdateOutputDataActivity : System.Workflow.Activities.CallExternalMethodActivity
{

/// <summary>
/// Activity to update the data in the data exchange service
/// </summary>
public C2BUpdateOutputDataActivity()
{
InitializeComponent();

this.InterfaceType = typeof(IC2BWorkflowExternalEventService);
this.MethodName = "UpdateOutputData";
}

/// <summary>
/// Overrides the default method invoke to add the output as a parameter
/// </summary>
/// <param name="e"></param>
protected override void OnMethodInvoking(EventArgs e)
{
base.OnMethodInvoking(e);
this.ParameterBindings["output"].Value = GetValue(DependencyProperty.FromName("OutputData", typeof(C2BRuntimeWorkflow)));
}



Answer this question

Dependency properties in custom callexternalmethod activity

  • Latso

    Garick,

    Did you try using the wca.exe tool to create the strongly typed derived CallExternalMethod / HandleExternalEvent activities

    Arjun


  • Mark Tomlinson - MSFT

    By the way if I just choose the property at design time in a standard CallExternalMethod activity it works.



  • Dependency properties in custom callexternalmethod activity