Some time ago we used in one of our projects a workflow setup with an addional release check for created pages. The amount of pages currently at any state was quite high, so I added some functions to access pages currently in workflow.
RedDot CMS offer a two ways approach accessing pages in workflow:
- global – in SmartTree on Project node and
- per user – in Tasks
Accessing pages from a global point of view jRQL offers the following methods on project.
CmsClient client = new CmsClient(logonGuid);
Project project = client.getProject(sessionKey, projectGuid);
These getAll methods all returns a PageArrayList for iterating.
If you want to offer a plugin for the author which pages he has in workflow use the author’s login information to create the CmsClient and Project and use one of the following methods:
User connectedUser = client.getConnectedUser();
All these methods return a PageArrayList also. Use one of these methods now to find out all pages the author currently has in the respective workflow state.
If you look at the workflow as a member of the user group able to release pages create a CmsClient and Project with your login information and use getPagesWaitingForRelease() to process them.