본문으로 건너뛰기
cccskills
무료GitHub에 공개

workflow-triggering

Start AEM Workflows on AEM as a Cloud Service 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, or passing initial metadata and payload to a workflow instance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(9)

  • SKILL.md6.9 KB
  • references/workflow-foundation/api-reference.md3.5 KB
  • references/workflow-foundation/architecture-overview.md2.3 KB
  • references/workflow-foundation/cloud-service-guardrails.md2.7 KB
  • references/workflow-foundation/jcr-paths-reference.md2.4 KB
  • references/workflow-foundation/quick-start-guide.md2.4 KB
  • references/workflow-foundation/README.md826 B
  • references/workflow-triggering/programmatic-api.md7.7 KB
  • references/workflow-triggering/triggering-mechanisms.md6.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Workflow Triggering (Cloud Service)

All mechanisms to start a workflow on AEM Cloud Service — from UI, programmatic API, HTTP API, and Manage Publication.

Variant Scope

  • AEM Cloud Service only.
  • For programmatic triggering, use a service user — map a sub-service (e.g. workflow-starter) to a service user that is a member of the workflow-process-service group (workflow-process-service is a group, not a user). See programmatic-api.md for the mapping config.

Triggering Mechanisms Summary

MechanismUse Case
Timeline UIOne-off manual start on a single page or asset
Manage PublicationMulti-page batch start, integrates with publish pipeline
WorkflowSession APIBackend Java code, scheduled jobs, event handlers
HTTP Workflow APIREST calls, scripts, external integrations
Workflow LaunchersAutomatic on JCR events — see workflow-launchers skill

1. Manual via Timeline UI

  1. Navigate to a page or asset in Sites/Assets console
  2. Open Timeline panel (clock icon)
  3. Click Start Workflow
  4. Select the model from the dropdown
  5. Optionally enter a workflow title and comment
  6. Click Start

The workflow starts with the selected item as JCR_PATH payload and the current user as initiator.

2. Manage Publication (Multi-Page)

  1. Sites Console → select pages → Manage Publication
  2. Choose action (Publish / Unpublish)
  3. Check Include Workflow
  4. Select workflow model
  5. Click Publish Later or Publish Now

AEM creates a cq:WorkflowContentPackage containing all selected pages as the workflow payload. The payload is a JCR_PATH pointing to the generated package node under /var/workflow/packages (legacy: /etc/workflow/packages) — useful to know when debugging payload issues, since the payload is the package node, not the individual pages.

3. Programmatic (WorkflowSession API)

@Component(service = MyWorkflowService.class)
public class MyWorkflowService {

    @Reference
    private ResourceResolverFactory resolverFactory;

    public String startWorkflow(String payloadPath, String modelId,
                                Map<String, Object> initialMeta) 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);

            // Set initial metadata
            MetaDataMap meta = data.getMetaDataMap();
            if (initialMeta != null) {
                initialMeta.forEach(meta::put);
            }

            Workflow instance = wfSession.startWorkflow(model, data);
            return instance.getId();
        }
    }
}

Model ID format: /var/workflow/models/my-workflow (the runtime path, not the design-time path)

4. HTTP Workflow API

The API is rooted at /var/workflow/instances. Do not POST to /api/workflow/instances — no workflow servlet is mounted there, so the Sling default POST servlet silently writes stray JCR nodes and returns a misleading 2xx without starting any workflow.

# Start a workflow — 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=Review Request from CI" \
  --data-urlencode "startComment=triggered via HTTP API"

# The start response is HTML — parse the instance path from the
# <a id="Location"> anchor (or "Modified Resource" link in the body),
# e.g. /var/workflow/instances/server0/<date>/my-workflow_1

# List all instances (JSON)
curl -u admin:admin "http://localhost:4502/var/workflow/instances.json"

# List by state using a selector (.RUNNING.json, .SUSPENDED.json, .COMPLETED.json, .ABORTED.json)
curl -u admin:admin "http://localhost:4502/var/workflow/instances.RUNNING.json"

# Get instance details — JSON fields: id, state, initiator, startTime,
#   model, payloadType, payload, workItems[]
curl -u admin:admin \
  "http://localhost:4502/var/workflow/instances/server0/<date>/my-workflow_1.json"

# Suspend a running workflow — POST state=SUSPENDED, 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=SUSPENDED"

# Resume a suspended workflow — POST state=RUNNING, 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=RUNNING"

# Terminate (abort) a workflow — POST state=ABORTED, 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"

Guardrails

  • Always specify a workflowTitle when starting programmatically — it helps operators identify instances in the console.
  • Never start workflows with admin credentials from production code. Use a service user.
  • Model ID must be the /var/workflow/models/ path (runtime). Do not use the /conf design-time path.
  • Check that the model is synced to /var/workflow/models/ before calling startWorkflow().
  • For multi-page batch triggering, prefer Manage Publication over programmatic creation of workflow packages — it is better integrated with the publish pipeline and avoids manual package lifecycle management.

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Analyzes a multi-step conversion funnel to find where visitors drop off and which steps have the worst leakage. Use this skill when someone describes a journey and asks about conversion rates, drop-off, fallout, or step completion. Trigger for "analyze our checkout funnel," "where are visitors dropping off," "what's our add-to-cart to purchase conversion rate," "funnel analysis," "show me fallout between steps," or "which step loses the most visitors."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aemgdc/aemdev22026년 10월 18일 업데이트

Generates a concise, executive-ready performance summary covering key metrics, trends, and what's driving movement. Use this skill when someone needs to produce a briefing, executive summary, performance narrative, or stakeholder readout — for example, "write an exec summary of last week's performance," "create a performance briefing for our leadership team," "produce a monthly business review summary," "what should I tell executives about our metrics," or "generate a performance narrative." Also trigger for "QBR summary," "weekly business review," or "stakeholder briefing."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aemgdc/aemdev22026년 10월 18일 업데이트

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 "give me a performance overview," "what moved in the last 7 days," "pull our AA KPI report," or "summarize our metrics."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aemgdc/aemdev22026년 10월 18일 업데이트

Compares the performance of two or more audience segments across key metrics side by side. Use this skill when someone wants to compare audiences or visitor groups — for example, "how do mobile visitors compare to desktop 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" or "audience comparison."

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aemgdc/aemdev22026년 10월 18일 업데이트

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aemgdc/aemdev22026년 10월 18일 업데이트

Scan an AEM Edge Delivery Services page for WCAG 2.1 AA accessibility violations and generate specific fixes. Identifies missing alt text, heading hierarchy issues, link text problems, color contrast concerns, and EDS-specific accessibility patterns. Use when fixing accessibility issues, preparing for compliance audits, or remediating WCAG violations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aemgdc/aemdev22026년 10월 18일 업데이트

aemgdc의 스킬 모두 보기

이 스킬의 문제 신고