Skip to content

Repository files navigation

WebMethods Asset Detection Plugin

A comprehensive plugin for detecting and analyzing My Webmethods Server (MWS) and Integration Server (IS) assets in webMethods projects.

🔌 Plugin for Wavelength Architecture Decoder | 📖 Integration Guide | 🚀 Quick Start

🌟 Plugin Architecture

This plugin demonstrates the powerful plugin architecture of the Wavelength Architecture Decoder. It showcases how domain-specific asset detection can be seamlessly integrated into a generic architecture analysis tool without requiring any domain-specific code in the decoder itself.

Key Architectural Principles

1. Plugin Adapts to Decoder's Data Model

  • The plugin detects webMethods-specific assets (IS packages, MWS assets, CAF configurations)
  • But converts them to the decoder's generic CodeElement and CodeRelationship format
  • The decoder has zero knowledge of webMethods internals

2. Zero Coupling

  • Plugin is a separate repository - no code copying needed
  • Decoder calls plugin via subprocess (Python script)
  • Plugin outputs JSON, decoder generically deserializes
  • No webMethods-specific code in the decoder codebase

3. Language Flexibility

  • Plugin written in Python (could be Node.js, Rust, Go, etc.)
  • Decoder written in Rust
  • Communication via JSON - language agnostic

4. Extensibility Pattern

  • This plugin serves as a reference implementation
  • Want to detect Salesforce assets? SAP modules? Custom enterprise platforms?
  • Follow this pattern - create your own plugin repository
  • No decoder modifications needed

What This Enables

✅ Domain-Specific Detection: Detect webMethods IS packages, services, adapters, MWS assets
✅ Relationship Mapping: Map package → service, service → service relationships
✅ Knowledge Graph Integration: All detected assets appear in the interactive knowledge graph
✅ Generic Storage: Assets stored as generic code elements - works with all decoder features
✅ Independent Development: Plugin can evolve independently without affecting decoder
✅ Reusable Pattern: Use this plugin as a template for other domain plugins

Quick Start

For Wavelength Architecture Decoder Users

Add webMethods detection to your decoder in 2 steps:

# 1. Copy the plugin configuration
cp webmethods.json ../wavelength-arch-decoder/config/plugins/webmethods.json

# 2. Restart the decoder
cd ../wavelength-arch-decoder && cargo run --release

The plugin will automatically detect webMethods services during repository analysis. See the Integration Guide for details.

Standalone Usage

# Install and run standalone
pip install -r requirements.txt
python -m webm_asset_plugin detect /path/to/webmethods/project --report report.html

Overview

This plugin implements detection patterns to automatically identify and classify webMethods assets in repositories.

It can be used:

Features

  • MWS Asset Detection: Detects 10 types of My Webmethods Server assets

    • Access Privileges
    • Business Calendars
    • CAF Applications
    • CAF Runtime Configurations
    • Security Realms
    • Shells and Shell Rules
    • Skins and Skin Rules
    • Start Page Rules
    • Tasks and Task Rules
    • Users
  • Integration Server Package Detection: Identifies IS packages and their structure

    • Package manifest detection (manifest.v3)
    • Namespace detection (ns/ directories)
    • Service detection (flow.xml, node.ndf)
    • Package properties detection
  • Project Structure Analysis: Analyzes webMethods project layouts

    • project.properties parsing
    • Directory structure validation
    • Asset path detection
  • XML Content Analysis: Parses XML files to detect asset types by root elements

  • Comprehensive Reporting: Generates detailed reports of detected assets

Installation

Requirements

  • Python 3.9+ (for the plugin itself)
  • Rust (only needed if integrating with the Wavelength Architecture Decoder, which is written in Rust)
  • pip (Python package manager)

Standalone Installation

# Clone or navigate to the plugin directory
cd wavelength-arch-decoder-webm-asset-plugin

# Install Python dependencies
pip install -r requirements.txt

Note: The plugin is Python-only. No Rust compilation is required for standalone usage.

Integration with Wavelength Architecture Decoder

