I have put off wrestling with the particularly pesky (buggy? broken? useless?) SendEmail activity today, and found (to make a long story short):
- There is no way on earth (it seems) to properly set the correlation token of a SendEmail activity nested within a custom composite activity. Thus, it is incompatible with the most important abstraction mechanism provided by WF, thus it is not useful for development of complex workflows.
- Both the SendEmail activity and the "ability" to notify users of tasks via email (taskProperties.SendEmailNotification == true) are known to throw the workflow-terminating error "The e-mail message cannot be sent. Make sure the outgoing e-mail settings for the server are configured correctly" on some servers with properly-configured email settings.
I found the aforementioned error message to be thrown by my workflow when:
(the workflow was coded to copy data from my initialization form to my task forms) and ( (the tasks were set to send e-mail notifications) or (my SendEmail activity nested within my custom sequential activity was Enabled) ).
If the workflow was _not_ coded to copy data my initialization form to my task forms:
- Upon building the project, I get the following warning:
"Activity 'sendRejectionEmail' validation warning: The correlation may be uninitialized." - Upon starting the SendEmail activity, the workflow crashes with error message:
""
I tried adding an OnWorkflowActivitated activity to my custom sequential activity, and I set it and the SendEmail activity to the same correlation token. This time,
- The aforementioned warning goes away! (Maybe I'm onto something!)
- The workflow hangs (never assigns the first task even), and one of the w3wp.exe processes takes up 25% system resources (all it can get in a single thread on a quad-core processor, as is the case with this server).
Between this post and my previous one, I think I have made a good case that one should _not_ expect the OOB SendEmail activity to work.
1 comment:
Hey, Did you ever figure this one out? If not what workaround did you utilize?
Thanks,
Brad
Post a Comment