From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 Description of problem: Go to a content section. Go to the "Workflows" tab. Click on "Production Workflow" on the left. Observe the following exception: java.lang.UnsupportedOperationException at ..workflow.simple.WorkflowTemplate.getProcessState(WorkflowTemplate.java:147) at ..cms.ui.workflow.BaseWorkflowItemPane$SummarySection$StartLink.isVisible(BaseWorkflowItemPane.java:247) at ..toolbox.ui.ProxyComponent.isVisible(ProxyComponent.java:45) at ..cms.ui.VisibilityComponent.isVisible(VisibilityComponent.java:46) at ..toolbox.ui.ActionGroup.generateXML(ActionGroup.java:86) at ..toolbox.ui.Section.generateXML(Section.java:116) at ..bebop.SimpleContainer.generateXML(SimpleContainer.java:245) As far as I can tell, this breakage was introduced in chage 33398. The comment for that change says, Restores the workflow start and stop actions to the item workflow UI. This may work for a Workflow attached to an item. In the case of the Workflows tab, we are dealing with WorkflowTemplate instances - not Workflow instances. The WorkflowTemplate class is a subclass of Workflow that overrides the getProcessState method (as well as a bunch of other methods) like so: public int getProcessState() { throw new UnsupportedOperationException(); } In change 33398, the following piece of code was added to //cms/dev/src/com/arsdigita/cms/ui/workflow/BaseWorkflowItemPane.java#8 > public final boolean isVisible(final PageState state) { > final Workflow workflow = m_workflow.getWorkflow(state); > > return workflow.getProcessState() == Workflow.STOPPED; > } This works as long as the "workflow" is an instance of Workflow. If it is an instance of the subclass WorkflowTemplate, the method obviously breaks. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: See the comment Additional info:
This was fixed by Jon Orris as part of the following change (the part about "obeying Liskov substitution"): $ p4 describe -s 33854 Change 33854 by jorris@jorris-177 on 2003/07/22 18:20:03 Moved ItemWorkflow specific code from BaseWorkflowItemPane to ItemWorkflowItemPane. It was causing an exception when viewing Workflow Template details, as WorkflowTemplate was not Liskov compliant. Made WorkflowTemplate obey Liskov substitution. Affected files ... ... //cms/dev/src/com/arsdigita/cms/ui/workflow/BaseWorkflowItemPane.java#10 edit ... //cms/dev/src/com/arsdigita/cms/ui/workflow/ItemWorkflowItemPane.java#9 edit ... //core-platform/dev/src/com/arsdigita/workflow/simple/Workflow.java#15 edit ... //core-platform/dev/src/com/arsdigita/workflow/simple/WorkflowTemplate.java#7 edit
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future. Moving to ON_QA.
Closing old tickets