Skip to main content
Glama

suspendWorkflow

Pause a running workflow instance in Adobe Experience Manager to temporarily halt automated processes for maintenance or issue resolution.

Instructions

Suspend a workflow instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYes
reasonNo

Implementation Reference

  • Core handler implementation that performs HTTP POST to AEM's /etc/workflow/instances/{workflowId} endpoint with action 'suspend' to suspend the workflow.
    async suspendWorkflow(workflowId: string, reason?: string): Promise<{
      success: boolean;
      operation: string;
      timestamp: string;
      data: {
        workflowId: string;
        reason?: string;
        status: string;
        suspendedAt: string;
      };
    }> {
      return safeExecute(async () => {
        if (!workflowId) {
          throw createAEMError(
            AEM_ERROR_CODES.INVALID_PARAMETERS, 
            'Workflow ID is required', 
            { workflowId }
          );
        }
    
        // Suspend the workflow
        const suspendData = {
          action: 'suspend',
          reason: reason || 'Suspended via AEM MCP Server'
        };
    
        const response = await this.httpClient.post(
          `/etc/workflow/instances/${workflowId}`, 
          suspendData,
          {
            headers: {
              'Content-Type': 'application/json'
            }
          }
        );
    
        return createSuccessResponse({
          workflowId,
          reason: suspendData.reason,
          status: 'SUSPENDED',
          suspendedAt: new Date().toISOString()
        }, 'suspendWorkflow');
      }, 'suspendWorkflow');
    }
  • MCP server CallToolRequestSchema handler that extracts parameters from MCP request and delegates to AEMConnector.suspendWorkflow
    case 'suspendWorkflow': {
      const { workflowId, reason } = args as { workflowId: string; reason?: string };
      const result = await aemConnector.suspendWorkflow(workflowId, reason);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • Input schema definition for the suspendWorkflow tool used in MCP listTools response
    {
      name: 'suspendWorkflow',
      description: 'Suspend a workflow instance',
      inputSchema: {
        type: 'object',
        properties: {
          workflowId: { type: 'string' },
          reason: { type: 'string' }
        },
        required: ['workflowId'],
      },
    },
  • Custom MCPRequestHandler switch case that handles suspendWorkflow requests and calls AEMConnector
    case 'suspendWorkflow':
      return await this.aemConnector.suspendWorkflow(params.workflowId, params.reason);
  • AEMConnector wrapper method that delegates suspendWorkflow call to WorkflowOperations module
    async suspendWorkflow(workflowId: string, reason?: string) {
      return this.workflowOps.suspendWorkflow(workflowId, reason);
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/indrasishbanerjee/aem-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server