Tony, why cross-post this to SAIL-Discuss?  Isn't this a SAIL developer
matter?

The problem is with reading the curnit, not writing.  The curnit is being
written out with the right ordering.  If you look at the
curnit-WISE_NOTE_SWITCHED.jar for the file "00001" pod file which has the
activity your test modifies, you'll see that the step array has the Note
step at the beginning as it ought to be.

   <object id="PasActivity0" class="org.telscenter.pas.beans.PasActivity">
    <void property="steps">
     <array class="org.telscenter.pas.beans.PasStep" length="5">
      <void index="0">
       <object id="Note0" class="org.telscenter.pas.steps.Note">

The problem is that even though the file has the Note first, the loaded
curnit has Generic first, like before your test's reordering.  I rewrote
some of the test since it was confusing.  Some comments were left over from
the test you copied and weren't updated to match the code edits.  There was
also an error in the tests assertion logic.  The steps themselves won't be
equal (at least not how PasStep is now) so I made it check instead just the
the title and class of each step.  The test passes now due to one key
change: updating the pod uuid before saving.

The problem here is that the design of pods originally was that there was a
unique UUID for each modification.  In this case, reordering the steps would
force a new UUID for the pod.  That's what the pod handling code assumes and
ppdating the pod's UUID before writing makes the pod handling work
correctly.

This gets into the versioning system, which has never been fully settled
upon.  I think for now we should move forward with updating the pod UUID
whenever there's an edit.  We need to come up with a durable design for
versioning.  Until we have that, any hacks are just going to introduce
instability and take time away from our real solution.

-Turadg



On 4/28/07, Anthony Perritano <[EMAIL PROTECTED]> wrote:
>
> Turadg, i know you said that pods have no order. steps in activities do. i
> am running up aganist a strange bug. heres the scenario:
>
> i start out with one activity, one step.
>
> Act 1
>   note 1
>
> i add a new step
>
> Act 1
>   note 1
>   displaypage 1
>
> now, i reorder them:
> Act 1
>   displaypage 1
>   note 1
>
> i step through this, i explicitly make a new step[] and set it on the
> activity
> pasActivity.setSteps(steps[]) and the bean property change listener gets
> fired.
>
> then i save it.
>
> when i load the curnit back in, it goes back to the original order:
> Act 1
>   note 1
>   displaypage 1
>
> i confirmed that the order is not saved with the test:
>
> SwitchingStepsCurnitTest
>
> in PLR
>
> check it out
>
> Tony
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SAIL-Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/SAIL-Dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to