I just 'inherited' a K2 workflow where 30 code-behind events are identical, but continue on to different activities. I'd like to be able to maintain those 30 events in just one place, rather than all 30. So, I tried to create code like:
public void Main(Project_5bd80e5cfda54243b372945364e45280.EventItemContext_5d0e69be76f940f7ac52232d6825257e K2) { WriteOracleUpdates(K2); }
public void WriteOracleUpdates(Project_5bd80e5cfda54243b372945364e45280.EventItemContext_5d0e69be76f940f7ac52232d6825257e K2) {
string connectionString = K2.StringTablee"GBIP_ICO_Connection_String"];
//Lots of other code here
}
However, in attempting to call this code from other Events, I am running into type casting issues, giving me a 'Cannot Convert Type
Project_5bd80e5cfda54243b372945364e45280.
EventItemContext_65196629d1cb4a92a35c45659291c210
to
Project_5bd80e5cfda54243b372945364e45280.
EventItemContext_5d0e69be76f940f7ac52232d6825257e
Does anyone have any ideas how to get around this? I prefer not to have to pass every single variable, as I have 40 variables. Any help would be appreciated.
This all is brand new to me, and while I can follow through what's going on, my experience in C# and K2 is minimal at this point.
Thanks!