Workflow Debuggingのロゴ

Workflow Debugging

組織
adobe
workflow-debugging

Debug AEM Workflow issues on AEM 6.5 LTS and AMS including stuck workflows, failed steps, missing Inbox tasks, launcher failures, stale instances, thread pool exhaustion, queue backlogs, purge failures, and permissions errors. Use when the user reports workflow problems on AEM 6.5 LTS or AMS, asks why a workflow is stuck or failed, needs step-by-step troubleshooting, or provides thread dumps, configuration status dumps, or Sling Job console output for analysis.

概要

公開者adobe
リポジトリskills
スキル名workflow-debugging
スター
298
フォーク
92
同梱ファイル
1
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    adobeがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルWorkflow DebuggingをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/adobe/skills/tree/main/plugins/aem/6.5-lts/skills/aem-workflow/workflow-debugging
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/adobe/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/aem/6.5-lts/skills/aem-workflow/workflow-debugging .claude/skills/workflow-debugging
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでWorkflow Debuggingを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にWorkflow Debuggingを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Workflow Debuggingは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

AEM Workflow Debugging — 6.5 LTS / AMS

Production-grade debugging for AEM Granite Workflow engine, launcher, Inbox, Sling Jobs, thread pools, and purge on AEM 6.5 LTS and Adobe Managed Services (AMS).

Variant Scope

  • This skill is 6.5-lts-only (includes AMS).
  • Full JMX access via Felix Console or JMX client.
  • Config changes via Felix Console or OSGi config in repository.

When to use this skill

  • Workflow stuck, not progressing, failed, not starting, task not in Inbox, purge/repository bloat, permissions, queue backlog, thread pool exhaustion, auto-advancement not working.
  • User provides thread dumps, configuration status ZIPs, Sling Job console output, or error.log excerpts.
  • Environment: AEM 6.5 LTS / AMS (JMX available).

Step 1: Map symptom to first action

Symptomsymptom_idFirst action
Workflow stuck (not advancing)workflow_stuck_not_progressingOpen instance; note current step type. No work item → stale.
Task not in Inboxtask_not_in_inboxConfirm Participant step; assignee = logged-in user; Inbox filters.
Workflow not starting (launcher)workflow_not_starting_launcherLauncher enabled; path/event match payload.
Workflow fails or shows errorworkflow_fails_or_shows_errorInstance history; error.log for instance ID; payload and process.
Step failed, retries exhaustedstep_failed_retries_exhaustedLogs → process.label → JMX retryFailedWorkItems or Inbox retry.
Stale (no current work item)stale_workflow_no_work_itemJMX countStaleWorkflows → restartStaleWorkflows(dryRun=true).
Repository bloat / too many instancesrepository_bloat_too_many_instancesJMX purgeCompleted(dryRun=true) or Purge Scheduler.
User cannot see or complete itemuser_cannot_see_or_complete_itemAssignee/initiator/superuser; enforce flags.
Cannot delete modelcannot_delete_modelJMX countRunningWorkflows → terminate → delete.
Slow throughput / queue backlogslow_throughput_queue_backlogJMX returnSystemJobInfo; queue.maxparallel on Granite Workflow Queue; Sling thread pool.
Auto-advancement not workingworkflow_auto_advance_failureCheck default thread pool saturation; Sling Scheduler; timeout jobs.
New workflow not workingworkflow_setup_validationModel sync, launcher, process registration, permissions.

Step 2: Decision tree (workflow stuck)

  1. No current work item? → Stale. JMX: countStaleWorkflows → restartStaleWorkflows(dryRun=true).
  2. Participant step → Assignee exists? Inbox visible? Payload accessible? Dynamic participant resolver returning correct user?
  3. Process step → Search error.log for instance ID. Check: process.label registered, payload path exists, bundle active, no exception in execute().
  4. OR/AND Split → Condition evaluates correctly? Routes exist? No dead-end branches? Model synced?

Step 3: Thread dump & thread pool analysis

Thread dumps on 6.5 / AMS are obtained via jstack or by requesting from AMS support. Configuration status ZIPs from Felix Console → Status → Configuration Status.

