0 Replies Latest reply on Sep 20, 2012 2:38 PM by Rob Cernich

    Working with Generated Configuration in the SY Editor

    Rob Cernich Master

      Hey all,

       

      I've recently added support to the SwitchYard editor which visualizes generated configuration details (i.e. configuration provided by a scanner class configured on SwitchYard's Maven "configure" mojo) within the editor.  The generated configuration are identified in the editor by placing a dash-lined box around the corresponding figures.

       

      In addition to visualizing the generated configuration, a new tool has been added to the main figure which will synchronize the editor with the generated configuration file.  The editor must be in a "clean" state (i.e. contains no changes) when synchronization is triggered.  Synchronization will occur automatically if the generated file is updated (e.g. if a build is triggered) and the editor is in a clean state, otherwise manual synchronization is required (although, that requires a save, which will trigger an auto-synchronize when the build completes, so saving should be enough).  Undo is not supported for synchronization operations.

       

      That said, there are a few issues to be aware of:

      • Artifacts created using tooling defaults may not match generated configuration, resulting in two items appearing in the configuration (e.g. bean scanner uses ServiceName for component name, whereas the tools use the class name, which would default to ServiceNameBean).
      • The editor may get dirty after a save.  This is usually the result of the order of objects changing in the generated configuration file, which causes the associated diagram file to be saved again.  If you don't save, it's OK, but the objects in the diagram may change figures the next time you open the file (i.e. most of the figures are associated with their confiugration object by position).  This may cause you to rearrange the figures the next time you open the file.

       

      At this point, I'm not sure if I like how synchronization works, but it keeps the editor in sync and prevents weird problems when merging the generated config with the source config.  Anyway, please play around with it a bit and let me know what you think.

       

      As always, JIRA is available for any issues you come across.

       

      Here's a screenshot:

      sy_merged.gif

       

      Best,

      Rob