2 Replies Latest reply on Feb 12, 2010 10:06 AM by Jessica King

    Cannot generate diagram when ampersand is used in expression

    Jessica King Newbie

      I have the following node in my jpdl (4.3 designer):

       

      <decision g="562,230,48,48" name="CorpIT"
              expr="#{(approvedAmount >= reqAmount || approver != null) && isHWSW && !approvedByCorpIT}">
              <transition g="1,-16" name="false" to="IsTotalApproved" />
              <transition g="-10,-17" name="true"
                  to="Approve Hardware/Software Purchase" />
          </decision>
      

       

      I've tried using &&, &, and \& with the same results. Once the change is made and I save, the following error is generated: "An error occurred while creating the diagram."

       

      The exception stace trace is:

      org.xml.sax.SAXParseException: The entity name must immediately follow the '&' in the entity reference.
          at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
          at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
          at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
          at org.jboss.tools.flow.jpdl4.io.JpdlDeserializer.deserialize(JpdlDeserializer.java:18)
          at org.jboss.tools.flow.jpdl4.multipage.editors.MultiPageEditor.doPageChangeFromXmlToJpdl(MultiPageEditor.java:98)
          at org.jboss.tools.flow.jpdl4.multipage.editors.MultiPageEditor.doSave(MultiPageEditor.java:132)
          at org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:151)
          at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:274)
          at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
          at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
          at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
          at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
          at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
          at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2579)
          at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:282)
          at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:261)
          at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:156)
          at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1357)
          at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3328)
          at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3341)
          at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:76)
          at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
          at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:185)
          at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execute(LegacyHandlerWrapper.java:109)
          at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
          at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
          at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
          at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:470)
          at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:824)
          at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:880)
          at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:569)
          at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:510)
          at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:125)
          at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
          at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1191)
          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
          at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040)
          at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036)
          at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1368)
          at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4053)
          at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:346)
          at org.eclipse.swt.widgets.Control.windowProc(Control.java:3946)
          at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:342)
          at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589)
          at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
          at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2410)
          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3471)
          at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
          at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
          at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
          at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
          at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
          at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
          at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
          at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
          at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
          at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
          at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

       

       

      Any ideas?