listActiveWorkflows
Monitor and manage currently running workflow instances in Adobe Experience Manager to track progress and identify bottlenecks.
Instructions
List all currently running workflow instances
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Implementation Reference
- dist/mcp-server.js:751-754 (handler)MCP server dispatch handler for listActiveWorkflows tool, extracts limit and calls AEMConnectorcase 'listActiveWorkflows': { const limit = args.limit; const result = await aemConnector.listActiveWorkflows(limit); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
- dist/aem-connector-new.js:204-205 (helper)Delegation from AEMConnector to WorkflowOperationsasync listActiveWorkflows(limit) { return this.workflowOps.listActiveWorkflows(limit);
- Core handler logic: Queries AEM QueryBuilder for running cq:WorkflowInstance nodes and maps to response formatasync listActiveWorkflows(limit = 20) { return safeExecute(async () => { try { // Query active workflows const response = await this.httpClient.get('/bin/querybuilder.json', { params: { type: 'cq:WorkflowInstance', 'property': 'state', 'property.value': 'RUNNING', 'p.limit': limit.toString(), 'p.hits': 'full' } }); const workflows = (response.data.hits || []).map((hit) => ({ workflowId: hit.path?.split('/').pop() || hit.name, model: hit['jcr:content/model'] || hit.model, payloadPath: hit['jcr:content/payload'] || hit.payload, status: hit['jcr:content/state'] || hit.state, startedBy: hit['jcr:content/startedBy'] || hit.startedBy, startedAt: hit['jcr:content/startedAt'] || hit.startedAt, currentStep: hit['jcr:content/currentStep'] || hit.currentStep, progress: this.calculateProgressFromHit(hit) })); return createSuccessResponse({ workflows, totalCount: workflows.length, activeCount: workflows.length, completedCount: 0, failedCount: 0 }, 'listActiveWorkflows'); } catch (error) { throw handleAEMHttpError(error, 'listActiveWorkflows'); } }, 'listActiveWorkflows');
- dist/mcp-server.js:442-451 (schema)Input schema and metadata for the MCP tool listActiveWorkflows{ name: 'listActiveWorkflows', description: 'List all currently running workflow instances', inputSchema: { type: 'object', properties: { limit: { type: 'number' } } }, },
- dist/mcp-server.js:567-569 (registration)Registration of tools list handler, which includes listActiveWorkflows schemaserver.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });