Skip to content

doc: sample project#58

Merged
tilwbr merged 26 commits intomainfrom
create-sample-project
Mar 26, 2026
Merged

doc: sample project#58
tilwbr merged 26 commits intomainfrom
create-sample-project

Conversation

@Kronprinz03
Copy link
Copy Markdown
Contributor

Have you...

  • Added relevant entry to the change log?

Copy link
Copy Markdown
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR adds a status-management sample project based on the CAP bookshop template, but several issues need attention before it is ready:

  1. Invalid namespace (index.cds): sap.capire.status-management uses a hyphen which is illegal in CDS identifiers and will cause compilation failures.
  2. Empty BPM process IDs (admin-service.cds): Both @bpm.process.start and @bpm.process.cancel have id: '', meaning the plugin cannot bind to any real process at runtime — the core purpose of this sample is non-functional as-is.
  3. Null coercion bug (admin-service.js): When the table is empty, max(ID) returns null and null + 4 silently coerces to 4 — the null case should be handled explicitly.
  4. Mismatched package metadata (package.json): The name, description, and repository still point to the generic bookshop template rather than the status-management sample.
  5. Typo (requests.http): "AdmingService" should be "AdminService".

The most critical blockers are the invalid namespace and the empty process IDs, as they would prevent the sample from running or demonstrating its intended BPM integration.

PR Bot Information

Version: 1.19.3 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 8b8c9720-281f-11f1-890c-1795decb4e1e
  • Event Trigger: pull_request.opened

@tilwbr tilwbr force-pushed the create-sample-project branch from 7364af9 to 5c394a3 Compare March 25, 2026 14:10
@SirSimon04 SirSimon04 changed the title chore: sample project doc: sample project Mar 26, 2026
@tilwbr tilwbr force-pushed the create-sample-project branch from 390f181 to dcd0afc Compare March 26, 2026 14:16
@tilwbr tilwbr marked this pull request as ready for review March 26, 2026 15:29
@tilwbr tilwbr requested a review from a team as a code owner March 26, 2026 15:29
@hyperspace-insights
Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Add Status Management Sample Project

New Feature

✨ Introduces a new status-management sample project under tests/sample/ that demonstrates how to integrate SAP Build Process Automation (SBPA) workflows into a CAP bookshop application using the @cap-js/process plugin. The sample showcases both declarative and programmatic integration patterns for managing process lifecycles.

Changes

  • eslint.config.mjs: Added tests/sample/** to the ESLint ignore list to exclude the new sample project from linting.
  • package.json: Added tests/samples/status-management as a new workspace entry.
  • tests/sample/status-management/README.md: Comprehensive documentation covering the project overview, process flow diagrams, project structure, plugin usage patterns, and getting started instructions.
  • tests/sample/status-management/db/schema.cds: Domain model defining Books, Authors, and Genres entities.
  • tests/sample/status-management/srv/books-service.cds & books-service.js: BooksService exposing books with declarative process annotations and status enrichment via after('READ').
  • tests/sample/status-management/srv/books-process.cds: Declarative BPM annotations triggering the book approval process on CREATE (price > 50) and cancelling on UPDATE (price ≤ 50).
  • tests/sample/status-management/srv/authors-service.cds & authors-service.js: AuthorsService with fully programmatic process lifecycle — starting verification on CREATE and cancelling on DELETE.
  • tests/sample/status-management/srv/books-constraints.cds & authors-constraints.cds: Input validation annotations for Books, Authors, and Genres.
  • tests/sample/status-management/srv/cat-service.cds & cat-service.js: Read-only CatalogService for public book browsing with a submitOrder action.
  • tests/sample/status-management/srv/external/: Generated CDS service definitions for the BookApprovalProcessService and AuthorVerificationProcessService.
  • tests/sample/status-management/app/books/ & app/authors/: Two SAP Fiori Elements (List Report V4) applications with UI annotations, manifests, and OPA integration tests.
  • tests/sample/status-management/workflows/: SBPA workflow definition JSON files for the book approval and author verification processes.
  • tests/sample/status-management/db/data/: CSV seed data for Authors, Books, and Genres.
  • tests/sample/status-management/package.json: Sample project package configuration referencing @cap-js/process from the local workspace.
  • tests/sample/status-management/LICENSE: Apache 2.0 license file.

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.19.3 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Event Trigger: pull_request.ready_for_review
  • Correlation ID: 96eef770-2928-11f1-87ba-be3c70f748ca
  • Summary Prompt: Default Prompt
  • Output Template: Default Template
  • LLM: anthropic--claude-4.6-sonnet

💌 Have ideas or want to contribute? Create an issue and share your thoughts with us!
📑 Check out the documentation for more information.
📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

Made with ❤️ by Hyperspace.

Copy link
Copy Markdown
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR adds a well-structured sample project demonstrating declarative and programmatic SBPA process integration. The main blocking issue is the workspace path typo (tests/samples/ vs tests/sample/) which will break npm install. There are also logic concerns in the service handlers and a namespace inconsistency worth addressing before merging.

PR Bot Information

Version: 1.19.3 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Event Trigger: pull_request.ready_for_review
  • LLM: anthropic--claude-4.6-sonnet
  • Correlation ID: 96eef770-2928-11f1-87ba-be3c70f748ca

@tilwbr tilwbr merged commit d8cbbbd into main Mar 26, 2026
12 checks passed
@tilwbr tilwbr deleted the create-sample-project branch March 26, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants