Process instance XYZ not found for K2:DOMAINK2ServiceAccount

  • 4 December 2014
  • 1 reply
  • 60 views

Symptoms

 


We noticed there were constant errors in the K2 Host Server error logs:

"Error","General","1","GeneralErrorMessage","K2Worker.OpenProcessInstance","1 26023 Process instance 112 not found for K2:DOMAINK2ServiceAccount

Diagnoses

 


You can search through K2 database for process instance ID mentioned in error message using the following query (example assumes process ID is 112):

SELECT * FROM [K2].[Server].[ProcInst] WHERE ID ='112'
SELECT * FROM [K2].[ServerLog].[ProcInst] WHERE ID = '112'

 

 

 

If you cannot find anthing then it could be the case that something else is checking if this process exists / tries to execute it and as it fails to do so error messages appear in K2 host server log.

 

 

Resolution

Issue can be caused by "Process Error Notification Service" (PENS) installed and running (custom third party add-on from K2 marketplace).
To verify if this is the case you can stop and disable this service and check if error message no longer occurs. To prevent this error from happening some changes need to be made to the source code of this tool, see details below.
Two things you can do:

 

1) For a service that is running on a timer or thread, you should not open a connection to the server in “real-time” (less than 1sec) but rather let the Thread Sleep for a minute or so, to take some load off the server

 

2) Verify the logic - if the process instance is completed you should not try to open it.

 

 

 

Here is an example of how it should look like in code (pay attention to parts highlighted in yellow):15326i5511C089176B3CB7.jpg

 

If the code shown above attempt to open a Process Instance and it fails with a “26023” error code ("Process Not Found") it will skip it. 


1 reply

Badge +1

Thanks for posting this article.  We had installed the K2 Process Error Notification Service as well in our production environment.  At some point after we set it up, we started getting errors like the one above being logged in the Application log.   Turning off and disabling the service resolved the issue.

Reply