SendEmail activity does not work from custom SequenceActivities

The SendEmail activity works only when it has assigned the correlation token of the current workflow. When you add a SendEmail activityto a custom created sequence activity, it does not have access to the the parent workflow token and when you try assign a  different correlation token it throws following exception:
Correlation value has not been initialized on declaration [token]  for activity [sequenceActivity]
The workaround is simple just use the SPUtility.SendEmail wrapped in a CodeActivity.
Another solution is to create your own activity that would wrap the SPUtility.SendEmail.

Advertisements

Tags:

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: