completeWorkflowStep
Complete a specific workflow step in Adobe Experience Manager by providing workflow ID, step name, and optional comment to advance content approval processes.
Instructions
Complete a workflow step
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | ||
| stepName | Yes | ||
| comment | No |
Implementation Reference
- dist/mcp-server.js:756-760 (handler)Primary MCP tool handler implementation for 'completeWorkflowStep'. Extracts parameters from tool call arguments and delegates execution to the AEMConnector instance.case 'completeWorkflowStep': { const { workflowId, stepName, comment } = args; const result = await aemConnector.completeWorkflowStep(workflowId, stepName, comment); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- dist/mcp-server.js:452-464 (schema)Tool schema definition including name, description, and input schema validation for 'completeWorkflowStep', used for registration and listTools response.{ name: 'completeWorkflowStep', description: 'Complete a workflow step', inputSchema: { type: 'object', properties: { workflowId: { type: 'string' }, stepName: { type: 'string' }, comment: { type: 'string' } }, required: ['workflowId', 'stepName'], }, },
- Core business logic handler for completing a workflow step. Makes authenticated HTTP POST request to AEM's workflow API endpoint and wraps response.async completeWorkflowStep(workflowId, stepName, comment) { return safeExecute(async () => { if (!workflowId || !stepName) { throw createAEMError(AEM_ERROR_CODES.INVALID_PARAMETERS, 'Workflow ID and step name are required', { workflowId, stepName }); } // Complete the workflow step const stepData = { action: 'complete', comment: comment || `Step ${stepName} completed via AEM MCP Server` }; const response = await this.httpClient.post(`/etc/workflow/instances/${workflowId}/steps/${stepName}`, stepData, { headers: { 'Content-Type': 'application/json' } }); return createSuccessResponse({ workflowId, stepName, comment: stepData.comment, status: 'COMPLETED', completedAt: new Date().toISOString() }, 'completeWorkflowStep'); }, 'completeWorkflowStep');
- dist/aem-connector-new.js:198-199 (helper)Delegation method in AEMConnector class that forwards the call to the WorkflowOperations module.async completeWorkflowStep(workflowId, stepName, comment) { return this.workflowOps.completeWorkflowStep(workflowId, stepName, comment);
- dist/mcp-handler.js:85-86 (handler)Alternative handler implementation in MCPRequestHandler class (potentially unused), delegates to AEMConnector.case 'completeWorkflowStep': return await this.aemConnector.completeWorkflowStep(params.workflowId, params.stepName, params.comment);