Permalink
Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (21 sloc) 851 Bytes
using Dovetail.SDK.Bootstrap.History.Configuration;
using Dovetail.SDK.Bootstrap.History.Parser;
namespace Dovetail.SDK.Bootstrap.History.TemplatePolicies
{
public class SamplePolicy : ActEntryTemplatePolicyExpression
{
public SamplePolicy(IHistoryOutputParser historyOutputParser) : base(historyOutputParser)
{
}
protected override void DefineTemplate(WorkflowObject workflowObject)
{
//you can remove templates created by other policies
ActEntry(3000).Remove();
//edit existing template to make it only appear when requesting history with ShowAllActivities=true
EditActEntry(300).IsVerbose();
//you can redefine existing policies
ActEntry(900).DisplayName(HistoryBuilderTokens.DISPATCHED)
.EditActivityDTO(dto => { dto.Detail = "Dys-patched to the deep six. " + dto.Detail; });
}
}
}