Dependencies
Introduction
Dependencies are ACE workspaces referenced in other ACE workspaces.
Conceptually, they are very similar to software code libraries - one library may link other libraries, but there is still an idea of a root library where everything comes together. The major difference is that ACE dependencies are merged instead of having isolation.
When to use dependencies?
Dependencies enable developers to work on separate ACE workspaces without having to conflict during development. They also make it easy to merge multiple workspaces into one final product.
Additionally, dependencies make it possible to alter parts of a workspace by overriding specific items, if necessary.
How to add dependencies?
Dependencies can be added by detailing them in the package.yaml
file.
After an ACE dependency is defined, it's read-only files will be visible in the folder view. Any of the dependency items can be referenced in the main workspaces items.
Features
Overriding
Dependencies are not isolated, which means two items with the same name will override eachother in the same order they are defined. This overriding behavior happens at any workspace level.
Overriding is both a feature and a limitation. It's important to be consider folder naming to avoid conflicts, but it also enables more powerful re-use.
Example
Assume an API from dependency workspace lib
called GET /policies
is using the flow getPolicies.yaml
.
If a "duplicate" flow called getPolicies.yaml
is created in the root workspace, that flow will be used instead of the original flow when
GET /policies
API is called.
/root
package.yaml # <--- This specifies use of '/lib' dependency
/flows
getPolicies.yaml # <--- This will be used by 'policies-get.yaml'
/lib
/flows
getPolicies.yaml # <--- This will be ignored by 'policies-get.yaml'
/apis
policies-get.yaml # <--- This specifies to use flow 'getPolicies.yaml'