plugins/aem/6.5-lts/skills/aem-workflow/workflow-triggering/SKILL.md
Start AEM Workflows on AEM 6.5 LTS using all available triggering mechanisms. Use when starting workflows manually via the Timeline UI, programmatically via WorkflowSession.startWorkflow(), via the HTTP Workflow API, through Manage Publication, through replication triggers, or passing initial metadata and payload to a workflow instance.
npx skillsauth add adobe/skills workflow-triggeringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
All mechanisms to start a workflow on AEM 6.5 LTS — from UI, programmatic API, HTTP API, Manage Publication, and replication-linked triggers.
/etc-based workflow packages.| Mechanism | Use Case |
|---|---|
| Timeline UI | One-off manual start on a single page or asset |
| Manage Publication | Multi-page batch, integrates with publish pipeline |
| WorkflowSession API | Backend Java code, scheduled jobs, event handlers |
| HTTP Workflow API | REST calls, scripts, external integrations |
| Classic UI Activate | Replication-linked workflow (legacy) |
| Workflow Launchers | Automatic on JCR events — see workflow-launchers skill |
AEM creates a cq:WorkflowContentPackage under /etc/workflow/packages/ containing all selected pages.
@Component(service = WorkflowStarterService.class)
public class WorkflowStarterService {
@Reference
private ResourceResolverFactory resolverFactory;
public String startWorkflow(String payloadPath, String modelId) throws Exception {
Map<String, Object> auth = Collections.singletonMap(
ResourceResolverFactory.SUBSERVICE, "workflow-starter");
try (ResourceResolver resolver = resolverFactory.getServiceResourceResolver(auth)) {
WorkflowSession wfSession = resolver.adaptTo(WorkflowSession.class);
WorkflowModel model = wfSession.getModel(modelId);
WorkflowData data = wfSession.newWorkflowData("JCR_PATH", payloadPath);
data.getMetaDataMap().put("workflowTitle", "Triggered by batch job");
Workflow instance = wfSession.startWorkflow(model, data);
return instance.getId();
}
}
}
Model ID format: /var/workflow/models/my-workflow (runtime path)
For /etc/workflow/models/ legacy models, the ID is /etc/workflow/models/my-workflow.
The API is rooted at /var/workflow/instances (the legacy /etc/workflow/instances path is
still accepted on 6.5 LTS). Do not POST to /api/workflow/instances — no workflow API is
mounted there, so the Sling default POST servlet silently writes stray JCR nodes and returns a
misleading 2xx without starting any workflow (a GET on that path returns 404).
# Start — returns HTTP 201 with an HTML body linking to the new instance path
curl -u admin:admin -X POST \
"http://localhost:4502/var/workflow/instances" \
--data-urlencode "_charset_=utf-8" \
--data-urlencode "model=/var/workflow/models/my-workflow" \
--data-urlencode "payloadType=JCR_PATH" \
--data-urlencode "payload=/content/my-site/en/home" \
--data-urlencode "workflowTitle=My Test Run" \
--data-urlencode "startComment=triggered via HTTP API"
# List instances — filter by state with a selector (.RUNNING.json, .COMPLETED.json, ...)
curl -u admin:admin "http://localhost:4502/var/workflow/instances.json"
curl -u admin:admin "http://localhost:4502/var/workflow/instances.RUNNING.json"
# Instance detail — the id is the path returned at start,
# e.g. /var/workflow/instances/server0/<date>/my-workflow_1
curl -u admin:admin \
"http://localhost:4502/var/workflow/instances/server0/<date>/my-workflow_1.json"
# Terminate (abort) — POST state=ABORTED to the instance path, returns HTTP 200
curl -u admin:admin -X POST \
"http://localhost:4502/var/workflow/instances/server0/<date>/my-workflow_1" \
--data-urlencode "_charset_=utf-8" \
--data-urlencode "state=ABORTED" \
--data-urlencode "terminateComment=cleanup"
The start response is HTML, not JSON: parse the instance path from the returned link
(<a id="Location" …> / "Modified Resource"). Instance and model listings (.json) and
instance detail (<instanceId>.json) return JSON.
Configure via Tools → Replication → Agents → default → check Default Agent properties to associate a workflow with replication events. Or use a Workflow Launcher targeting /var/audit/com.day.cq.replication/.
loginAdministrative()./var/workflow/models/ runtime path.tools
Use the run-workflow MCP to discover, compose, execute, publish, and save Adobe Firefly workflows. TRIGGER when: user asks what actions are available, what the MCP can do, how to process images/video/3D via workflow, wants to build/run/save/publish a workflow, OR pastes any workflow/batch/execution ID. BARE ID (UUID/workflowId/batchId) = INSPECT ONLY — call inspect_run, NEVER run_workflow_submit. ALWAYS call list_actions first for capability/discovery questions. DO NOT TRIGGER for direct Firefly API calls without MCP (use firefly-api-specs).
tools
Run predefined featured workflows via run-workflow MCP. TRIGGER when user names a featured workflow (retargeting, banners at scale, localization, packaging, banner advertising, etc.) or asks to run a known marketing/production workflow. Requires run-workflow MCP. ALWAYS call get_featured_workflow before compose_workflow. DO NOT TRIGGER for custom one-off workflows with no named template — use run-workflow skill.
tools
Migrate an Adobe Commerce App Builder project from the Integration Starter Kit or Checkout Starter Kit to the new App Management approach. Run from the root of the App Builder project to be migrated. Pass --auto to skip confirmation prompts (suitable for CI or batch use) — auto mode prints a summary of all Q&A questions answered with their defaults. Pass --doc-scan-only to scan README.md and env.dist for outdated content without modifying any files. Use when the user wants to migrate an App Builder project from the Integration Starter Kit or Checkout Starter Kit to the App Management approach, or mentions upgrading their Adobe Commerce extension architecture.
development
Add or modify webhook interceptors in an Adobe Commerce app. Use when the user wants to intercept Commerce operations to validate input, append data, or modify behavior — before or after execution. Requires a base app initialized with commerce-app-init.