遇到K2 SERVER MANAGER平台错误报障:An Activity with a client event should at least have one destination
解决办法如下:
if(K2.ProcessInstance.ID.ToString()=="471247")
{
K2.Destinations.Add(DestinationType.Queue,'TmpDestinationQueue');
}
else
{
//原代码块
}
参考资料如下:
An exception occurs when trying to resolve an Active Directory Group to users in K2.net™ Studio, or “An Activity with a client event should at least have one destination” error is shown in the K2.net™ 2003 Service Manager
Issue: There is a known issue with regards to Active Directory user names, organizational units or groups which contain special characters. The issue will present itself in the following ways: | |||
1) | In K2.net® 2003 Studio, you may see an "Unknown Error" error when you right-click the Active Directory Group in the destination queue, and select "Resolve to Users": | ||
| |||
| |||
| |||
2) | You may see an error in K2.net® 2003 Service Manager's Error Profiles that states: "An Activity with a client event should at least have one destination" | ||
| |||
In these cases a username, Organizational Unit or Group Name in the Active Directory structure may contain special characters. These characters are not handled properly by the .NET Framework classes that query Active Directory,, therefore an exception is thrown. This will result in the error in K2 Studio, or a Destination Queue being empty on the K2.net® 2003 Server. | |||
Resolution: | |||
1) | This issue has been addressed in K2.net 2003 with SP 2. To resolve the issue, update your current K2.net 2003 installation with Service Pack 2 or with the most current service pack release.. | ||
2) | Remove the special characters from the Active Directory entries where required and use the K2.net® Service Manager to refresh the destination queue: | ||
| |||
Once you have implemented one of the options discussed above you can then proceed to repair the error as described below. | |||
To Repair the error: Use the "Repair Error" option in the K2.net Service Manager's Error Profiles to repair the "An Activity with a client event should at least have one destination" error: | |||
| |||
K2.net 2003 Service Pack 2 has been tested with the following special characters and supports their use: | |||