Expand my Community achievements bar.

SOLVED

Process Id vs Task Id

Avatar

Level 10

By any chance a number (say 5505) be assigned to a Process and a Task?

When I search a task using its id (5505) , it appears as a running task in the search result.

When I try to search processes using the same Id, it shows a completed process instance.

How is this possible?

From my knowledge, I'm assuming that the process id & task id shares a single unique sequence number. Am i correct?

Nith

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

This is expected and normal because Processes and Tasks are separate entities.  There will definitely be overlap as the values are assigned independently.  The first process id in the system will have a process instance id of 1 and the first task will have a task id of 1.

FYI, for performance reasons, these ids are currently allocated in blocks of 100 so if you have a brand new 2 node cluster, one will be assigning ids in the range of 1-100 and the other will assigning ids in the range of 101-200.  This means that you can't depend on these ids to imply creation order (e.g. process id 111 could have been created before process id 11).

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

This is expected and normal because Processes and Tasks are separate entities.  There will definitely be overlap as the values are assigned independently.  The first process id in the system will have a process instance id of 1 and the first task will have a task id of 1.

FYI, for performance reasons, these ids are currently allocated in blocks of 100 so if you have a brand new 2 node cluster, one will be assigning ids in the range of 1-100 and the other will assigning ids in the range of 101-200.  This means that you can't depend on these ids to imply creation order (e.g. process id 111 could have been created before process id 11).

Avatar

Level 10

Thanks for the clear explanation.

It would be great if this point is document somewhere!

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----