3a. Sling default thread pool (critical path)

The Sling Scheduler ApacheSlingdefault uses ThreadPool: default. This pool runs:

  • Oak observation events
  • All Quartz-scheduled jobs — including the workflow timeout-detection scheduler that emits com/adobe/granite/workflow/timeout/job events to the Sling Job system (the job itself then runs on the Granite Workflow Queue, see Step 3c)

Check the Sling Thread Pools status page (/system/console/status-slingthreadpools):

FieldHealthyProblem
active count< max pool size= max pool size (saturated)
block policyRUNABORT (rejects tasks when full)
max pool sizesized for workloadOOTB on AEM 6.5 LTS is 5/5 (Apache Sling default). Bump to 20+ in OSGi config for environments with many custom periodic schedulers, otherwise schedulers can starve.

If active count = max pool size AND block policy = ABORT:

  • New scheduled tasks (including workflow timeout/auto-advance jobs) are silently rejected
  • This is the #1 cause of auto-advancement failure

Check the Threads status page (/system/console/status-Threads) or the jstack thread dump (/system/console/status-jstack-threaddump):

  • Search for sling-default- threads
  • If all threads show same stack (e.g. stuck on HTTP call, database, or external service), that's the blocking culprit
  • Note elapsed time — threads stuck for hours indicate a hung external call without timeout

3b. Sling Job thread pool

Check Apache Sling Job Thread Pool in the Sling Thread Pools status page:

  • active count vs max pool size
  • If saturated, Sling Jobs cannot execute (workflow jobs stall)

3c. Granite Workflow Queue

Check the Sling Jobs page (/system/console/slingevent):

FieldHealthyProblem
Queued Jobs (overall)0> 0 (jobs waiting)
Failed Jobs0> 0 (step failures)
Active Jobs0-N0 when Queued > 0 (jobs not picked up)

Check topic statistics for workflow model:

  • Topic: com/adobe/granite/workflow/job/var/workflow/models/<modelName>
  • High Failed Jobs / low Finished Jobs ratio → process step throwing exceptions

Check Granite Workflow Queue configuration:

  • Type: Topic Round Robin
  • Max Parallel: 0.5 OOTB on AEM 6.5 LTS (50% of available CPU cores). Increase for throughput on bursty workloads. Verify the running value at /system/console/configMgr/org.apache.sling.event.jobs.QueueConfiguration~workflow before assuming.
  • Max Retries: 10

3d. Sling Scheduler

Check the Sling Scheduler status page (/system/console/status-slingscheduler):

  • This page lists Quartz-style schedulers, not Sling Job topics. On OOTB AEM 6.5 LTS the workflow-related entry visible here is the periodic WorkflowStatsMBean collector (used by the Statistics MBean) — its nextFireTime should be in the near future; nextFireTime: null means the trigger was deregistered.
  • The com/adobe/granite/workflow/timeout/job topic itself is a Sling Job, not a Quartz job — check it on the Sling Jobs page (/system/console/slingevent), not here.
  • Confirm ApacheSlingdefault uses ThreadPool: default — that's how the periodic timeout-detection scheduler reaches the workflow engine.

Step 4: Error log patterns

PatternCauseAction
Error executing workflow stepProcess step exceptionCheck stack; fix process code or payload
getProcess for '<name>' failedNo WorkflowProcess registeredDeploy bundle; match process.label
Cannot archive workitemArchive failure → stale riskJMX restartStaleWorkflows
refreshing the session since we had to wait for a lockLock contentionTune queue.maxparallel on the Granite Workflow Queue (Apache Sling Job Queue Configuration); reduce concurrent writes to the same path
Terminate failed / Resume failed / Suspend failedPermissions (not initiator/superuser)Check enforceWorkflowInitiatorPermissions; add to superusers
PathNotFoundException (workflow/payload)Payload/launcher path missingVerify payload exists; check launcher config path
Error adding launcher configLauncher config path not createdCreate /conf/global/settings/workflow/launcher/config
retrys exceeded - remove isTransientTransient workflow failed after retriesFix process code; instance persisted for admin handling
RejectedExecutionExceptionThread pool full with ABORT policyIncrease pool size or change policy to RUN; fix stuck threads
Workflow is already finishedTerminate on completed/aborted instanceCheck logic calling terminate
Workflow purge '<name>' : repository exceptionPurge JCR errorCheck permissions; repo health

