I am attempting to call a stored procedure via a script object in a Business Process. When the system complies, I get the error:‘
UserConnection’ is a type, which is not valid in the given context
Any suggestions on how to resolve this?
Below is my code:
StoredProcedure storedProcedure = new StoredProcedure(UserConnection, "mystoredprocedure") ; storedProcedure.Execute(); return true;
Thanks in advance.
Like
2 comments
11:21 Jan 23, 2018
In a script task in an interpretive business process you need to get "user connection" with the following syntax:
var userConnection = Get<UserConnection>("UserConnection");
Additionally, please note that if you want to work with process parameters in a script task, you need to write in the following maner:
var parameter1 = Get<Guid>("Parameter1");
Set("Parameter2", parameter1.ToString());
var parameter2 = Get<string>("Parameter2");
Show all comments