To add this plugin to the Wavelength Architecture Decoder:

Prerequisites:

  • Rust toolchain installed (for building the decoder)
  • Python 3.9+ installed (for the plugin to run)

Setup Steps:

# Step 1: Install plugin dependencies (one-time)
cd wavelength-arch-decoder-webm-asset-plugin
pip install -r requirements.txt

# Step 2: Copy the plugin configuration file
cp webmethods.json ../wavelength-arch-decoder/config/plugins/webmethods.json

# Step 3: Ensure plugin directory is accessible
# The decoder looks for the plugin in these locations (in order):
#   - ../wavelength-arch-decoder-webm-asset-plugin (sibling directory) ← Recommended
#   - ../../wavelength-arch-decoder-webm-asset-plugin
#   - wavelength-arch-decoder-webm-asset-plugin (current directory)
#
# Recommended directory structure:
#   wavelength-dev/
#   ├── wavelength-arch-decoder/          # Decoder
#   └── wavelength-arch-decoder-webm-asset-plugin/  # Plugin (sibling)

# Step 4: Build and run the decoder
cd ../wavelength-arch-decoder
cargo build --release
cargo run --release

Important Notes:

  • ✅ No compilation needed - Plugin is pure Python, no Rust build required
  • ✅ No moving needed - Plugin stays in its own directory
  • ✅ Just copy JSON config - Only webmethods.json needs to be copied
  • ✅ Automatic detection - Decoder calls Python plugin via subprocess

How it works:

  • The decoder (Rust) calls the Python plugin via subprocess: python3 -c "import plugin; ..."
  • The plugin returns JSON data with detected assets
  • The decoder converts the JSON to code elements and stores them in the database
  • No build step - decoder imports Python module directly

The plugin will be automatically loaded and webMethods assets (IS packages, services, adapters, MWS assets) will be detected during repository analysis.

For plugin developers: See Plugin Developer Guide for development workflow.

See the Integration Guide and Plugin Integration Details for more information.

Usage

Command Line Interface

# Analyze a repository
python -m webm_asset_plugin detect /path/to/repository

# Generate detailed report
python -m webm_asset_plugin detect /path/to/repository --report report.html

# Output JSON format
python -m webm_asset_plugin detect /path/to/repository --format json

# Verbose output
python -m webm_asset_plugin detect /path/to/repository --verbose

Python API

from webm_asset_plugin import WebMethodsAssetDetector

detector = WebMethodsAssetDetector()
results = detector.detect_assets("/path/to/repository")

print(f"Found {len(results.mws_assets)} MWS assets")
print(f"Found {len(results.is_packages)} IS packages")

Detection Patterns

MWS Detection

The plugin detects MWS assets through:

  1. Directory Structure: Checks for assets/MWS/ or path from project.properties
  2. File Patterns: Looks for xmlImport.xml and asset-specific XML files
  3. XML Content: Parses XML files to identify root elements matching MWS asset types

IS Detection

The plugin detects IS packages through:

  1. Manifest Files: Finds manifest.v3 files in package directories
  2. Namespace Structure: Detects ns/<namespace>/ directory patterns
  3. Service Files: Identifies flow.xml and node.ndf files
  4. Package Properties: Reads package.properties files

Output Format

The plugin generates structured output containing:

{
    "is_webmethods_project": bool,
    "project_type": "MWS" | "IS" | "BOTH" | None,
    "mws_assets": [
        {
            "type": str,  # e.g., "MWS_AccessPrivilege"
            "file": str,  # File path
            "root_element": str,  # XML root element
            "metadata": dict  # Additional metadata
        }
    ],
    "is_packages": [
        {
            "name": str,
            "path": str,
            "manifest": str,
            "version": str,
            "namespace": str,
            "services": [
                {
                    "name": str,
                    "flow": str,
                    "type": str
                }
            ]
        }
    ],
    "project_properties": dict,
    "detection_summary": {
        "mws_assets_count": int,
        "is_packages_count": int,
        "total_assets": int
    }
}

Integration with Wavelength Architecture Decoder

