Hi
I use K2 Designer for Visual Studio.
I create an Activity with a Server event. I want to catch exception of this event. In the server event wizard i check "Enable Exception Rule" and click on View Code. I see a Workflow, right click and View Code. I add my code : set a datafield
public partial class Exception_36d6348add684e9f82f7b6ebbccea099 : IWorkflowContext<HostContext>
{
#region - K2 Context -
private HostContext _K2;
[EditorBrowsable(EditorBrowsableState.Never)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public HostContext K2
{
get { return _K2; }
set { _K2 = value; }
}
#endregion
#region - Properties_ExecuteCode -
private void Properties_ExecuteCode(object sender, EventArgs e)
{
K2.ProcessInstance.DataFields["IsException"].Value = true;
K2.AddToErrorLog = K2.Configuration.IsErrorLog;
K2.AddToServerLog = K2.Configuration.IsServerLog;
}
#endregion
}
But when i execute my workflow, exception is not caught. My workflow has error status.
So my question is how can i signify that i catch exception and treat it ?
Thank for your replies
