I recently had some issues with the following error (authentication with server failed), which manifested on all work flows being executed on a specific K2 BlackPearl server:
Authentication With Server Failed : The password for this account has expired.
After checking and rechecking all passwords we came to the conclusion that all of them are still valid. What were K2 going on about? Then it dawned upon us that another project was recently deployed to the same server – Could it have something to do with this? And indeed it did.
K2 Automated Testing Software
BenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.
When K2 executes a workflow it reaches into the string table to retrieve the following server settings:
- Workflow Server,
- Workflow Management Server,
- SmartForms Server,
- SmartObject Server,
- Service Object Server and
- Category Server.
These settings tells it with which K2 database instance in SQL Server it needs to communicate in order to perform the myriad of operations it needs to. And it was these calls that resulted in the error. The entries in our string table was correct though, so why is it failing?
The other project which was deployed to the same server was making use of different credentials to connect to the K2 database. And these credentials were stored in a different environment library, resulting in a different string table being used. During deployment of the other project the existing workflows were reconfigured to make use of this new string table. And the password for this account is the one which has expired.
So in other words, what originally looked like this in the K2 workspace:
Changed to look like this:
The question now was obviously how to change it back to point to the original string table. As of yet I do not know of any ‘K2 approved’ way of doing this, and therefore the following method is at your own risk, and does not carry any official stamp of approval.
Workflows are linked to a specific String Table via entries in the [K2].[Server].[ProcSet] table. The following query will retrieve all these entries.
SELECT * FROM [K2].[Server] .[ProcSet]
To update it to the original string table I made use of the following statement:
UPDATE [K2].[Server] .[ProcSet]
SET StringTable = ‘Development’
WHERE FullName = ‘Workflow.SolutionSharedUpdateProcess’
As I mentioned before this is done completely at your own risk, and I don’t know what the long term consequences of this could be, but for now it worked.