incubator-kie-kogito-runtimes icon indicating copy to clipboard operation
incubator-kie-kogito-runtimes copied to clipboard

Allow to identify task by name (or unique ID known at design time) in task management API

Open tokarenko opened this issue 2 years ago • 3 comments

Description

Task management API requires to know task instance ID in addition to a task name (that is also an identifier): http://host:port/process name/process instance ID/task name/task instance ID

Getting task instance ID requires parsing JSON returned by HTTP-request to http://host:port/process name/process instance ID/tasks. This complicates task management interface with Kogito. Especially for systems that do not have mature automation capabilities.

I suggest to allow identification of tasks by name (or unique ID known at design time) in task management API. This will allow to integrate much easier with other systems.

Is there any workaround to implement custom REST endpoint for such identification?

Implementation ideas

No response

tokarenko avatar Oct 04 '22 16:10 tokarenko

@tokarenko The interface is designed to support multiple task instance of the same task type (task name is not a good naming choice, it is in fact the task type) What you are requesting is basically the possibility of assigning a unique ID for every task at design time, so Kogito rather than automatically creating an identifier for the task, use the one specified at design time. @krisv what do you think? As a workaround, parsing the JSON should not be such a problem (that's the current assumption made by us when designing the API :)). Whats the issue? the nested path?

fjtirado avatar Oct 05 '22 07:10 fjtirado

Thank you for your quick reply. I am trying to integrate with Jira having limited out-of-box capabilities (web hooks): it can send HTTP-request but not more than that.

tokarenko avatar Oct 05 '22 12:10 tokarenko

@fjtirado , could you advice as a workaround how to get task instance ID by task name using KogitoProcessContext? I am going to return the ID to Jira in HTTP-reply as a process variable when process starts.

tokarenko avatar Oct 06 '22 08:10 tokarenko