Download the PHP package spryker-community/oms-visualizer without Composer
On this page you can find all versions of the php package spryker-community/oms-visualizer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spryker-community/oms-visualizer
More information about spryker-community/oms-visualizer
Files in spryker-community/oms-visualizer
Package oms-visualizer
Short Description OmsVisualizer - visualize OMS workflow with mermaid
License MIT
Homepage https://github.com/spryker-community/oms-visualizer
Informations about the package oms-visualizer
OMS Visualizer
A modern visualization tool for Spryker OMS (Order Management System) process flows. This package provides an enhanced, user-friendly way to visualize and interact with OMS graphs in your Spryker application.
✓ Tested with Spryker B2B-Demoshop 202410.0
Features
- Modern, interactive visualization of OMS process flows
- Easy integration with existing Spryker projects
- Built on Mermaid JS for reliable and attractive graph rendering
- Background-, Font- and Graph-Colors can be changed via config
- Zoom-In and Zoom-Out
- Highlighting Start-, Final-, Failed- and Dead-States
Setup
1. Install Package
Install the package via Composer:
2. Integrate ZED Controller
To make the OMS Visualizer accessible through your Spryker application, follow these steps:
-
Add the
SprykerCommunitynamespace toCORE_NAMESPACESin your project'sconfig_default.phpfile: - Run the following console commands inside the
docker/sdk clito update caches:
These commands refresh the router cache, generate transfer objects, and warm up the Twig template cache to ensure your changes take effect.
3. Install Frontend Assets
The OMS Visualizer uses Mermaid JS for graph visualization. Follow these steps to install the necessary frontend dependencies and assets:
-
Add the
spryker-communityworkspace to the rootpackage.jsonof your project: -
Install all JavaScript dependencies from the
/vendor/spryker-communitydirectory and compile them for use in your Zed application: -
Create a new file at
./frontend/zed/build.jswith the following content: - Update your project's
package.jsonfile to include your./frontend/zed/build.jsas build script:
Note: Replace "other-scripts" with your existing script entries.
- Run the build command to install and compile the frontend assets:
4. Add navigation entry
To have a separate navigation menu for the new OMS Visualizer, copy the content from src/SprykerCommunity/Zed/Communication/navigation.xml into your config/Zed/navigation.xml.
Clear the cache for navigation:
Troubleshooting
Common Issues
Incompatible Version of Chevrotain
If you encounter errors related to the chevrotain npm module, you may need to install a compatible version:
This resolves a breaking dependency issue that can occur with newer versions of the package.
Usage
After installation, you can access the OMS Visualizer through your Zed application's interface. Navigate to the OMS section to view and interact with your process flow visualizations.
Development
Running Tests
The OMS Visualizer includes a suite of unit tests to ensure code quality and functionality. To run the tests:
-
Make sure you have installed the development dependencies:
- Run the PHPUnit test suite:
The test suite includes:
- Unit tests for the OmsVisualizerFacade
- Tests for the FlowChartRenderer
- Tests for state styling and creation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues or have questions, please open an issue in the GitHub repository.
License
This package is released under the MIT license.