This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
NASA-AMMOS Common Workflow Service (CWS) is an enterprise workflow management platform built on top of Camunda BPMN Engine. It provides an intuitive user interface, auditable logging, extensibility with code snippets, adaptation layers, and a powerful external task engine for mission-critical workflow automation.
- Java 17 JDK (required - cannot use JRE)
- Maven 3.9.6+
- Docker with recommended resources: 5 CPUs, 14GB Memory, 1GB Swap, 64GB Disk
- MariaDB/MySQL database
- Elasticsearch 8.12.0+ cluster
- ITerm2 (for development scripts)
docker run -d -p 3306:3306 -e MYSQL_DATABASE=__DB_NAME__ -e MYSQL_ROOT_PASSWORD=__ROOT_PW__ -e TZ=America/Los_Angeles --name mdb1011 mariadb:10.11cd install/docker/es-only
docker-compose up./build.shThis command:
- Cleans module library directories
- Runs
mvn -DskipTests -Dskip.integration.tests clean install -P core - Creates server distribution via
create_server_dist.sh
Create a personal development script (e.g., jsmith.sh) that calls dev.sh with configuration parameters:
./dev.sh ROOT_DIR USERNAME DB_TYPE DB_HOST DB_PORT DB_NAME DB_USER DB_PASS ES_PROTOCOL ES_HOST ES_INDEX_PREFIX ES_PORT ES_USE_AUTH ES_USERNAME ES_PASSWORD CLOUD SECURITY HOSTNAME EMAIL_LIST ADMIN_FIRST ADMIN_LAST ADMIN_EMAIL NUM_WORKERS WORKER_MAX_PROCS WORKER_ABANDONED_DAYS./test.sh # Runs unit tests and integration tests with JaCoCo coverage./stop_dev.shmvn dependency-check:check
# or
mvn dependency-check:aggregateTo run individual tests, use Maven directly:
mvn test -Dtest=ClassName#methodName
mvn integration-test -Dit.test=IntegrationTestClassCWS follows a layered service-oriented architecture with these key modules:
- cws-core: Foundation layer with configuration, database services, logging, security
- cws-tasks: BPMN task implementations (Email, CommandLine, REST, File operations)
- cws-service: Business logic layer with process initiators, scheduling, REST APIs
- cws-engine-service: Engine-specific services and external task handling
- cws-engine: Camunda engine integration (WAR)
- cws-adaptation: Project-specific customizations
- cws-ui: Web-based user interface (WAR)
- cws-installer: Installation and configuration utilities
- cws-test: Integration and system testing framework
- Spring Framework 7.0.6: Dependency injection, web services, transactions
- Camunda BPM 7.24.6-ee: Workflow engine and BPMN execution
- Apache Artemis: Message queue for external task communication
- MyBatis: Database ORM and query mapping
- Apache Tomcat 11.0.20: Application server
cws-core (foundation)
├── cws-tasks (depends on cws-core)
├── cws-service (depends on cws-core)
├── cws-installer (depends on cws-core)
└── cws-engine-service (depends on cws-core, cws-tasks)
├── cws-adaptation-engine (depends on cws-engine-service)
└── cws-engine [WAR] (depends on cws-adaptation-engine)
└── cws-adaptation (depends on cws-service, cws-core)
└── cws-ui [WAR] (depends on cws-adaptation)
- pom.xml: Root Maven configuration with dependency management
- utils.sh: Shell utility functions and environment settings (CWS_VER, CAMUNDA_VER, TOMCAT_VER)
- install/installerPresets.properties: Default configuration properties
- install/example-cws-configuration.properties: Example configuration
- owasp-suppressions.xml: OWASP dependency check suppressions
- version-rules.xml: Maven version management rules
- CWS Version: 2.8.0 (update this each CWS release)
- Camunda Version: 7.24.6-ee
- Tomcat Version: 11.0.20
- Java Version: 17 (enforced by Maven)
- SSL certificates required in
install/.keystoreandinstall/tomcat_lib/cws_truststore.jks - Keystore password stored in
~/.cws/credswith 400 permissions - LDAP integration for enterprise authentication
- Multiple security filters (LDAP, Camunda, general web security)
- Supports MariaDB and MySQL
- Uses MyBatis for ORM and database access
- Database setup and validation handled by cws-installer module
- All database operations centralized through cws-core's DbService
- Uses Apache Artemis (ActiveMQ) for message queuing
- Workers can run as separate JVM processes
- External task service in cws-engine-service handles task distribution
- Support for multiple worker types: run_all, run_models_only, run_external_tasks_only
- Centralized logging through cws-core logging framework
- Integration with Elasticsearch for log aggregation
- JaCoCo for code coverage reporting
- Swagger/OpenAPI for API documentation
- Extend
CwsTaskbase class in cws-tasks module - Follow template method pattern for task implementations
- Built-in tasks include: Email, CommandLine, REST operations, File operations, Sleep
- main: Release branch
- develop: Default development branch
- GitHub Actions workflows for Camunda and LDAP testing
- Docker-based deployment support
- OWASP dependency checking integrated into build process
- Maven enforcer plugin ensures Java 17 and Maven 3.9.6+ requirements
Always reference this architecture when making changes to ensure consistency with the layered service-oriented design and proper module separation.