Home > Forum > Actions > SDK, add mandatory comment on request to move the document

SDK, add mandatory comment on request to move the document
0

Hello,
I have a process, in which the "pathId" transition paths require adding comment.
However, in SDK I am unable to find a way to move the document along this path due to missing comment.

private async Task CancelInstance(DocumentsManager manager, int documentId, int pathId) {
___var document = await manager.GetDocumentByIdAsync(documentId);
___await document.Comment.AddCommentAsync("Adding comment required for this transition");
___await manager.MoveDocumentToNextStepAsync(new MoveDocumentToNextStepParams(document, pathId));
}

Result (translated by me): "ValidationError: Comment is required on path: PATH_NAME"
Am I doing something wrong?

Nobody has replied in this thread yet.