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
- Initiate Package Creation:
- Navigate to your Martini instance and begin the process to create a new Martini package.
-
Note: If you change your mind about the target instance, you can select a different one later in the process.
-
Fill in Package Details:
- In the package creation wizard, you will need to:
- Confirm or select the instance where the package will be created.
- Specify a unique name for your package within the instance.
- Enter the marketplace ID for your package (e.g.,
com.company.app
). - Define the version of your package.
- Decide whether to start the package immediately upon creation.
- Complete the wizard by clicking Finish.
Naming Conventions
We recommend the following naming conventions for Martini packages:
- Use nouns.
- Include only alphanumeric and lowercase characters, with words separated by dashes.
- Choose descriptive yet simple words that indicate the package's purpose.
Examples:
- subscription-management-system
- chatops-sales-team
- employee-onboarding
- stock-price-alerts
Invalid names for Martini packages 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 ('code') Directories
In Martini Designer's Navigator the code
directory from the file system is displayed as a Logic
folder. This folder is intended to contain workflow, service, API, or data model files. Sub-folders of the Logic
folder should:
- Contain only alphanumeric characters.
- Be written in lowercase letters.
- Not include keywords.
By default Martini Designer will create a sub folder under the Logic
folder with the same name as the Package replacing any hyphens with underscores.
For example, if the Package name was my-package
then Martini Designer will automatically create a sub folder under the Logic
folder called my_package
. The purpose of of this is to prevent a namespace conflict.
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.
Example Structure:
1 2 3 4 5 |
|
my_package.services.MyIntegrationService
. Note that the code
directory (represented by the Logic
folder in the Navigator) is not included in the namespace.
File Organization
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.
-
Select the package(s) you intend to delete in the interface.
-
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).
Warning
- Be cautious when deleting a package, as this action permanently removes all associated applications and could impact other components that depend on it.