Skip to main content

I have a infopath web form with .net code behind that populates and executes an SAP web service. After submission I am executing the K2 generated Submit Workflow Service to start a K2 processinstance.


Try


Me.DataConnections("Submit Workflow Service").Execute()


sMsg += vbCrLf + vbCrLf + "PM Workflow Initiated."


Catch ex As Exception


sMsg += vbCrLf + vbCrLf + "PM Workflow Initiation failed. Contact your system administrator. " & vbCrLf & ex.Message


End Try


This works perfectly in DEV and QA, but now that I have moved it to the production environment I am getting an exception thrown. The message is:


InfoPath cannot submit the form.
An error occurred while the form was being submitted.

The SOAP response indicates that an error occurred on the server:

Server was unable to process request. ---> The process cannot be started due to the following reason: Send failed with error: An existing connection was forcibly closed by the remote host.


I've used NetStat on the K2 server to look at connections, and there is an active connection from  the prod web server, so it doesn't look like it is closed.


It is rather urgent, and I may need to submit a support request soon. Both of my QA and PRD k2 servers have been in use by other processes for a couple of years, but this is the first time I've used code to initiate the workflow. Another process (aspx form) is being started with code via the K2 object model, but that isn't available within the infopath form.


Can anyone help me?


 

Is the error immediate or does it take some time to pop up like a timeout issue?  Are the K2 port numbers the default?  Is there a difference between port numbers in Prod and QA/DEV


It is immediate, so it isn't a timeout. The port numbers are the same in QA and PROD. I have other processes in prod that are started by using infopath forms, but the difference is they are executing the data connection via a button rule ... submit using a data connection. It is the same data connection that I'm trying to execute in the code.


I'm going to build a test form to try to submit it with a button.


I added a button to submit, but it gets the same error.


 


Sounds there could be more going on here, and it sounds urgent for you.  I would open a ticket, and get that process started.


 


Can you open a ticket and report back?


The error was caused by wrong port number being used for workflow server. Making sure that the environmental variables contains the correct values for the environment.


Reply