|
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. 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.
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) 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 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 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) See latest comment
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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