fwkb
fwkb

Reputation: 138

Make workbox show workflows outside of sitecore/system/workflows

Sitecore's workbox seems to only be able to show items that are in workflows in sitecore/system/workflows. Is there a way to make it show workflows in other parts of the tree? I have been able to solve several issues with moving a workflow out of that location but this one is the current sticking point.

Our site is divided into several sections for different clients (in the "customers" sense of the word). The clients each need their own workflows and we would like them to be able to navigate to the workflows without having to get out of the content portion of the tree and into the system portion. Ideally we would also like to move as much of each client's custom stuff, e.g. layouts, renderings, etc, as we can into the content area so that we or they can publish that one node and subitems and have everything related to that client go live, like what I am guessing most people do with the "publish site" function.

Upvotes: 2

Views: 222

Answers (1)

nickwesselman
nickwesselman

Reputation: 6890

I'd be curious what you've done so far to alleviate this. Using reflector, I searched for the Workflow root item's GUID, {05592656-56D7-4D85-AACF-30919EE494F9}. It is stored in Sitecore.ItemIDs.WorkflowRoot, which is used in turn by Sitecore.Workflows.Simple.WorkflowProvider.GetWorkflows(). This method is called by, among other places, Sitecore.Shell.Applications.Workbox.WorkboxForm. However, it is accessed through Context.ContentDatabase.WorkflowProvider, which is a configuration element located at /sitecore/databases/database/workflowProvider.

Long story short, if you haven't already, you should try implementing your own IWorkflowProvider that extends Sitecore.Workflows.Simple.WorkflowProvider and configure it in your Web.config. Override GetWorkflows() to find workflows from the location you're looking for. Use a tool like reflector or ILSpy to see what this method does currently, and make the necessary changes.

Please report back (blog it if you can!). This is not an area of Sitecore that I think many people usually extend/enhance.

Upvotes: 4

Related Questions