Skip to content

Add order management automation use case content#548

Open
pasindufernando1 wants to merge 4 commits into
wso2:mainfrom
pasindufernando1:useCases
Open

Add order management automation use case content#548
pasindufernando1 wants to merge 4 commits into
wso2:mainfrom
pasindufernando1:useCases

Conversation

@pasindufernando1

@pasindufernando1 pasindufernando1 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Purpose

Add order management automation use case content

Summary by CodeRabbit

  • Documentation
    • Added a new “Use Cases” guide for scheduled order-management automation: it polls a MySQL table for pending orders, sends customer notifications via SMTP, updates order statuses to avoid reprocessing, and includes Visual Designer steps (with early-exit), equivalent Ballerina code, and run/verification and reset instructions.
    • Added guidance on extending the solution with deployment/scheduling, richer notifications, additional channels, and further lifecycle steps.

Copilot AI review requested due to automatic review settings June 22, 2026 05:43
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 53babeef-9c1c-4c54-9a80-ee9df31a2fb0

📥 Commits

Reviewing files that changed from the base of the PR and between c0598fc and 3b690ec.

📒 Files selected for processing (1)
  • en/docs/guides/usecases/order-management-automation.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • en/docs/guides/usecases/order-management-automation.md

📝 Walkthrough

Walkthrough

A new guide documents a scheduled WSO2 Integrator automation that polls MySQL for PLACED orders, sends each customer an email, updates orders to PROCESSING, and logs progress. The guide includes database setup, Visual Designer steps, equivalent Ballerina code, verification steps, and next-step notes. A sidebar entry adds the guide under a new Use Cases category.

Changes

Order Management Automation Guide

Layer / File(s) Summary
Overview and database setup
en/docs/guides/usecases/order-management-automation.md
Front matter, guide overview, visual building blocks, prerequisites, and the SQL script that creates and seeds orders_db with sample customer, product, and order data.
Visual Designer flow
en/docs/guides/usecases/order-management-automation.md
Step-by-step Visual Designer instructions for creating the scheduled automation, configuring the MySQL connection and filtered row lookup, adding the no-orders early exit, and looping through orders to update status, send email, and log progress.
Generated code and verification
en/docs/guides/usecases/order-management-automation.md
The equivalent Ballerina code with typed records, polling logic, early return, looped updates and SMTP sends, on-fail handling, plus run, verification, reset, and next-step instructions.
Sidebar navigation
en/sidebars.ts
Adds a new Use Cases category in the Guides sidebar with a link to the order-management-automation guide.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 A little guide hops into view,
With orders to process and emails too.
If none are found, it turns away,
If some are placed, it works away.
Then logs the run and says, “All done!”
A tidy rabbit trail, job well spun.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only fills the Purpose section and omits the rest of the required template. Add the missing template sections, especially Goals, Approach, User stories, Release note, Documentation, Testing, and any applicable links or N/A notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change and is concise and specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
en/docs/guides/usecases/order-management-automation.md (1)

17-17: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider rephrasing "exactly" to improve clarity.

Line 17 uses "exactly" which LanguageTool flags as overused. Consider alternatives like "precisely the kind of work that" or simply "the kind of work that" to strengthen readability.

Current:

...and a human checking the database every few minutes is exactly the kind of work software should own.

Suggested alternative:

