How to Generate Report On Documents that have workflow

benyamin jain asked on August 10, 2015 11:21

HI

How we can create report on documents that use workflow versioning?

Recent Answers


Bryan Soltis answered on August 10, 2015 16:02

Hi Benyamin,

For the report, you can usually generate a report with any data you want, assuming you know the SQL to execute. To find all of the documents that have a workflow applied to them, you could execute a SQL statment similar to the following:

SELECT * FROM View_CMS_Tree_Joined WHERE DocumentWorkflowStepID IS NOT NULL

That statement hits the VIew_CMS_Tree_Joined view, which contains all of the document and tree fields. Specifically, it looks at the DocumentWorkflowStepID which should have a value if the document is governed by a workflow.

One note is for documents that are created and then have a workflow applied to them. In that case, those records would not have a DocumentWorkflowStepID yet and will still be NULL. You will need to update those documents in some way to force them to the value entered. Then they will show up in the report.

Hope this helps! - Bryan

2 votesVote for this answer Mark as a Correct answer

benyamin jain answered on August 12, 2015 08:16

Hi

Thank you for reply

As you know when workflow applied to custom document , values added to document not applied to main document fields until document published.

All the changes save as a record in versioning table.in this case the only way of getting all data and generating reports is by using DocumentHelper.GetDocuments and there are no way to generation of reports using SQL statements that is my real problem.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.