about us      downloads      documentation      contact      home 
 products
 antHR
 workflow studio
 technical toolkits
 content entry
 workflow
 security
 hierarchy
 concepts
 how tos
 reference
 FAQs
 next: Design

How to: Create a new Action in .NET

  Step 1 : Summary
  Step 2 : Design
  Step 3 : Implementing the skeleton
  Step 4 : Adding a property
  Step 5 : Finishing the implementation
  Step 6 : Registering and testing the action

Create a new .NET Action to implement custom functionality - (page 1 of 6)

Level: developer

This "how to" shows you how to create a new workflow Action in .NET.
It discusses the structure of an Action and the design considerations when creating a new Action. A walkthrough of the development process is then given with examples in C# (although any .NET language may be used), and the process of deploying and testing the finished Action is shown.
In order to illustrate this process, we will build a simple synchronous action to send an email. In order to see a more complex action see task type how to, which implements a asynchronous, user action.
It is assumed that the reader has a good knowledge of C# or another .NET language.

Structure of an Action
Each action defines:
   A set of properties through which the user specialises the behaviour of the action when the workflow is being designed. As an example, a Mail action may have properties for the To, Subject and Body fields of the e-mail. Properties are stored in the activity definition in the workflow using content entry.
   A set of named results that define the different transitions that may occur from this action. For example, a Yes-No question will have two transitions, corresponding to the "yes" and "no" results of the question. Every action must have at least one transition.
   The behaviours for starting the action, handling responses and aborting the action.

Actions are written by implementing the Ant.Workflow.Action interface and then registering the action in the hierarchy.


 

Did you find this article helpful? Comments on this page are welcome and can only help us improve the quality of our documentation.
© Ant Organisation Ltd, 2003