Step 5: Configuration checklist

In Felix Console → OSGi → Configuration (/system/console/configMgr):

ConfigPropertyCheck
WorkflowSessionFactorycq.workflow.job.retryDefault 3; increase for flaky steps
WorkflowSessionFactorycq.workflow.superuserMust include admin users/groups (OOTB list includes admin, administrators, workflow-process-service, workflow-service, workflow-administrators, wcm-workflow-service)
WorkflowSessionFactorygranite.workflow.enforceWorkitemAssigneePermissionstrue (OOTB) = only assignee sees items
WorkflowSessionFactorygranite.workflow.enforceWorkflowInitiatorPermissionstrue (OOTB) = only initiator (or superuser) can terminate/suspend/resume
WorkflowSessionFactorygranite.workflow.inboxQuerySizeMax work items returned per Inbox query. OOTB 2000; raise if heavy users hit the cap
WorkflowSessionFactorygranite.workflow.maxPurgeSaveThresholdOOTB 20 — commit after this many purged instances. Raise carefully to reduce JCR overhead during large purges
WorkflowSessionFactorygranite.workflow.maxPurgeQueryCountOOTB 1000 — JCR query batch size during purge. Tune with above
Granite Workflow Queue (org.apache.sling.event.jobs.QueueConfiguration~workflow)queue.maxparallelReal parallelism knob. OOTB on AEM 6.5 LTS is 0.5 (50% of CPU cores). Adobe's Workflows Best Practices recommends between half and three-quarters of processor cores. cq.workflow.job.max.procs displayed in Felix Config Manager is an orphaned metatype label with no code path that reads it (verified against source on release/660 and prod/cq660) — do not rely on it. Verify the running value at /system/console/configMgr/org.apache.sling.event.jobs.QueueConfiguration~workflow
DefaultThreadPool (name=default)block policyOOTB RUN. ABORT would silently drop workflow timeout jobs — keep RUN unless you have a specific reason
DefaultThreadPool (name=default)max pool sizeOOTB on AEM 6.5 LTS is 5 (Apache Sling default). Bump to 20+ for environments with many custom periodic schedulers; otherwise the pool can starve under load
Purge Scheduler (com.adobe.granite.workflow.purge.Scheduler)scheduledpurge.daysold30 default; tune per environment. Factory PID — deploy one config per schedule
Purge Schedulerscheduledpurge.workflowStatusArray-typed; e.g. ["COMPLETED"]

Step 6: Remediation quick reference

Action6.5 LTS / AMS approach
Retry failed work itemJMX retryFailedWorkItems or Inbox Retry
Restart stale workflowsJMX restartStaleWorkflows(dryRun=true) then execute
Purge completedJMX purgeCompleted(dryRun=true) or Purge Scheduler
Increase parallelismFelix Console: queue.maxparallel on the Granite Workflow Queue (Apache Sling Job Queue Configuration); or OSGi config in repo
Fix thread pool exhaustionRestart instance (immediate); fix stuck scheduler code; change block policy to RUN
Fix process not foundDeploy bundle; process.label must match; Sync model
Fix auto-advancementVerify default pool not saturated; timeout jobs scheduled; block policy = RUN

Step 7: Key JMX MBeans

All workflow maintenance and diagnostic operations live on a single MBean: com.adobe.granite.workflow:type=Maintenance. A separate MBean — com.adobe.granite.workflow:type=Statistics — exposes time-series workflow execution metrics for trend analysis.

