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

workflow-development

Implement custom AEM Workflow Java components on AEM as a Cloud Service. Use when writing WorkflowProcess steps, ParticipantStepChooser implementations, registering services via OSGi DS R6 annotations, reading step arguments from MetaDataMap, accessing JCR payload via WorkflowSession adapter, reading and writing workflow metadata and variables, and handling errors with WorkflowException for retry behavior.

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

설치 방법 보기

포함된 파일(10)

  • SKILL.md5.3 KB
  • references/workflow-development/participant-step-patterns.md4.6 KB
  • references/workflow-development/process-step-patterns.md4.9 KB
  • references/workflow-development/variables-and-metadata.md3.2 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.0 KB
  • references/workflow-foundation/README.md826 B

SKILL.md(원문)

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

Workflow Development (Cloud Service)

Implement custom workflow components for AEM Cloud Service: WorkflowProcess, ParticipantStepChooser, OSGi registration, metadata handling, and error patterns.

Variant Scope

  • AEM Cloud Service only.
  • Use OSGi DS R6 annotations (org.osgi.service.component.annotations.*). Do not use Felix SCR.
  • Bundle goes into the ui.apps content package and is deployed via Cloud Manager pipeline.

Workflow

Development Progress
- [ ] 1) Identify what the step does: process (auto) or participant (human) or dynamic participant
- [ ] 2) Create Java class implementing WorkflowProcess or ParticipantStepChooser
- [ ] 3) Register with correct @Component annotation and service property (process.label / chooser.label)
- [ ] 4) Read step arguments from MetaDataMap args (set in model editor)
- [ ] 5) Access payload via item.getWorkflowData().getPayload().toString()
- [ ] 6) Read/write workflow instance metadata via item.getWorkflowData().getMetaDataMap()
- [ ] 7) Return normally to advance; throw WorkflowException to trigger retry
- [ ] 8) Deploy bundle; verify process.label appears in Workflow Model Editor step picker

WorkflowProcess Template (Cloud Service)

@Component(
    service = WorkflowProcess.class,
    property = {
        "process.label=My Custom Process Step",
        "service.description=Short description of what this step does"
    }
)
public class MyCustomProcess implements WorkflowProcess {

    private static final Logger LOG = LoggerFactory.getLogger(MyCustomProcess.class);

    @Reference
    private ResourceResolverFactory resolverFactory;

    @Override
    public void execute(WorkItem item, WorkflowSession session, MetaDataMap args)
            throws WorkflowException {
        // 1. Read payload
        WorkflowData data = item.getWorkflowData();
        String payloadPath = data.getPayload().toString();

        // 2. Read step arguments
        String recipient = args.get("recipient", "workflow-administrators");
        boolean createVersion = args.get("createVersion", false);

        // 3. Read/write shared workflow metadata
        MetaDataMap metadata = data.getMetaDataMap();
        String status = metadata.get("approvalStatus", "PENDING");
        metadata.put("processedBy", "my-custom-step");

        // 4. Access JCR if needed
        try {
            ResourceResolver resolver = session.adaptTo(ResourceResolver.class);
            Resource resource = resolver.getResource(payloadPath);
            // ... do work ...
        } catch (Exception e) {
            LOG.error("Error in MyCustomProcess for payload {}", payloadPath, e);
            throw new WorkflowException("Failed: " + e.getMessage(), e);
        }
        // Return normally = step completes, workflow advances
    }
}

ParticipantStepChooser Template

@Component(
    service = ParticipantStepChooser.class,
    property = {"chooser.label=Content Owner Chooser"}
)
public class ContentOwnerChooser implements ParticipantStepChooser {

    @Override
    public String getParticipant(WorkItem workItem, WorkflowSession session,
                                 MetaDataMap args) throws WorkflowException {
        String payloadPath = workItem.getWorkflowData().getPayload().toString();
        try {
            Session jcrSession = session.adaptTo(Session.class);
            Node content = jcrSession.getNode(payloadPath + "/jcr:content");
            if (content.hasProperty("cq:lastModifiedBy")) {
                return content.getProperty("cq:lastModifiedBy").getString();
            }
        } catch (RepositoryException e) {
            throw new WorkflowException("Cannot resolve participant", e);
        }
        return args.get("fallbackParticipant", "content-authors");
    }
}

Guardrails

  • Never use ResourceResolverFactory.loginAdministrative(). Always use a service user sub-service.
  • Do not call Session.save() on the workflow session's JCR session for payload changes — use a separate ResourceResolver obtained from resolverFactory.getServiceResourceResolver().
  • If a step must hold (not auto-advance), set PROCESS_AUTO_ADVANCE=false in the model metaData and use TaskWorkflowProcess or an external completion mechanism.

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."

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

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 17일 업데이트

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."

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

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 17일 업데이트

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."

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

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 17일 업데이트

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."

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

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 17일 업데이트

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.

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

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 17일 업데이트

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.

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

OCIOStateOfNebraska/stateofnebraska-aem32026년 10월 17일 업데이트

OCIOStateOfNebraska의 스킬 모두 보기

이 스킬의 문제 신고