When I run this code in my workflow, it deletes all the nodes except deactivated nodes. They should be deleted as well, and I try to include them in "GetAllChildren(4,true,true)".
Is there a better way of doing this?
foreach (HierarchicalContent hc in currentMother.GetAllChildren(4, true, true))
{
childrenToBeDeleted.Add(hc.NodeId);
}
WFContext.Engine.SystemSession.DeleteNode(Aql.In(AqlContent.NodeId, childrenToBeDeleted), true);
WFContext.Engine.SystemSession.DeleteNode(currentMother.NodeId, true);