You should to use the CustomSummaryInformation
object to display the summary message. Here is the code. Hope it helps.
protected override void Execute(CodeActivityContext context)
{
var summaryReport = new CustomSummaryInformation()
{
Message = "Your message",
SectionPriority = 0,
SectionHeader = "Header Name",
SectionName = "Section Name",
};
context.Track(summaryReport);
}