[JIRA-Opensymphony] Created: (WF-198) Firing global action does not move split steps to history

[email protected]
Newsgroups gmane.comp.java.open-symphony.devel
Message-ID <[email protected]>
Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:

  http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WF-198


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: WF-198
    Summary: Firing global action does not move split steps to history
       Type: Bug

     Status: Assigned
   Priority: Major

    Project: OSWorkflow
 Components: 
             Core
   Versions:
             2.5

   Assignee: Patrick Lightbody
   Reporter: Nick Dellamaggiore

    Created: Thu, 21 Aug 2003 11:26 PM
    Updated: Thu, 21 Aug 2003 11:26 PM

Description:
My workflow has a 2-way split. When the workflow is in the split state (i.e. 2 steps are current) and I execute a global action that transitions the workflow back to a single step, the 2 steps from the split state remain in the current step table and thus I have 3 current active steps. This is not good. Since its a global action and can happen anywhere in my 8 step workflow, I 

Was OSWorkflow designed so that a split could not be interrupted without a genuine join taking place? I think that if an actionId is valid at any point in the workflow and I perform that action during a split, all steps in the split should be interrupted (i.e. the old-status is set on all these steps) and a single new step is created as a result of the action performed. If I am wrong, please ignore this post. I'll just modify the source code to my liking and create my own OSWorkflow branch for my company. If OSWorkflow WAS desinged to work the way I described above, read on for the fix:

I scoured the code (i.e. the uber AbstractWorkflow class), trying to find where you would loop over the existing current steps and all store.markFinished() on them. All I could find is this block in createNewCurrentStep( many args ):

   if (currentStep != null) {
      store.markFinished(currentStep, actionId, new Date(), oldStatus, context.getCaller());
      store.moveToHistory(currentStep);
            }

You seem to only be moving ONE current step, not all current steps here. I also see a 'previousIds' variable kicking around, but it is never initialized to be of size > 1 and furthermore, its never used! Finally, I wondered why I didn't see at least one of my steps being moved to history. It turns out that currentStep is declared as 'step' on the first line of transitionWorkflow() by calling the getCurrentStep() function. THAT function validates that my GLOBAL action is a valid action for the current set of steps by calling getAvailableActionsForStep()! Of course, since the action is global, it doesn't show up via the getAvailableActionForStep() method as its not declared at the step level. 

SO, my currentStep ends up being null and no transitions are made, leaving my workflow state hosed.  Please advise.




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.opensymphony.com/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.