This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

Process instances which execute a K2 Connect SmartObject intermittently get connection-related errors.

For example: 

  1. Type 'ERPConnect.CommunicationException' in Assembly 'ERPConnect35, Version=4.39.4.3, Culture=neutral, PublicKeyToken=737201975e95eeee' is not marked as serializable.

  2. RfcInvoke failed(RFC_INVALID_HANDLE): Invalid RFC connection handle: 486516512;

  3. RfcInvoke failed(RFC_COMMUNICATION_FAILURE):
    LOCATION CPIC (TCP/IP) on local host with Unicode
    ERROR program state check for conversation 82710016
    TIME Tue Aug 15 11:22:41 2017
    RELEASE 721
    COMPONENT CPIC (TCP/IP) with Unicode
    VERSION 3
    RC 471
    MODULE r3cpic.c
    LINE 6078
    DETAIL called function STSEND in state state=BUFFER_DATA2
    COUNTER 297

  4. RfcInvokeFailed(RFC_INVALID_HANDLE): An invalid handle was passed to the API call;

Symptoms

Multiple instances of the process are kicked off at the same time. A possible reason for the intermittent connection errors certain instances would receive, would be the simultaneous K2 Connect SmartObject calls to SAP.

Resolution

A fix is available for K2 Connect 4.7. If you are experiencing a similar issue, kindly log a ticket to K2 Support referencing this KB article to obtain the fix.