I have Created one Console Application to intreact with K2 Worklfows, my Application has functionalities to start the workflow, retrieve the worklfowlist, retrieve the workflowlist-item & action to finish the workflow activity.
This application is working perfect in Client Machine & Production Server Environment,
Problem :
If i am executing this application into other Server which has Same environment for operation system, it is working fine for Start Workflow, retrieve the worklfowlist & retrieve the workflowlist-item.
But it is not executing the Action Event to finish the workflow activity and there is no exception error by the application, even it's giving the output success as it desigen.
can any buddy support me to resolve this issue, because it's working from client machine & production server smoothly. and I have other server where this application need to be install and execute.
i have checked the K2 Production server logs, where i am getting only this error every executing action to finish.
Hi @SalmanZubairy not sure is you are still struggling with this problem of find some way to resolve. But in general I can say the following:
1) If code works on some of the machines, then it is not a code problem by all signs.
2) If you confirmed that host server logs invalid archive type error each type you execute your code it is a thing you need to focus on.
3) Based on what I saw so far this error ("K2Worker.Action","1 Invalid archive type") this error, like was already noted by @colinm is most of the time caused by a mismatch of the DLL's referenced in the solution (they need to match up between server when you build and others to which you deploy). You can try to compare that DLL versions (K2 installation directory and GAC) are the same between "good" and "bad" servers. You can use some scripting for file versions comparison or utility like Beyondcompare. Easy thing to try is to reinstall latest CU/FP in all your environments (to ensure that DLLs are properly updated). I also often see that people not updating their developer workstations to the CU/FP levels matching their target servers (and they must match).
4) Possibly you can run something like procmon.exe to see what specific DLLs K2 process tries to access at the time when invalid archive error is logged, then check versions of those specific DLLs (also see that they are not blocked by Windows).
You mentioned that the operating systems are the same between the environments. This erorr can occur if the K2 components are not the same. Have you verified that the K2 servers are the same version and have the same patch level?
My application is executing Workflow action & completing Activity only two way.
1. If i am executing this application from any Local PC which i have tried more then three local PC
2. if i am executing this application in our Production Server.
Only this two case is ok for my application where all operation are working fine such as Start, Retrieve & Action (Finish the Activity).
Problem:
If i am execution this application in any other server such as
1. Development Server where one K2 already Installed with same version.
2. any other server in which k2 does not install.
3. any Virtual Client Machine
I am using below Code
SCConnectionStringBuilder builders = new SCConnectionStringBuilder();
builders.Authenticate = true; builders.Integrated = true; builders.IsPrimaryLogin = false; builders.Host = _ServerName; //server name of the K2 host server builders.Port = _ServerPort; //use port 5252 for SourceCode.Workflow.Client connections builders.SecurityLabelName = _SecurityLabel; //the name of the security label to use for authenticating the credentials below builders.WindowsDomain = _Domains; builders.UserID = _Username; //user name to be authenticated builders.Password = _Password; //password for the user to be authenticated
Connection K2Conn = new Connection(); K2Conn.Open(_ServerName, builders.ToString());
Hi @SalmanZubairy not sure is you are still struggling with this problem of find some way to resolve. But in general I can say the following:
1) If code works on some of the machines, then it is not a code problem by all signs.
2) If you confirmed that host server logs invalid archive type error each type you execute your code it is a thing you need to focus on.
3) Based on what I saw so far this error ("K2Worker.Action","1 Invalid archive type") this error, like was already noted by @colinm is most of the time caused by a mismatch of the DLL's referenced in the solution (they need to match up between server when you build and others to which you deploy). You can try to compare that DLL versions (K2 installation directory and GAC) are the same between "good" and "bad" servers. You can use some scripting for file versions comparison or utility like Beyondcompare. Easy thing to try is to reinstall latest CU/FP in all your environments (to ensure that DLLs are properly updated). I also often see that people not updating their developer workstations to the CU/FP levels matching their target servers (and they must match).
4) Possibly you can run something like procmon.exe to see what specific DLLs K2 process tries to access at the time when invalid archive error is logged, then check versions of those specific DLLs (also see that they are not blocked by Windows).