New and Improved 3.13 Beta. Highlights: Shareable filters and dashboards and lots of other goodies. Any feedback can be raised as JIRA issues in the JIRA project.
Issue Details (XML | Word | Printable)

Key: JRA-8902
Type: Bug Bug
Status: Resolved Resolved
Resolution: Not a bug
Priority: Major Major
Assignee: Unassigned
Reporter: Erik S
Votes: 2
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
JIRA

Support lack of step change for a transition in the workflow

Created: 28/Dec/05 02:20 PM   Updated: 24/Jan/07 11:05 PM
Component/s: Workflow
Affects Version/s: 3.4.2
Fix Version/s: None

Time Tracking:
Original Estimate: 2 hours
Original Estimate - 2 hours
Remaining Estimate: 0 minutes
Time Spent - 3 hours, 10 minutes
Time Spent: 3 hours, 10 minutes
Time Spent - 3 hours, 10 minutes

Issue Links:
Reference
 

Participants: Andreas Knecht [Atlassian], Erik S, Jeff Turner [Atlassian], Mark Chaimungkalanont [Atlassian] and sanjeev
Since last comment: 1 year, 29 weeks, 5 days ago
Resolution Date: 24/Jan/07 11:05 PM
Labels:


 Description  « Hide
OSWorkflow supports no transition to another step on a transition for common and global actions (http://wiki.opensymphony.com/display/WF/3.3+Common+and+Global+Actions).

However, it isn't working for me in JIRA. Either there is a bug in Jira, in OSWorkflow, or I'm doing something wrong.

When I try this in a workflow imported into JIRA I get the following in the tomcat log file when I attempt to run the
transition:

2005-12-28 10:15:59,972 ERROR [atlassian.jira.workflow.SimpleWorkflowManager] An exception occurred
java.lang.NullPointerException
at com.opensymphony.workflow.AbstractWorkflow.createNewCurrentStep(AbstractWorkflow.java:1130)
at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1426)
at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:533)
at com.atlassian.jira.workflow.SimpleWorkflowManager.doWorkflowAction(SimpleWorkflowManager.java:211)
at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.progress(WorkflowTransitionUtilImpl.java:259)
at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:187)
at webwork.action.ActionSupport.execute(ActionSupport.java:153)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:51)
at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:178)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:182)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:177)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)

the following is the workflow action I wrote:

<common-actions>
    <action id="2003" name="Edit Issue (common)" view="fieldscreen">
      <meta name="jira.fieldscreen.id">10010</meta>
      <meta name="jira.description">Edit Issue (for Client)</meta>
      <restrict-to>
        <conditions>
          <condition type="class">
            <arg name="group">pi-clients</arg>
            <arg name="class.name">
              com.opensymphony.workflow.util.OSUserGroupCondition
            </arg>
          </condition>
        </conditions>
      </restrict-to>
      <results>
        <unconditional-result old-status="Not Done" status="Done" step="0">
          <post-functions>
            <function type="class">
              <arg name="class.name">com.atlassian.jira.workflow.function.issue.UpdateIssueStatusFunction</arg>
            </function>
            <function type="class">
              <arg name="class.name">com.atlassian.jira.workflow.function.misc.CreateCommentFunction</arg>
            </function>
            <function type="class">
              <arg name="class.name">com.atlassian.jira.workflow.function.issue.GenerateChangeHistoryFunction</arg>
            </function>
            <function type="class">
              <arg name="class.name">com.atlassian.jira.workflow.function.issue.IssueReindexFunction</arg>
            </function>
            <function type="class">
              <arg name="class.name">com.atlassian.jira.workflow.function.event.FireIssueEventFunction</arg>
              <arg name="eventType">updated</arg>
            </function>
          </post-functions>
        </unconditional-result>
      </results>
    </action>
</common-actions>


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jeff Turner [Atlassian] added a comment - 28/Dec/05 10:52 PM
> OSWorkflow supports no transition to another step on a transition for common and global actions

