custom activities property values

If I have a custom activity with a public property that is set during the execution of the activity, how can I access the value of this property after the activity has completed

Anyone



Answer this question

custom activities property values

  • NicoTech

    Have you looked into tracking. There are several that can be found under Technologies\Tracking in the Samples.zip file that can be found at %ProgramFiles%\Microsoft SDKs\Windows Workflow Foundation. Another option might be to have a CallExternalMethodActivity that sends the value to the host.

  • Vicki Ecker

    I have actually looked into tracking already and right now I am using the default tracking service and default profile.

    So what I can gather from your response is that using user track points is a better way from the WF architecture to record these kinds of things

    As for the other option, the host would probably just end up writing the data to a database anyway, which tracking is already doing.

    thanx again -- /chris


  • Eric Carter

    Tom Lake wrote:
    You can bind the property to a workflow level variable using ActivityBind. Then you would have access to the value from anywhere in the workflow.

    okay thanks; that should be useful, but what if I wanted to access (read-only) the activity's property value from outside of the workflow (i.e. from the host)

    specifically, what I am trying to model here is a user task that has an expected-completion-time and an actual-completion-time; so I would have two associated properties and it would work as follows:

    - activity is entered; set the expected-completion-time to current time plus some design-time specified increment

    - use WaitForExternalEvent to allow host to signal completion

    - when event is triggered, set actual-completion-time and exit/close activity

    the workflow would typically have a bunch of these 'user task' activities that I would then want to 'see' all of the expected and actual values

    would this work, or is there a better approach with the WF

    thanx -- /chris


  • nongnu_best

    You can bind the property to a workflow level variable using ActivityBind. Then you would have access to the value from anywhere in the workflow.

  • custom activities property values