Custom Workflow Manager
Posted 12/22/2016 by Yogeshwer Sharma
I'd like to share my next Sitecore Marketplace contribution: Custom Workflow Manager. This module can help add workflow and workflow states on items after building/completing the site and save your time with this tedious task.
Purpose of Custom Workflow manager –
This module will help to add workflow and workflow states on content items with few clicks.
There are a number of reasons why we may not initially apply workflows to data templates early on in a project. However, if we do that, it is then difficult to add them later, since the usual workflow initialization of placing an item in the default state is not performed, and even if it were, we'd really want most of the items in the "final" workflow state.
To achieve this functionality we have created a Speak UI module which is easy to handle and it will help to save development/content editor time.
With the help of this module we can apply workflow and workflow state on content items also we have provided few option to filter content item from content tree to restrict your update on specific items.
Installation of Custom Workflow Manager –
- Install Custom Workflow Manager1.0.zip sitecore package from Sitecore installation wizard.
Post installation steps –
- This module is using Sitecore lucene to get items so rebuild master database search index.
How to launch Custom Workflow Manager after installation
After installation of the module you can see Custom Workflow manager button on Sitecore Launchpad. Please see in below screenshot.
Click the button for the module to open it.
How to use custom workflow manager -
- Clicking the Custom Workflow Manager button it will open speak UI in new window as below.
Select the data template of the items you want to apply workflows to and click the Get Workflow button. If that selected template doesn’t have standard value then it will show a warning message “Selected Template Doesn’t have standard value, Please create standard value for proceed” as below.
If 4th step is true then create standard value for data template from Sitecore manually.
If standard value of selected data template doesn’t have any workflow assigned then it will show a notification message and it will fill right side combo box with Workflow items.
Select workflow item and click on Apply workflow button to apply workflow on standard value of selected data template. After this right side combo box will be filled by Workflow states and right side button text will be changed by Apply Workflow State.
Now Select any workflow state from the combo box and click on Apply Workflow State button. By default it will apply workflow on all items created by selected template.
If you want to apply workflow on items under specific node the enter parent Item ID or parent item Path in RootPath (Optional) field. If you will enter wrong path of ID then it will show a warning and it will not update any item.
It will apply workflow on all items and show updated items report on bottom. See below screenshot.
Note - If an item already has a workflow and is in a workflow state, then it will not update it. This module is only for adding workflow and workflow states not for updating values.
How to uninstall this module from your Sitecore instance –
If you have used this module and don’t want this in your Sitecore instance anymore then you can easily uninstall by deleting some items and files as given below.
- Remove Items from Sitecore -;
- Delete /sitecore/client/Your Apps/Custom Workflow Manager item with its children.
- Delete /sitecore/client/Applications/Launchpad/PageSettings/Buttons/Custom Workflow Manager item with children.
- Remove Files from we
- Remove CustomWorkflowManager.dll from bin folder under website.
- Remove Custom Workflow Manager Folder from Website\sitecore\shell\client location.