By "no transition", do you mean actions without a view="..." attribute?

If so, that's correct - OSWorkflow lets you have common actions without a transition, and JIRA's workflow editor does too. Your workflow snippet does have a transition (view="fieldscreen"). If you remove that attribute, the workflow will import successfully.

Also, I assume you do have a <step id="0"> node, since that is what your action transitions the issue to.

Cheers,
Jeff


sanjeev added a comment - 29/Dec/05 01:23 AM
Please ignore - this comment is goonk –
It will be nice if we are able to support state changes without a transition

Erik S added a comment - 29/Dec/05 09:51 AM
By "no transition" I mean that the end step and the beginning step are the same. As indicated by using step="0" in the unconditional-result statement.

In my workflow listed above, I do have the step="0" in my action. I'm not sure what the view attribute has to do with it. I looked at OSWorkflow's DTD, and I don't see any restrictions on its use when using step="0".

FYI, the above workflow imports just fine. It throws the error when you try to run the action.

Basically what I want to do is I want the end step to be the same as the start step, with a screen that allows the user to change certain items. So removing the view attribute isn't going to work for my application. However, I have been able to work around the issue by not using the common action and instead implementing an individual action for each step with step="?" where ? is the step id of the step containing the individual action. Since, there is a workaround, the priority of this issue probably should be dropped. Still it would be nice if I could use a common action for this.


Jeff Turner [Atlassian] added a comment - 30/Dec/05 01:55 AM
Right, I see - I thought you were referring to transition screens. Yes, it breaks for me too. Thanks for the report, we'll look into this.

Mark Chaimungkalanont [Atlassian] added a comment - 08/Jan/06 11:58 PM
Occassioanally, it also throws up
java.lang.NullPointerException
	at com.opensymphony.workflow.AbstractWorkflow.createNewCurrentStep(AbstractWorkflow.java:1130)
	at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1426)
	at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:533)
	at com.atlassian.jira.workflow.SimpleWorkflowManager.doWorkflowAction(SimpleWorkflowManager.java:228)
	at com.atlassian.jira.workflow.WorkflowTransitionUtilImpl.progress(WorkflowTransitionUtilImpl.java:259)
	at com.atlassian.jira.web.action.workflow.SimpleWorkflowAction.doExecute(SimpleWorkflowAction.java:31)

Mark Chaimungkalanont [Atlassian] added a comment - 09/Jan/06 05:55 PM
Erik,

I couldn't get a definitive answer onwhether this stepId="0" feature would've been in our version of OS Workflow or not. We'll try to upgrade to 2.8 for JIRA 3.6 and see how we go.

Cheers

Mark C


Andreas Knecht [Atlassian] added a comment - 24/Jan/07 10:49 PM
There seems to be a little bit of confusion around this issue.

Firstly: step="0" is not what should be used for a common action to not transition. It's step="-1". There seems to be some confusion in the osworklow docs, about this, but the latest version of the docs provide the correct code. (see here for incorrect docs)

Upgrading to osworkflow 2.8 will not fix this issue. It will simply produce a nicer error message:

com.opensymphony.workflow.WorkflowException: step #0 does not exist
	at com.opensymphony.workflow.AbstractWorkflow.createNewCurrentStep(AbstractWorkflow.java:1524)

as opposed to the error message from osworkflow 2.7:

java.lang.NullPointerException
        at com.opensymphony.workflow.AbstractWorkflow.createNewCurrentStep(AbstractWorkflow.java:1130)

We need to improve the workflow editor UI though to be able to handle common-actions with step="-1" better. Currently the UI doesn't handle this case at all. (The transition screen still shows an error pointing to nothing for the destination step)


Andreas Knecht [Atlassian] added a comment - 24/Jan/07 11:05 PM
See latest comment. This is not a bug, but simply a problem with configuring osworkflow/the osworkflow docs. We'll open a separate issue to track the UI enhancements for the worflow editor to handle common-actions with step="-1" and link it to here. See JRA-12017.