こんにちは
Gmailでメールを作成するときに、メールアドレスをExcelの表から持ってきています。
書式が違うとき(@がない、ドットのカンマが違うなど)エラーが起こります。terminate workflowでエラーメッセージを出して停止したいのですが、どのような条件で書けば良いのかわかりません。
ご教示いただけますようお願いいたします。
try catch アクティビティを使用してこれに対するシステム例外を提供し、Exception.message を使用してログ メッセージを表示してから、terminate workflow アクティビティを使用できます。
どのアクティビティがエラーをスローすると予想される場合でも、それを try ブロックに入れて、このイメージを catch ブロックとして参照するだけです
それが役に立てば幸い
-
入力したメールが適切かどうかをチェックする if 文を使用します/
-
適切でない場合は、throw アクティビティを使用します。
画像 -
[プロパティ] タブに移動し、次のフォームのビジネス例外を作成します。
new BusinessRuleException(「無効な電子メール」) -
同じ場所で扱いたい場合はtry catchで囲み、上記3点がtryのスコープになります。 catch スコープで例外を BusinessRuleException として設定し、ログなどの必要なアクティビティを配置します。
サンプル XAML が添付されています:-
Main.xaml (10.5 KB)
Hi @sayaka.y
Encapsulate the Try catch activity for the Mail activities. In the Catch block give the throw activity in that throw activity write like this.
Exception.message → for throw the exception details in the Output panel.
Exception.Source → It gives the information which activity throws the error.
When the bot went to throw it will terminate the workflow.
Hope it helps!!
皆様ありがとうございました!無事にできました。
わかりやすかったです!ありがとうございました。
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.