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.
# Start
curl -u admin:admin -X POST \
"http://localhost:4502/api/workflow/instances" \
-d "model=/var/workflow/models/my-workflow" \
-d "payloadType=JCR_PATH" \
-d "payload=/content/my-site/en/home" \
-d "workflowTitle=My Test Run"
# List running instances
curl -u admin:admin \
"http://localhost:4502/api/workflow/instances?state=RUNNING"
# Terminate an instance
curl -u admin:admin -X DELETE \
"http://localhost:4502/api/workflow/instances/<instanceId>"
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
Identifies which items (pages, campaigns, products, channels, regions) had the biggest increases or decreases for a key metric between two time periods. Use this skill when someone asks "what's up and what's down," "which campaigns moved the most," "top gainers and losers," "what pages are trending," "show me what changed by channel," or any variation of identifying the biggest movers and decliners for a metric.
tools
Compares the performance of two or more audience segments across key metrics side by side. Use this skill when someone wants to compare audiences, cohorts, or groups — for example, "how do mobile users compare to desktop users on conversion," "compare new vs. returning visitors," "show me the difference between these two segments," "compare these audiences on our KPIs," or "which segment performs better." Also trigger for "segment comparison," "audience comparison," or "cohort comparison."
business
Produces a compact KPI digest showing how key metrics changed over a period and what's driving the movement. Use this skill when someone asks for a performance summary, a weekly recap, a morning briefing, a KPI update, or any variation of "how did we do this week/month." Also trigger for requests like "give me a performance overview," "what moved in the last 7 days," "pull our KPI report," or "summarize our metrics."
testing
Analyzes a multi-step conversion funnel to find where users drop off and which steps have the worst leakage. Use this skill when someone describes a journey or funnel and asks about conversion rates, drop-off, fallout, or step completion. Trigger for phrases like "analyze our onboarding funnel," "where are users dropping off," "what's our checkout conversion rate," "funnel analysis," "show me fallout between these steps," or "which step loses the most users."