Get exception class java.lang.IllegalArgumentException while trying to get context of a task

Hello guys,

When I try to get the context of a user task with his id throught this API : ../API/bpm/userTask/{{taskId}}/context (from Bonita Documentation)

Everything works fine.

But when I supposed to get the context of a general task like this ../API/bpm/task/{{taskId}}/context (not found in Bonita Documentation)

I go the exception below:

{

    "exception": "class org.bonitasoft.web.toolkit.client.common.exception.api.APIException",

    "message": "java.lang.IllegalArgumentException: Can't convert compound ID to long",

    "cause": {

        "exception": "class java.lang.IllegalArgumentException",

        "message": "Can't convert compound ID to long"

    },

    "api": "bpm",

    "resource": "task"

}

Anyone please can help how to get the context of a task in this case ?

Thanks very much !

Hi,

Only process instances and user tasks have a context. Other task/flow node types don’t.

HTH
Romain

Ok ok I see. Thanks so much ! :)