Creating & Deleting Packages in Martini
Martini enables streamlined creation and deletion of packages, essential for managing your projects. This section guides you through the straightforward processes to create new packages for your applications and delete them when they are no longer needed, ensuring efficient management of your resources in Martini.
Creating a Martini Package
This section guides you through the process of creating a Martini package from scratch, which is essential for beginning integration work with Martini.
Steps to Create a Package
-
In the main menu click the + icon and then select Package
-
Fill in Package Details:
- Specify a unique name for your package within the instance.
- Define the version of your package.
- Choose the default package state when the package is created and upon each subsequent start of Martini. Options are
Started
,Loaded
, andUnloaded
. - Complete the wizard by clicking Create.
Package Naming Conventions
We recommend the following naming conventions for Martini packages:
1 2 3 |
|
Examples:
1 2 3 4 |
|
Invalid Names for Martini Packages
The following names will be rejected by the Package Manager due to potential conflicts with HTTP request mappings. Names that cannot be used include:
- api (or any value of the
api.rest.base-path
property) - api-explorer
- app
- assets
- broker
- coder-api
- document
- errors
- esb
- favicon.ico
- flux-api
- invoker
- license
- log
- logout
- martini
- notification
- oauth
- public
- reports
- rest
- setup
- soap
- static
- store
- system
- tracker
Logic Folder & Namespaces
In Martini Designer's Navigator each package contains a Logic folder that is used to store workflows, services, APIs, and data models.
By default, Martini Designer creates a sub-folder under Logic with the same name as the Package, replacing any hyphens with underscores.
For example, if a Package is named my-package
, Martini Designer will automatically create a sub-folder called my_package
under Logic to prevent namespace conflicts.
A namespace conflict occurs when two packages contain objects with identical namespaces. For example, if a service with the namespace my_package.MyIntegrationService
exists, creating another service with the same namespace in a different package will cause a conflict and is not allowed.
Package names are always unique. Therefore by creating a sub-folder under the Logic folder with the same name as the Package (replacing any hyphens with underscores), then namespace conflicts will be avoided.
Sub-folder Naming Rules: Sub-folders within the Logic folder should:
1 2 3 |
|
Example Structure:
1 2 3 4 5 |
|
my_package.services.MyIntegrationService
.
Logic folder on the file system is called Code
Note: On the file system, the Logic folder shown in Martini Designer's navigator corresponds to the code
directory.
Folder & File Naming Conventions
How files are organized should depend on the standards set by the developer or company using Martini. Once a set of standards is chosen, consistency is key for easier code maintenance.
We recommend organizing workflows, services, APIs, and models by feature instead of by file type:
Example by Feature:
1 2 3 4 5 6 7 8 9 10 11 |
|
Example by File Type:
1 2 3 4 5 6 7 8 9 10 11 |
|
Deleting Martini Packages
Deleting a Martini package is an irreversible action that removes all its contents and associated applications from the instance.
Steps to Delete a Package
-
Prepare for Deletion:
- Ensure that the package(s) you want to delete are stopped and not in use. To stop a package right click it and select Stop from the context menu.
-
Execute Deletion:
- Right-click on the selected package(s).
- Choose the Delete option from the context menu.
- Confirm your decision to permanently delete the package(s).
Caution required when deleting packages
Warning: Be cautious when deleting a package, as this action permanently removes all associated applications and could impact other components that depend on it.