1

One of our UX people are asking whether we can hide workflow states that have zero items. I can't seem to find anything that would relate to this in the workflow state template or in the core database for the workbox item, so I thought I would check here. Running 8.2...

1 Answer 1

1

Sitecore Workbox is one of the oldest Sitecore Applications. It's an xml file (\sitecore\shell\Applications\Workbox\Workbox.xml) with code beside Sitecore.Shell.Applications.Workbox.WorkboxForm.

It pretty much generates the whole html of the workbox from the C# code.

There are no settings which would allow you to hide states that have 0 items.

The only option would be to create a new class inheriting from the original WorkboxForm class, override

protected virtual void DisplayStates(IWorkflow workflow, XmlControl placeholder)

method and copy the whole code from the original class with one extra condition. And then change the CodeBeside in the Workbox.xml file.

It would be doable and not that hard, but if you ever plan on updating to newer Sitecore version, you would need to make sure that nothing has changed in the newer Workbox and that your code hasn't broken anything.

In my opinion is not worth it but it all depends on your needs.

1
  • 1
    Thanks. As it turned out, I just needed to optimize the workflow actions so as to minimize the number of workflow states, doing this prevented there from being workflow states that would never actually have items in them (since they would be acted on immediately and either deleted or sent do a different workflow state. Commented Jun 5, 2019 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.