Windowsワークフロー基盤で、ThrowActivityにカスタムエラーメッセージをスローすることは可能ですか?
例えば。私のWFでこの例外をスローしたいと想像してください:-
CutomException("This is my custom error message", myNumber, myObect);
乾杯 :)
Windowsワークフロー基盤で、ThrowActivityにカスタムエラーメッセージをスローすることは可能ですか?
例えば。私のWFでこの例外をスローしたいと想像してください:-
CutomException("This is my custom error message", myNumber, myObect);
乾杯 :)
あなたの質問をよく理解していないかもしれませんが、アクティビティを実行する前に、のFault
プロパティを使用して特定の例外を設定できます。例:ThrowActivity
throwActivity1.Fault = new CustomException("This is my custom error message", myNumber, myObect);
このようにして、任意のカスタム例外をスローできます。
public DiscontinuedProductException stoppedProductException1 = 新しい DiscontinuedProductException();
[SerializableAttribute()] public class DiscontinuedProductException : Exception { public DiscontinuedProductException() : base() { }
public DiscontinuedProductException(string message)
: base(message)
{
}
public DiscontinuedProductException(string message, Exception innerException)
: base(message, innerException)
{
}
protected DiscontinuedProductException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}