OK. Edit.aspx.cs::SaveDocument() doesn't work because state is changed in CheckOut() operation. I did however, get the TreeNodeHandler to automatically push the doc back through the workflow.
public override void OnAfterUpdate(object treeNodeObj, object tree)
{
TreeNode node = (TreeNode)treeNodeObj;
WorkflowManager wm = new WorkflowManager((TreeProvider)tree);
WorkflowInfo wi = wm.GetNodeWorkflow(node);
if (wi != null)
{
// Document is using workflow
WorkflowStepInfo step = wm.GetStepInfo(node);
if (step.StepName.ToLower() == "edit"
&& node.IsPublished
&& node.NodeClassName == "ANCA.Article")
{
while (step != null && step.StepName.ToLower() != "published")
{
step = wm.MoveToNextStep(node, "Ignore workflow: Minor change to published article");
}
}
}
}
All working OK, except that the edit page needs a refresh after the event because it displays workflow state = Edit. Any way to inject a page refresh from the event handler?