Thank you for your interest in contributing! This document covers the contribution process and coding standards.
- JDK 17+
- Maven 3.6+
- Git
git clone https://github.com/project-openan/workflow-engine-sdk-java.git
cd workflow-engine-sdk-java
mvn -B clean verifyworkflow-engine-sdk-java/
|-- workflow-engine/ SDK engine module
| +-- src/main/java/dev/openan/workflow/engine/
| |-- client/ A2A transport, authentication, extensions, runtime APIs
| |-- control/ User-facing: ControlPoint, EventCallback, EventType
| |-- core/ WorkflowExecutor (public), ContextBuilder (package-private)
| |-- model/ Data models
| |-- registry/ LoadPsop, RegistryClient
| |-- util/ Shared redaction and utility support
| +-- runner/ ExecutePsop (entry point)
|-- samples/ Demo applications
|-- docs/ Documentation
|-- pom.xml Parent POM (reactor)
- Java 17 language features (records, sealed, switch expressions)
- Methods should not exceed 50 lines; extract subroutines
- No raw
Objecttypes where a specific type exists - Suppress warnings only when unavoidable; prefer type-safe alternatives
- Package-private for internal classes;
publiconly for user-facing API - All public methods must have Javadoc
- Source files: UTF-8
- No BOM in source files
- Maven
sourceEncodingis UTF-8 in the parent POM
Every Java file must start with the Apache 2.0 license header:
/*
* Copyright (c) 2026 Huawei Technologies Co., Ltd.
* All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/PascalCasefor classes,camelCasefor methods/variablesUPPER_SNAKE_CASEfor constants- Interface names: nouns or adjectives (
WorkflowEngineClient,AuthProvider) - Builder classes: nested
Builderstatic class
- SLF4J Logger per class
- INFO: key lifecycle events, auth success/failure, negotiation rounds
- DEBUG: full message content, prompt text, response details
- WARN: recoverable failures, fallbacks
- ERROR: auth failures, agent call failures
- Dedicated
PROTOCOLlogger for protocol-level request/response dumps - Always anonymize credentials; protocol bodies have configurable size limits and sensitive-data redaction
- JUnit 5
- Unit tests for all public methods
- Integration tests for end-to-end workflows
- Run the complete reactor:
mvn -B clean verify;-ois only for a fully populated local dependency cache
- Fork the repository and create a feature branch
- Write code following the standards above
- Add/update tests
- Run
mvn -B clean verifyand ensure all tests pass (including samples) - Add DCO signoff to your commit:
Signed-off-by: Your Name <your.email@example.com> - Use conventional commit messages:
feat:new featurefix:bug fixdocs:documentationrefactor:code restructuringtest:test additionschore:build/config
- Ensure your branch is up to date with
main - Squash unrelated commits
- Write a clear PR description with:
- What changed and why
- Any breaking changes
- Test results
- Link related issues
- Use GitHub Issues
- Include: Java version, Maven version, error log, reproduction steps
- For protocol issues: include the
PROTOCOLlogger output
- Run the complete
mvn -B clean verifyreactor; sample failures block release. - Documentation code snippets are compiled by DocumentedCallbackExampleTest; HostQuickStartTest executes the minimal host flow.
- Check required-input negotiation, final serialized protocol logs, independent extension lifecycle, cancellation and secret anonymization.
- Verify published POM coordinates, sources/Javadoc artifacts and the absence of private configuration/reference documents.
- Record the tested commit and Surefire reports. Offline providers and local protocol simulators are not live acceptance.
- Live model and dispatched-agent validation requires authorized endpoints and a separate acceptance record. Never commit customer integration notes.
- Do not publish, tag, or push as a side effect of running tests.