1
votes

I have three users (A, B and C) and set workflow for items. The workflow process is perfectly working as I expected.

In this case, I'd like to set workflow only for A user and other users (B and C) will not use any workflow process even the process was already assigned into content items.

So, A user will follow the process like "submit", "approval" and "publish". B and C users will not use workflow and they are not required, just change and publish.

How can I do this??? I guess I need to update workflow permission in security??

2
Can you make user B and C administrators? - Elena Zlateva
No, user A, B and C don't have administrative access. - Jay

2 Answers

2
votes

You'll have to write some custom code to do this as you can't skip the workflow on an item.

Instead you can write some code to hook into an event - on save seems like a good option. you can check:

if the item has workflow

If the user had a specific role to skip workflow (users b and c)

If Workflow is in the correct state

On these conditions you can then programmatically action the workflow to the next state or set the workflow field to approved.

Some great sample code from Cognifide here on actioning or updating the workflow on an item programmatically

https://www.cognifide.com/blogs/sitecore/changing-workflow-state-of-sitecore-items-programmatically/

There's also an example here of somebody setting up a skip approval action to push the items workflow to the final state.

How to programmatically approve a content item in Sitecore

I'd advise you to be careful with skipping workflow as content can easily end up being approved accidentally if the power user edits editor's content. It can be annoying for some users to keep pressing submit and approve all the time but it is a good fail safe.

Another thing you could do is create a custom workflow action after the draft state to update the workflow to the final state when a new item is created in draft by users b and c.

1
votes

What you can do is use a AutoSubmitAction that will be allowed only for Power Editor role (or whatever role are users B and C assigned to) and that will change the state of edited item to the final state of workflow every time the item is saved. This action should be added under the initial state of your workflow (under __Save command).

Obviously the workflow is still there but users B and C don't have to submit or approve.

No coding is required but you need to remember that workflow is a powerful tool and skipping it can be dangerous if your power editors are not careful.