Class ProcessesMcpTool
- All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin
A process type (WorkFlow) is backed by a Task/Kanban project
(WorkFlow.projectId); a request (Work) IS a task
(Work.taskId) whose status is the task's Kanban column (default
columns: Request, RequestInProgress, Validated, Refused, Canceled).
Every method acts as the current user: the current user's social identity id
is resolved and passed to the self-scoping ProcessesService calls
(getWorks / getWorkById filter by createdBy), so
platform ACLs are enforced.
Approver actions ride the existing Task MCP tools by design: to respond
to a pending request, the agent calls the eXo Task tools on the request's task
id (update_task_status to Validated/Refused, add_task_comment).
This class deliberately does NOT duplicate that task-write path; it only
surfaces the pending requests to act on via getPendingApprovals().
-
Field Summary
Fields inherited from interface io.meeds.mcp.server.plugin.McpToolPlugin
DEFAULT_LIMIT, DEFAULT_OFFSET -
Constructor Summary
ConstructorsConstructorDescriptionProcessesMcpTool(org.exoplatform.processes.service.ProcessesService processesService, org.exoplatform.task.service.TaskService taskService, org.exoplatform.social.core.manager.IdentityManager identityManager) -
Method Summary
Modifier and TypeMethodDescriptioncancelWorkRequest(long requestId) getMyRequests(String status) getRequestDetails(long requestId) submitWorkRequest(long processId, String title, String description) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.meeds.mcp.server.plugin.McpToolPlugin
getCurrentUserAclIdentity, getCurrentUserLocale, getCurrentUserLocale, getCurrentUserName, getLocale
-
Constructor Details
-
ProcessesMcpTool
public ProcessesMcpTool(org.exoplatform.processes.service.ProcessesService processesService, org.exoplatform.task.service.TaskService taskService, org.exoplatform.social.core.manager.IdentityManager identityManager)
-
-
Method Details
-
listProcesses
- Throws:
IllegalAccessException
-
getMyRequests
- Throws:
Exception
-
getRequestDetails
public RequestModel getRequestDetails(long requestId) throws org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
org.exoplatform.commons.exception.ObjectNotFoundException
-
submitWorkRequest
public RequestModel submitWorkRequest(long processId, String title, String description) throws IllegalAccessException, org.exoplatform.commons.exception.ObjectNotFoundException - Throws:
IllegalAccessExceptionorg.exoplatform.commons.exception.ObjectNotFoundException
-
cancelWorkRequest
public RequestModel cancelWorkRequest(long requestId) throws IllegalArgumentException, org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException - Throws:
IllegalArgumentExceptionorg.exoplatform.commons.exception.ObjectNotFoundExceptionIllegalAccessException
-
getPendingApprovals
- Throws:
Exception
-