This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Undo/Redo in OnEvent, OnAlarm and ForEach can create broken diagram | ||
---|---|---|---|
Product: | soa | Reporter: | Michael Frisino <frisino> |
Component: | BPEL | Assignee: | Denis Anisimov <ads> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Michael Frisino
2006-10-21 18:21:56 UTC
Also note this is only for these parent elements: EventHandlder>OnEvent EventHandlers>OnAlarm ForEach. The bug does not surface in Pick>OnMessage and Pick>OnAlarm. This leads me to conclude it is limited to those elements where the BPEL specification requires a Scope child. On steps above. There was a typo. I wrote: Ctlr-Z again The Empty1 and Scope1 dissappear as expected from both diagram and source <eventHandlers> <onEvent/> </eventHandlers> Please ignore the "Empty1" word. It was mistake in my typing. I meant to write: Ctlr-Z again The Scope1 dissappears as expected from both diagram and source <eventHandlers> <onEvent/> </eventHandlers> Added to RNs. Use the following link to review the wording and location of the issue in the staged Release Notes http://nbstaging.czech/community/releases/55/entpack_relnotes.html#87719 Denis, can you determine if this is OM or OM client problem? Bug is in sync mechanism of OM. Bug doesn't relate to undo/redo. Problem is inside synchronization source code and OM. ( So it can be reproduced with other scenario - introducing changes in source code ). The problem is the same for three BPEL elements : For Each On Alarm Event On Event Those elements was modified in recent BPEL spec with replacing activity as child element to scope element child. As consequence in current BPEL OM was introduced interface ScopeHolder. The problem here appears due presence ScopeHolder interface that doesn't extends neither ActivityHolder interface nor CompositeActivity. This leads to lost information that got while source is synced with OM because class SyncUpdateVisitor didn't perform any changes in OM. ( It was implemented with old schema where scope could be child only in ActivityHolder interface or CompositeActivity interface ). So OM is desynced as result and we have this issue. The fix is - place additional logic in SyncUpdateVisitor when we have notifcation about Scope was added as child in some container. Containers ForEach, OnEvent, OnAlarmEvent should be handled with other logic. This logic will be introduced in impl. QA: - please check how this issue will be fixed with all three elements: forEach, etc. - please check that source modification for described element ( adding Scope as child into described container via source editor ) works well also. - introduced fix will be new functionality actually. So you also need to check correctness of appearing "scope" as child in container ( I mean here that scope should have correct position in his parent). For performing this check you need more children in container ( if any possible ) and perform undo/redo manipulation with scope. Scope should have correct position ( I beleive in all cases Scope is last element in children list ). Fix will be introduced into release55gavotte branch when I got it locally. And one more: I described the situation with fix with details because it can be discovered in future once again with other elements. The problem here is in appearing changes in BPEL spec. It is not obvious that new code should be added and old impl of Sync updater should be changed with new code respectively changes in BPEL schema. So as I said such situation could appear again with other elements after new changes in BPEL spec. This should be known. Currently I have added some assertion code that will help determine new situation with Scope. Actually this practice need to be used anywhere in methods of SyncUpdateVisitor. Any change of BPEL OM API interfaces that will lead to changes in Composite pattern will be caught immediately in this case. Fixed in gavotte branch. WinXP, NB5.5.1+ gavotte 070206 It can be reproduced with help the same steps: 1. create SynchrhonousSample 2.select process element in diagram 3. add EventHandler 4. select EventHandlers element add OnEvent element 5. DnD Scope from palette onto OnEvent element 6. DnD a Sequence onto diagram and drop it in the Scope1. 7. Ctrl-Z to undo last action -Ok 8. Ctrl-Z to undo last action -Ok 9. Now Ctrl-Y to redo last action - in source editor the Scope1 has been re-added, but it does not appar on diagram. 10.Now Ctrl-Y to redo last action - Exception java.lang.IllegalArgumentException: Could not find parent component at org.netbeans.modules.xml.xam.dom.AbstractDocumentModel.prepareSyncUnit(AbstractDocumentModel.java:273) at org.netbeans.modules.xml.xdm.xam.XDMListener.processChange(XDMListener.java:110) .... ------------------------------ After switching between Source View and Design view - java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor84.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.netbeans.modules.soa.ui.nodes.ReflectionNodeFactory.createNode(ReflectionNodeFactory.java:107) Denis, need your advise on this. Probably will postpone to FCS. Thank you very much Victoria, for catching this. This is exactly the original issue. We have lost code from release551 branch for fix. Need reintroduce it back and possibly all other lost code missed in realease551 branch.... *** Issue 94873 has been marked as a duplicate of this issue. *** Fixed via reintroducing integrations from release55gavotte branch into release551. NB 5.5.1 + gavotte-070211_4-windows There are no exceptions Thank You Denis and Scope appar on diagram after step 9 |