API Questions on Kentico API.
Version 6.x > API > How to make notification email to be sended when workflow step done programmtically View modes: 
User avatar
Member
Member
shootermv-gmail - 5/11/2012 2:34:04 AM
   
How to make notification email to be sended when workflow step done programmtically
write code that adding the new document and move the document to workflow next step.


DocumentHelper.InsertDocument(node, parentNode.NodeID, tree);

// update node name
node.DocumentName = node.NodeID + " " + txtName.Text;

// update workflow step
WorkflowManager wm = new WorkflowManager(tree);
WorkflowInfo wi = wm.GetNodeWorkflow(node);
if (wi != null)
{
WorkflowStepInfo si =wm.MoveToNextStep(node, "");
}
// Update the document
DocumentHelper.UpdateDocument(node, tree);

The document is added as expeted, workflow step is done
But no Email notifications sended

Please help
Thanks

User avatar
Member
Member
kentico_michal - 5/11/2012 7:30:40 AM
   
RE:How to make notification email to be sended when workflow step done programmtically
Hi,

You need to use the SendWorkflowEmails method of the WorkflowManager class to send the workflow email for the specified document:

public void SendWorkflowEmails(
TreeNode node,
UserInfo userInfo,
WorkflowStepInfo originalStep,
WorkflowStepInfo currentStep,
WorkflowActionEnum action,
string comment)


Best regards,
Michal Legen

User avatar
Member
Member
shootermv-gmail - 5/12/2012 12:46:21 PM
   
RE:How to make notification email to be sended when workflow step done programmtically
Thank you very match, was very helpfull