Project Templates
Creating and Using Project Templates
Project templates facilitate the creation of new projects with a predetermined structure, ideal for projects that require a specific file set or dependency configuration. Project templates are a type of component and follow the same creation and deployment procedures as other components.
Creating a Project Template
Create a project template using YAML as follows:
The foundational details include slug
, orgSlug
, version
, name
, and type
.
Adding Components
Incorporate components into your project template by appending sections to the YAML file:
Sections available for defining stores, taxonomies, and assistants. To create a component, detail all necessary information or reference an existing component using the ref
property.
Project Options
Project support setting options, these will be available from the UI for the user to set as options.
Working with Assistants
Project templates also involve setting up assistants.
Assistant Connections
Define connections for an assistant using the connections
property, which specifies the events to respond to and their associated resources.
Here’s an example of a store subscription in the updated 6.3 format:
Kodexa recognizes these event types:
STORE
- Triggers the assistant when a document is added to the connected store.DOCUMENT_FAMILY
- Triggers when a document family is updated.DATA_OBJECT
- Triggers when the connected data object is updated.CHANNEL
- Triggers when a message is received on the connected channel.WORKSPACE
- Triggers when the workspace is updated with the save method.
For CHANNEL
or WORKSPACE
connections, providing the ref
is not necessary as the assistant connects based on its project association.
Workspaces
You can also define workspaces. The options can be set using availablePanels
, which controls the panels on the left. To display a panel, you must explicitly set it to true
.
To add a panel, call its id
under availablePanels
. Here are the options:
Make sure you deploy the project template YAML to the model. The changes only affect the workspace of new projects; existing ones remain unaffected by the model update. If you have Show Developer Tools
active, a Workspace Configuration
panel will be available for use. Here, you can select the panels you wish to have available in a workspace.