Timeline for Unable to get list of commands for a workflow state
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 7, 2018 at 2:00 | answer | added | Chris Auer | timeline score: 4 | |
Sep 7, 2018 at 1:50 | comment | added | Chris Auer | Even as the publisher site, still no commands. Something is really wrong with this workflow. Maybe I should just rebuild it or decompile the workflow code. | |
Sep 7, 2018 at 1:43 | comment | added | Chris Auer | @MarkCassidy The site config has enableWorkflow="true". I am going to use a SiteContextSwitcher to see if there is a site issue. | |
Sep 6, 2018 at 22:17 | answer | added | Mark Cassidy♦ | timeline score: 2 | |
Sep 6, 2018 at 22:04 | comment | added | Mark Cassidy♦ |
What is your context site? this isn't clear from your code snippet or description. Not all sites have Workflow capabilities. Workflow needs to be enabled, on the corresponding <site> node. Assuming this is it - posting as answer and heading to bed ;-)
|
|
Sep 6, 2018 at 21:13 | comment | added | Jon Fairchild | Wow, formatting is not working for me... | |
Sep 6, 2018 at 21:12 | comment | added | Jon Fairchild |
IWorkflow workflow = item.Database.WorkflowProvider.GetWorkflow(item); if (workflow == null) return new WorkflowResult(false, "No workflow assigned to item"); WorkflowCommand command = workflow.GetCommands(item[FieldIDs.WorkflowState]) .FirstOrDefault(); if (command == null) return new WorkflowResult(false, "Workflow command not found"); What does that get you?
|
|
Sep 6, 2018 at 21:07 | comment | added | Chris Auer | Sorry, updated question. Sitecore 8.2 Update 5 | |
Sep 6, 2018 at 21:07 | history | edited | Chris Auer | CC BY-SA 4.0 |
added 23 characters in body
|
Sep 6, 2018 at 21:02 | comment | added | Jon Fairchild | By the way, just to clarify, what version of Sitecore are you on? | |
Sep 6, 2018 at 21:01 | comment | added | Chris Auer | @JonFairchild No its an empty result | |
Sep 6, 2018 at 20:59 | comment | added | Jon Fairchild |
If you try: var command = workflow.GetCommands(item[FieldIDs.WorkflowState]).FirstOrDefault(); Do you get a result?
|
|
Sep 6, 2018 at 20:13 | history | asked | Chris Auer | CC BY-SA 4.0 |