Search code examples
workflowworkflow-foundationworkflow-foundation-4workflow-activity

How do I access output arguments from Custom activities at design time in WWF4


I'm building a VERY simple sequential workflow in WF4. I have 3 sequential activities I created using the designer: ValidateName, ValidatePhoneNumber and ValidateAddress. These all have an input argument: customer and and output argument: isValid. All I'm trying to do is create a new activity (ValidateCustomer) composed of these 3 activities. I want to take the boolean returned from each activity and assigned to some object that's the returned from the ValidateCustomer activity back to the workflow. However, I want to do this from the designer. Is this even possible? I'm sure is something very simple I'm missing.

Thanks,

Buzz


Solution

  • You have to create boolean variables, also through the designer, and assign them using the Result output from each custom activity. Then you can verify variables' values using other activities. In your particular case you may want to use If.

    Check this answer's image. In that case the custom activity is returning an int but the rule is the same.