Error Handling

โŒ˜K
  1. Home
  2. Docs
  3. Error Handling
  4. TerminateWorkflow

TerminateWorkflow

System.Activities.Statements.TerminateWorkflow

  • TerminateWorkflow activity is used to terminates the running workflow instance, raises the completed event in the host and reports error information.
  • Once the workflow is terminated, it cannot be resumed.

ย Properties

ย  ย  ย  Misc

  • DisplayName (String) โ€“ To set a meaningful name according to the user.
  • Exception (InArgument<Exception>) – To throw an exception, followingis the syntax

ย  ย  ย  ย  ย  ย  ย  ย  newException(โ€œThrowing an exception because something went wrongโ€)

ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย OR

ย  ย  ย  ย  ย  ย  ย  ย  newBusinessRuleException(โ€œThrowing an exception because this transaction needs to beย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย referred back to the businessโ€)

  • Reason (InArgument<String>) โ€“ Define the reason for which the workflow can get terminated.