Quan Vo
Quan Vo

Reputation: 1799

Activiti Rest api: capture all requests when submit user tasks

Currently, I'm using activiti-rest to commit user task on activiti.

Example: Url: http://{host}:{port}/activiti-rest/service/runtime/tasks/{taskId}

{
    "action" : "complete",
    "variables": [
        {
            "name": "strStatus",
            "value": "new"
        },
        { 
            "name": "isNeedApproval",
            "value": true
        }
    ]
}

and I want to capture all requests which send to activiti-rest include headers, data, prcess difinition... Which interface should I implement? I have used ActivitiEventListener, but the type ACTIVITY_COMPLETED & TASK_COMPLETED are wrongs, beside that it don't include header in ActivitiEvent.

I'm consider to use HandlerInterceptorAdapter, but I don't know how to add an Interceptor to current activiti-rest project.

Please help,

Thanks!

Upvotes: 0

Views: 284

Answers (2)

Ben
Ben

Reputation: 1599

Since Activiti is using Spring, an alternative to a servlet filter could be an aspect using AspectJ

Upvotes: 1

Greg Harley
Greg Harley

Reputation: 3240

To capture headers you will need a servlet filter.

Upvotes: 1

Related Questions