MBeanOperationsPurpose
com.adobe.granite.workflow:type=MaintenancepurgeCompleted(model [optional], days, dryRun), purgeActive(model [optional], days, dryRun), countRunningWorkflows(model [optional]), countCompletedWorkflows(model [optional]), countStaleWorkflows(model [optional]), restartStaleWorkflows(model [optional], dryRun), retryFailedWorkItems(dryRun, model [optional]), terminateFailedInstances(restart, dryRun, model [optional]), returnSystemJobInfo(), returnWorkflowQueueInfo(), returnWorkflowJobTopicInfo(), returnFailedWorkflowCount(model [optional]), returnFailedWorkflowCountPerModel(), listRunningWorkflowsPerModel(), listCompletedWorkflowsPerModel(), fetchModelList()Purge, stale detection/restart, retry failed items, bulk terminate, queue/job diagnostics, per-model counts and enumeration
com.adobe.granite.workflow:type=StatisticsgetResults, clearRecords; plus get/set accessors for DataLifeTime, DataFidelityTime, DataProcessRate, DataRateTime-series workflow execution statistics

Always use dryRun=true first before executing destructive purge or retry operations.


Step 8: Common root cause patterns (from real incidents)

Pattern A: Thread pool starvation → auto-advance failure

Symptom: Workflow auto-advancement stops; timeout jobs not firing; workflows stuck at participant step despite timeout configured.

Root cause chain:

  1. Custom scheduler (e.g. AccessTokenScheduler) makes blocking HTTP call without timeout
  2. concurrent = true allows overlapping executions on each cron trigger
  3. Each stuck execution consumes a default pool thread indefinitely
  4. All pool threads consumed (OOTB on AEM 6.5 LTS that's only 5; environments hardened for throughput typically run with 20+) → pool saturated
  5. If block policy has been changed to ABORT (OOTB is RUN), new Quartz triggers are rejected silently; on RUN they instead pile up on the caller thread and back-pressure the dispatch
  6. The workflow timeout-detection scheduler cannot dispatch new com/adobe/granite/workflow/timeout/job events
  7. Auto-advancement never happens

Diagnosis checklist:

  • Sling Thread Pools page (/system/console/status-slingthreadpools): Pool default → active count = max pool size?
  • Sling Thread Pools page: Pool default → block policy = ABORT?
  • Threads page (/system/console/status-Threads) or jstack: All sling-default-* threads stuck on same stack?
  • Sling Jobs page (/system/console/slingevent): Workflow job topic has high Failed Jobs?
  • Sling Scheduler page (/system/console/status-slingscheduler): ThreadPool = default for ApacheSlingdefault?

Fix: Restart instance (immediate); fix scheduler code (add HTTP timeout, set concurrent=false); change pool policy to RUN; increase pool size.

Pattern B: High workflow job failure rate

Symptom: numberOfFailedJobs >> numberOfFinishedJobs for a workflow topic.

Root cause: Process step exception, payload deleted, or process not registered.

Diagnosis: Search error.log for Error executing workflow step + model name. Check process.label in Felix Console → OSGi Components.

Pattern C: Stale workflows accumulating

Symptom: Workflows in RUNNING state but no work items; Inbox empty despite running instances.

Root cause: Cannot archive workitem during transition; JCR session crash during step completion.

Diagnosis: Search for Cannot archive workitem; JMX countStaleWorkflows; restartStaleWorkflows(dryRun=true).


References

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Workflow Debugging」では何ができますか?

Debug AEM Workflow issues on AEM 6.5 LTS and AMS including stuck workflows, failed steps, missing Inbox tasks, launcher failures, stale instances, thread pool exhaustion, queue backlogs, purge failures, and permissions errors. Use when the user reports workflow problems on AEM 6.5 LTS or AMS, asks why a workflow is stuck or failed, needs step-by-step troubleshooting, or provides thread dumps, configuration status dumps, or Sling Job console output for analysis.

TypingMindでWorkflow Debuggingを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Workflow Debuggingはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにWorkflow Debuggingをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/adobe/skills/tree/main/plugins/aem/6.5-lts/skills/aem-workflow/workflow-debuggingを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Workflow Debuggingを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Workflow Debuggingは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもWorkflow Debuggingを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Workflow Debugging」は無料ですか?

はい。adobeがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