ExternalEndpoint_REST - pdvrieze/ProcessManager GitHub Wiki

REST methods for nl.adaptivity.process.userMessageHandler.server.ExternalEndpoint

The external interface to the user task management system. This is for interacting with tasks, not for the process engine to use. The process engine uses the {@link InternalEndpoint internal endpoint}.

The default context path for the methods in this endpoind is /PEUserMessageHandler/UserMessageService

Note that task states are ordered and ultimately determined by the process

Method HTTP Path Description
getPendingTasks GET /allPendingTasks? Get a list of pending tasks.
getPendingTasks GET /pendingTasks? Get a list of pending tasks.
updateTask POST /pendingTasks/${handle}? Update a task.
getPendingTask GET /pendingTasks/${handle}? Retrieve the current pending task for the given handle.
startTask POST /pendingTasks/${handle}? Mark a task as started.
takeTask POST /pendingTasks/${handle}? Mark a task as Taken.
finishTask POST /pendingTasks/${handle}? Mark a task as Finished.

Path: /allPendingTasks

Actual parameters

Parameter Param type Data Type Description
return Collection All tasks available

Path: /pendingTasks

Actual parameters

Parameter Param type Data Type Description
user PRINCIPAL Principal The user whose tasks to display.
return Collection All tasks available

Update a task. This takes an xml task whose values will be used to update this one. Task items get overwritten with their new values, as well as the state. Missing items in the update will be ignored (the old value used. The item state is a draft state, not the final version that the process engine gets until it

Path: /pendingTasks/${handle}

Actual parameters

Parameter Param type Data Type Description
handle VAR String The handle/id of the task
partialNewTask BODY XmlTask The partial task to use for updating.
user PRINCIPAL Principal The user whose task state to update.
return XmlTask The Updated, complete, task.

Path: /pendingTasks/${handle}

Actual parameters

Parameter Param type Data Type Description
handle VAR String The task handle (as recorded in the task handler, not the process engine handle).
user PRINCIPAL Principal The user whose task to retrieve.
return XmlTask The task.

Path: /pendingTasks/${handle}

Mandatory parameters

These will determine the actual method invoked, more specific over less specific.

Kind content Explanation
POST state=Started Must be set in the POST body

Actual parameters

Parameter Param type Data Type Description
handle VAR String The task handle.
user PRINCIPAL Principal The owner.
return IProcessNodeInstance.NodeInstanceState The new state of the task after completion of the request.

Path: /pendingTasks/${handle}

Mandatory parameters

These will determine the actual method invoked, more specific over less specific.

Kind content Explanation
POST state=Taken Must be set in the POST body

Actual parameters

Parameter Param type Data Type Description
handle VAR String The task handle.
user PRINCIPAL Principal The owner.
return IProcessNodeInstance.NodeInstanceState The new state of the task after completion of the request.

Mark a task as Finished. This will allow the process engine to take the data, and transition it to completed once it has fully handled the finishing of the

Path: /pendingTasks/${handle}

Mandatory parameters

These will determine the actual method invoked, more specific over less specific.

Kind content Explanation
POST state=Finished Must be set in the POST body

Actual parameters

Parameter Param type Data Type Description
handle VAR String The task handle.
user PRINCIPAL Principal The owner.
return IProcessNodeInstance.NodeInstanceState The new state of the task after completion of the request.

Legend

There are various parameter types available RestParam.ParamType:

Type Description
QUERY This will use both POST and GET parameters, where GET overrides POST.
POST The parameter will be resolved through a post body only. The body should be multipart/form-data or application/x-www-form-urlencoded.
GET The parameter will be resolved through the request query only.
XPATH The request body is an xml document and the parameter is the result of evaluating the xpath expression on it. Requires setting {@link #xpath()}
VAR The parameter is resolved through a variable defined in the {@link RestMethod} annotation on the method.
BODY The parameter is the entire request body. This will be processed using the regular unmarshalling algorithms.
ATTACHMENT The parameter is the request body, but the method will handle it itself.
PRINCIPAL The parameter is fulfilled by the server by providing the logged in user.
⚠️ **GitHub.com Fallback** ⚠️