fmorbini / scxmlgui

A graphical user interface for editing SCXML finite state machines.
Other
104 stars 37 forks source link

Outsourcing using xi:include is a one-way operation #85

Open Bwooce opened 8 years ago

Bwooce commented 8 years ago

Hi,

It looks like that if I use the xi:include option for outsourcing a state then it displays and saves okay, but on reloading can't find the included state and the whole graph becomes corrupted. It's 100% if I use the (now deprecated? removed?) src option to include states.

The problem may only appear when the included file doesn't exist (and contain the state referenced) but it doesn't fail gracefully.

Stack trace/Log: Parsing file: /Users/bruce/start.scxml add edge: start->[get_config] add edge: get_config->[inital_greeting] add edge: get_config->[end] add edge: inital_greeting->[end] add edge: inital_greeting->[recharge] add edge: inital_greeting->[balance] add edge: inital_greeting->[payment] add edge: inital_greeting->[offer_transfer] add edge: recharge->[end] add edge: balance->[end] payment.scxml add edge: offer_transfer->[transfer_to_agent] add edge: offer_transfer->[say_bye] add edge: offer_transfer->[end] add edge: transfer_to_agent->[end] add edge: say_bye->[end] Done reading file Populating graph. add edge ({}->{})to graph: transfer_to_agent-[,]->[end] add edge ({}->{})to graph: say_bye-[,]->[end] add edge ({}->{})to graph: inital_greeting-[,balance]->[balance] add edge ({}->{})to graph: inital_greeting-[,recharge]->[recharge] add edge ({}->{})to graph: inital_greeting-[,]->[end] java.lang.Exception: Target 'payment' for edge: inital_greeting-[,payment]->[payment] not found. at com.mxgraph.examples.swing.editor.fileimportexport.SCXMLImportExport.addOrUpdateEdge(SCXMLImportExport.java:569) at com.mxgraph.examples.swing.editor.fileimportexport.SCXMLImportExport.populateGraph(SCXMLImportExport.java:551) at com.mxgraph.examples.swing.editor.fileimportexport.SCXMLImportExport.readInGraph(SCXMLImportExport.java:471) at com.mxgraph.examples.swing.editor.fileimportexport.SCXMLImportExport.read(SCXMLImportExport.java:504) ...

fmorbini commented 8 years ago

Hi, could you include an example and instructions to reproduce the problem? thank you