...and a human checking the database every few minutes is the kind of work software should own.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/guides/usecases/order-management-automation.md` at line 17, The word
"exactly" in the sentence about manual database checking is flagged as overused
language that impacts clarity. In the paragraph describing order automation
workflows, locate the phrase "is exactly the kind of work software should own"
and remove the word "exactly" so it reads "is the kind of work software should
own", or alternatively replace "exactly" with a stronger alternative like
"precisely the kind of work that" to improve readability and reduce redundancy.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@en/docs/guides/usecases/order-management-automation.md`:
- Around line 297-299: The code block containing the template string `Order
advanced to PROCESSING: ${updatedOrder.orderId}` is missing a language
identifier for syntax highlighting. Add `ballerina` as the language label
immediately after the opening triple backticks (before the template string) to
enable proper Docusaurus syntax highlighting for this code snippet.
- Around line 322-324: The code block containing the string template `Done -
processed ${placedOrders.length()} orders` is missing a language identifier on
the opening code fence. Add `ballerina` as the language label to the opening
triple backticks (``` ballerina) to enable proper syntax highlighting in
Docusaurus.
- Around line 348-352: The code block displaying the order processing automation
terminal output is missing the language identifier required for proper syntax
highlighting in Docusaurus. Add the `bash` language identifier to the opening
triple backticks of the code block that contains the log output messages
starting with "time=2026-06-19T16:05:21.917+05:30 level=INFO...". This ensures
Prism correctly renders the terminal output with appropriate formatting.
- Around line 372-374: The SQL code block containing the UPDATE statement for
orders_db.orders is missing a language identifier for proper syntax
highlighting. Add `sql` as the language identifier to the opening triple
backticks of the code block that contains the SQL query `UPDATE orders_db.orders
SET status = 'PLACED' WHERE order_id IN ('ORD-001', 'ORD-002');` to enable
proper SQL syntax highlighting in the documentation.

---

Nitpick comments:
In `@en/docs/guides/usecases/order-management-automation.md`:
- Line 17: The word "exactly" in the sentence about manual database checking is
flagged as overused language that impacts clarity. In the paragraph describing
order automation workflows, locate the phrase "is exactly the kind of work
software should own" and remove the word "exactly" so it reads "is the kind of
work software should own", or alternatively replace "exactly" with a stronger
alternative like "precisely the kind of work that" to improve readability and
reduce redundancy.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4c15933a-516b-43ad-8f89-62ab38b614d6

📥 Commits

Reviewing files that changed from the base of the PR and between 05f5ed5 and 4dc2b45.

⛔ Files ignored due to path filters (13)
  • en/static/img/guides/usecases/order-management-automation/add-automation-artifact.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/create-integration.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/db-connection-credentials.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/db-connection-saved.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/db-select-tables.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/foreach-complete.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/foreach-config.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/foreach-update.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/full-flow.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/get-rows-config.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/if-empty-check.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/if-return-flow.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/run-terminal-output.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • en/docs/guides/usecases/order-management-automation.md
  • en/sidebars.ts

Comment thread en/docs/guides/usecases/order-management-automation.md Outdated
Comment thread en/docs/guides/usecases/order-management-automation.md Outdated
Comment thread en/docs/guides/usecases/order-management-automation.md Outdated
Comment thread en/docs/guides/usecases/order-management-automation.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds a new “Order Management Automation” use case guide and exposes it in the Guides navigation.

Changes:

  • Added a “Use Cases” category under Guides in the English sidebar.
  • Introduced a new MDX guide walking through a scheduled order-processing automation backed by MySQL.

Reviewed changes

Copilot reviewed 2 out of 15 changed files in this pull request and generated 4 comments.

File Description
en/sidebars.ts Adds a “Use Cases” category entry that links to the new guide.
en/docs/guides/usecases/order-management-automation.md New step-by-step use case content (DB setup, Visual Designer flow, run/verify, generated code excerpt).

Comment thread en/docs/guides/usecases/order-management-automation.md
Comment thread en/docs/guides/usecases/order-management-automation.md Outdated
Comment thread en/docs/guides/usecases/order-management-automation.md Outdated
Comment thread en/docs/guides/usecases/order-management-automation.md Outdated
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Broken links, images & orphan pages

Passing — no broken links or images found.

Links/images come from one crawl of the production build (baseUrl-aware). Orphans are docs not referenced by sidebars.ts.

Summary

  • Broken links & images — total 0 · 🆕 introduced 0 · 📄 already on main 0
  • Orphan pages — total 8 · 🆕 introduced 0 · 📄 already on main 8

Broken links & images

Introduced by this PR

No new broken link(s)/image(s) introduced by this PR. ✅

Already on main — 0 total

None.

Orphan pages

Introduced by this PR

No new orphan page(s) introduced by this PR. ✅

Already on main — 8 total

Already present on the base branch (not caused by this PR):

Show 8
  • docs/deploy-operate/observe/datadog-integration
  • docs/deploy-operate/observe/elastic-stack-elk
  • docs/deploy-operate/observe/metrics-prometheus-grafana
  • docs/deploy-operate/observe/opensearch-integration
  • docs/deploy-operate/observe/recipe-elk-stack
  • docs/deploy-operate/observe/recipe-kubernetes-production
  • docs/deploy-operate/observe/recipe-local-development
  • docs/deploy-operate/observe/recipe-opensearch-setup

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
en/docs/guides/usecases/order-management-automation.md (1)

3-5: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Align the page title with the order-management-automation slug.

The current title/H1 centers on SMTP delivery, but the file lives under usecases/order-management-automation. Pull the primary keywords into the title so search and navigation stay consistent.

Suggested title tweak
-title: "Send MySQL order status emails over SMTP"
-# Send MySQL order status emails over SMTP
+title: "Order management automation: send MySQL order status emails over SMTP"
+# Order management automation: send MySQL order status emails over SMTP

Also applies to: 14-14

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/guides/usecases/order-management-automation.md` around lines 3 - 5,
The page title focuses on technical SMTP delivery details but does not align
with the file slug "order-management-automation", which should be the primary
keyword. Update the title field to include "Order Management Automation" as the
primary keyword while retaining context about MySQL and SMTP, and ensure the
corresponding H1 heading on line 14 matches this updated title to maintain
consistency with the file location and improve search/navigation alignment.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@en/docs/guides/usecases/order-management-automation.md`:
- Around line 3-5: The page title focuses on technical SMTP delivery details but
does not align with the file slug "order-management-automation", which should be
the primary keyword. Update the title field to include "Order Management
Automation" as the primary keyword while retaining context about MySQL and SMTP,
and ensure the corresponding H1 heading on line 14 matches this updated title to
maintain consistency with the file location and improve search/navigation
alignment.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6e9c8280-93a9-400e-9f39-3f77417c7168

📥 Commits

Reviewing files that changed from the base of the PR and between 4dc2b45 and c0598fc.

⛔ Files ignored due to path filters (3)
  • en/static/img/guides/usecases/order-management-automation/foreach-complete.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/full-flow.png is excluded by !**/*.png
  • en/static/img/guides/usecases/order-management-automation/run-terminal-output.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • en/docs/guides/usecases/order-management-automation.md

@pasindufernando1 pasindufernando1 marked this pull request as draft June 26, 2026 03:05
@pasindufernando1 pasindufernando1 marked this pull request as ready for review June 30, 2026 07:42
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.

2 participants