+44(0)1908 545 770
YOUR EXPERT RPA PARTNER

Team up with our RPA strategy and tech specialists for maximum automation impact

Find out more
Harness the power of UiPath in your business.
WATCH NOW

Save money and spend more time on priority work.

Book consultation
READY, SET, AUTOMATE

Let's choose, design and deploy a process automation solution for your business.

Find out more
TRANSFORM YOUR BUSINESS

Let's analyse your business to discover opportunities for innovation and automation.

Find out more

Begin your business transformation journey

Book consultation
AUTOMATE EVERY FUNCTION

Automate where it matters most. Scale to solve challenges in every area

Find out more
GIVE EVERY TEAM THE TOOLS FOR SUCCESS

Equip people with user-friendly solutions that save time and make work easier

Find out more

Which business problem
can we solve first?

Book consultation
31 August 2014

Input string was not in a correct format after upgrading to K2 4.6.8

We recently upgraded K2 blackpearl to version 4.6.8 as part of a big system upgrade for a UK defence customer.  The K2 upgrade went well, and we only encountered one issue that I want to share a solution for.

After refreshing the SQL Server Instance post-upgrade using the K2 SmartObject Tester, K2 host server displayed the following issue when a K2 SmartObject is called:

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.

 

Free K2 Five Upgrade Review

Free K2 Five Upgrade Review

 
"8250530","2014-08-31 16:41:36","Error","General","28083","ExtenderExecuteError","ProcessInstance.HandleException","28083 ServerEvent: Input string was not in a correct format.
InnerException: Input string was not in a correct format.Couldn't store <176.000000000> in Id Column.  Expected type is Int64.
InnerException: Input string was not in a correct format.","","",

K2 backpearl Input String not in correct format errorUpon closer inspection, the SmartObject seems to be calling a SQL Server Stored Procedure and returning a scope_identity() value

K2 SmartObject Method return Id propertyThis is mapped to a return Id property.

K2 SmartObject Method return Id NumberIt looks like pre-468, K2 implicitly converts decimal scope_identity() values to Int64, but not anymore with 4.6.8 – which is a good thing.  The problem is just if you have legacy code, you will have to ensure the return values are Int, else the K2 will raise the "Input string was not in a correct format" when the SmartObject is called.  In our case, the K2 workflow went into error state

K2 backpearl Workspace – Input String not in correct format errorThe fix is simple.  Ensure you declare an Int variable in your Stored Procedure, and return the following

 

K2 SmartObject Method return Id property – intEnsure you refresh your K2 SQL Server Instance using the K2 SmartObject tester before attempting to re-run the K2 SmartObject or re-try the K2 transaction in K2 Workspace.

It all works now for us and our K2 customer is happy!

Need further technical advice or support?