Introduction to Accelerators
Accelerators in Aletyx Playground are powerful templates that transform your standalone DMN models into fully structured projects ready for deployment. They automatically generate the necessary project structure, dependencies, and configuration files to create a working decision service. This guide will show you how to use accelerators to:- Convert your DMN model into a deployable project
- Understand the generated project structure
- Synchronize the project with a Git repository
- Prepare for deployment to various environments
Benefits of Using Accelerators
Accelerators provide several key advantages:- Consistency: Ensure all projects follow the same structure and conventions
- Efficiency: Eliminate manual project setup
- Best Practices: Automatically implement recommended patterns and configurations that can be shared across your organization
- Integration: Enable easier integration with other systems and services
- Deployment-Ready: Include necessary configurations for cloud deployments
Applying an Accelerator to Your DMN Model
Let’s use the vacation days model we created in the previous guide:- Open your “vacation-days” DMN model in Aletyx Playground
- Click the Apply Accelerator button in the toolbar
- From the accelerator options, select Decisions Kogito jBPM Profile This accelerator will generate a Java 17/Quarkus 3 project with:
- Maven project structure
- Required dependencies for DMN execution
- Deployment scripts for various environments
- Additional configurations for testing and monitoring
- Review the accelerator details and click Apply
- You’ll be prompted to provide a commit message (since this will create a versioned project)
- Enter a descriptive message like “Apply DMN accelerator to vacation days model”
- Click Commit
Understanding the Generated Project Structure
After applying the accelerator, your project will be transformed from a single DMN file into a complete Maven project. Let’s explore the key components:- Project Structure:
src/main/resources: Contains your DMN modelssrc/main/java: Contains any Java classes (may be empty initially)src/test: Contains test resources and classespom.xml: Maven project configuration.kie-sandbox: Configuration for Aletyx Playground
- Key Files:
pom.xml: Defines project dependencies and build configurationapplication.properties: Quarkus configurationREADME.md: Basic documentation for the project
- Configuration Details:
- Java 17 compatibility
- Quarkus 3.x dependencies
- Aletyx Enterprise Build of Kogito and Drools decision runtime dependencies
- Test dependencies for validation
Synchronizing with GitHub
To maintain version control and enable collaboration, you should synchronize your project with a Git repository:- Click the Share button in the toolbar
- Under Authentication source, select your GitHub account
- If you haven’t connected your GitHub account, you’ll need to authorize Aletyx Playground
- Click Create GitHub repository
- In the dialog:
- Enter a name for your repository (e.g., “vacation-days-decision-service”)
- Choose whether the repository should be public or private
- Click Create
- After the repository is created, you’ll see a confirmation message with a link to the new repository
Updating the Model and Pushing Changes
After making changes to your model in Aletyx Playground, you can push those changes to GitHub:- Make your desired updates to the DMN model
- Click the Commit button (or select it from the three-dot menu)
- Enter a descriptive commit message
- Click Commit to save the changes locally
- Click the Push button to send changes to GitHub
Customizing the Accelerator
If you need to customize the accelerator to match your organization’s standards:- Fork the accelerator repository: Aletyx Enterprise Build of Kogito and Drools Accelerators Repository
- Modify the accelerator templates according to your requirements
- Update the Aletyx Playground configuration to use your custom accelerator
- Adding organization-specific dependencies
- Incorporating security configurations
- Setting up pipeline scripts for your CI/CD environment
- Adding custom code generators or validators
Using Multiple Accelerators
You can apply different accelerators for different needs:- Basic Decision Service: Simple decision-only service
- Process-Enabled Decisions: Combine decisions with BPMN processes
- Event-Driven Decisions: Configure for Kafka integration
- Serverless Decisions: Set up for serverless deployment
Best Practices for Accelerators
When working with accelerators, follow these best practices:- Apply Early: Apply the accelerator early in the development process - as soon as the model is in a state to be in a repository
- Version Control: Always sync with version control after applying changes - changes only exist in your local storage
- Understand the Output: Take time to understand the generated project
- Testing: Run tests regularly to ensure everything works as expected
- Documentation: Keep documentation up-to-date with project evolution
What’s Next?
Now that you have a fully structured project, you’re ready to:- Deploy your decision service (covered in Basic Deployment Options)
- Integrate with other services in your architecture
- Implement testing and validation
- Set up continuous integration and deployment