This plugin integrates seamlessly with the Wavelength Architecture Decoder to enhance service detection for webMethods projects.

Quick Integration (Recommended)

The easiest way to add webMethods detection to the Architecture Decoder:

# Copy the plugin configuration to the decoder
cp webmethods.json ../wavelength-arch-decoder/config/plugins/webmethods.json

# Or use the automated script
./test_with_decoder.sh

That's it! The decoder will automatically load the plugin on startup and detect webMethods-related services.

What Gets Detected

When integrated with the Architecture Decoder, this plugin enables detection of:

Integration Server (IS) Assets:

  • IS Packages: Detected via manifest.v3 files
  • IS Services: Detected via flow.xml and node.ndf files
  • IS Adapters/Connectors: Detected in adapters/ directories
  • IS Code Files: Java, JavaScript, Groovy, Scala, Kotlin files within packages
  • Package Dependencies: Extracted from manifest.v3 requires field

My Webmethods Server (MWS) Assets:

  • 13 MWS Asset Types: Context, Folder, Include, Access Privilege, Business Calendar, CAF Application, Security Realm, Shell, Skin, Start Page Rule, Task, User, and more
  • Extracted from: xmlImport.xml files (recursive parsing)

CAF/OpenUI Assets:

  • App Navigation: app-nav.xml with page counts
  • Faces Configuration: faces-config.xml with managed beans
  • Portlet Configurations: portlet.xml, wm-portlet.xml
  • Web Configuration: web.xml
  • Facelets Views: .xhtml files
  • Legacy Views: .view files

Relationships:

  • IS Package → IS Services: "contains" relationships
  • IS Service → IS Service: "calls" relationships (from flow.xml parsing)
  • IS Package → Dependencies: "depends_on" relationships
  • MWS Folder → MWS Assets: Hierarchical relationships

Service Pattern Detection (via JSON config):

  • Environment Variables: WEBMETHODS_*, MWS_*, IS_*, WM_*
  • SDK Patterns: webmethods, @webmethods/, softwareag
  • API Endpoints: webmethods.io, webmethods.com

Verification

After adding the plugin, restart the decoder server and check:

  1. Startup Logs: You should see:

    [INFO] Found X plugin(s) in config/plugins/: ..., webmethods, ...
    [INFO]   ✓ Loaded plugin: webmethods (4 env vars, 3 SDK patterns, 2 API endpoints)
    
  2. UI Footer: The footer will display:

    Plugins: ..., webmethods
    
  3. API Endpoint: Query the plugins endpoint:

    curl http://localhost:8080/api/v1/plugins

Integration Options

  1. Service Pattern Plugin (Recommended): Adds webMethods service detection patterns
  2. Standalone Analyzer: Run detailed asset analysis separately for comprehensive reports
  3. Combined Workflow: Use both together for complete webMethods project analysis

Documentation

Examples

Example 1: Basic Detection

python -m webm_asset_plugin detect ./my-webmethods-project

Example 2: Generate Report

python -m webm_asset_plugin detect ./my-webmethods-project --report webmethods-report.html

Example 3: JSON Output

python -m webm_asset_plugin detect ./my-webmethods-project --format json > assets.json

Project Structure

wavelength-arch-decoder-webm-asset-plugin/
├── README.md
├── requirements.txt
├── setup.py
├── webm_asset_plugin/
│   ├── __init__.py
│   ├── detector.py          # Main detection logic
│   ├── mws_detector.py      # MWS asset detection
│   ├── is_detector.py       # IS package detection
│   ├── xml_parser.py        # XML parsing utilities
│   ├── project_parser.py    # project.properties parsing
│   └── reporter.py          # Report generation
├── tests/
│   ├── test_mws_detection.py
│   ├── test_is_detection.py
│   └── fixtures/
└── examples/
    └── example_usage.py

Related Projects

Tested Repositories

This tool has been tested with the following repositories:

References

License

MIT License - See LICENSE file for details.

About

Plugin for Wavelength Architecture Decoder to understand webMethods Assets

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages