2
votes

I'm updating workflow process in Sitecore. As shown in the screenshot, I added "__OnSave" command under Approval state. I guess it means when user saves the item in Approval state, the state will change to Draft state.

But, it is still in Approval state after saving. What is the issue??

enter image description here

1
Does the item have any pending validations?Umeshwali
I don't think so. Actually under "Approve" command in Approval state, there is validation action, but I removed and tested, then got the same issue.Jay

1 Answers

3
votes

Actually __OnSave is a command, not an action. I'm not sure if Next State of this command is used at all. You need to click on the command button to execute the command, and __OnSave button is hidden by default.

What you need is another item under your __OnSave item using Auto Submit Action template with properties:

  1. Type: Sitecore.Workflows.Simple.AutoSubmitAction,Sitecore.Kernel
  2. Role: Your chosen role. This action will be executed only for the users which are in the role (e.g. sitecore\sitecore client authoring)
  3. Next state: Workflows/Sample Workflow/Draft

Sitecore workflow - onsave action

Actions are executed automatically.