Skip to content

Automatically packages a Graph View Definition and all of its related rows

License

Notifications You must be signed in to change notification settings

ArasLabs/package-graphnav-definition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Package Graph View Definition

This project adds an action to Aras Graph Navigation that automatically packages a Graph View Definition and all of its related rows. It collects the graph view, its nodes, connectors, item type rows, default cards, related view cards, and the underlying query definition into a single package so you can export and migrate it cleanly.

When the action finishes, it automatically opens the owning Package Definition so you can review or export it.

Graph View Definition action screenshot

Features

  • Adds an Item / Client action on Graph View Definition:
    • labs_GraphViewDefinitionPackage
  • Packages:
    • The selected gn_GraphViewDefinition
    • Related gn_GraphViewItemType, gn_GVDefaultCard, gn_GraphViewNode, gn_GraphViewConnector
    • Any gn_ViewCard referenced by default cards
    • The linked qry_QueryDefinition (if present)
  • Reuses the Graph View’s existing package, if it’s already packaged
  • Otherwise, creates/reuses a generic package:
    • PackageDefinition: GraphViews.Package
    • PackageGroup: Graph View Definition
  • Safe dependency behavior:
    • If any required element is already owned by a different package, the method returns an error and makes no changes
    • No PackageDependsOn relationships are created automatically
  • Automatically opens the resulting PackageDefinition in a new tab

Prerequisites

  • Aras Innovator installed (Release 33 or later recommended)
  • Graph Navigation solution installed
  • Aras Package Import Utility

Installation

Important! Always back up your code tree and database before applying an import package or code tree patch!

Pre-requisites

  • Aras Innovator installed
  • Aras Package Import Utility
  • This project’s import package (manifest and related files)

Install Steps

  1. Back up your database and store the BAK file in a safe place.
  2. Open the Aras Package Import tool.
  3. Enter your login credentials and click Login.
    • Note: you must log in as root for the package import to succeed.
  4. In TargetRelease, enter the Innovator release this package targets (for example: 33).
  5. In Manifest File, enter the path to this project’s imports.mf file, e.g.: ..\GraphViewPackager\imports.mf
  6. In Available for Import, select the package from this project (for example: aras.labs.PackageGraphViewDefinition).
  7. Set Type = Merge and Mode = Thorough Mode.
  8. Click Import.
  9. Close the Aras Package Import tool.

After import, the Graph View Definition ItemType will have a new client action configured.

Usage

  1. Log in to Innovator as an administrator or a user with rights to run the action.
  2. Navigate to: Administration > Configuration > Graph Navigation > Graph View Definition
  3. Open the Graph View Definition you want to package.
  4. Click the Package Full Graph Definition action.
  5. The client method will:
    • Find the current Graph View Definition ID.
    • Call the server method to package the graph and its related rows.
    • If packaging succeeds, show a confirmation and open the Package Definition that owns this graph view.
  6. In the opened Package Definition:
    • Look for the “Graph View Definition” group (or the existing group that already contained the graph).
    • You should see:
      • The gn_GraphViewDefinition itself
      • Its graph navigation rows
      • Any included gn_ViewCard and qry_QueryDefinition elements

Notes on Error Messages

  • If any required element (for example a View Card or Query Definition) is already owned by a different package:
    • The method returns an error like: Packaging failed: one or more required elements are already packaged in another package...
    • No elements are added or changed.
  • If the graph view is already packaged in an out-of-the-box package (such as com.aras.innovator.solution.SA), that package will open and the existing group is reused.

Credits

Created by Matt Toppi for Aras Labs. GitHub: @matttoppi

License

MIT License – see the LICENSE file for details.

About

Automatically packages a Graph View Definition and all of its related rows

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published