Partager via


Adding ActionTable Rows

Adding ActionTable Rows

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

After you have created a recordset with the columns required by the workflow engine, you can add records. To do this, begin by opening the recordset with the fields that were already appended, then use the AddNew method to add records. After you have added your records to the recordset, you can then assign the Recordset object to the ActionTable Property of the ProcessDefinition.

The following example demonstrates how to add records to the recordset.

Visual Basic

   Rs.Open
   If Err.Number <> 0 Then
      Debug.Print "Failed to open ActionTable Recordset" & Err.Description
   End If

   With Rs
    .AddNew varColumnNames, Array("1", "OnCreate", "", "Submitted", "OnCreate", "true", "", "sendmail(""new ProcessInstance"")", "", "", "", "", "", "0")
    .AddNew varColumnNames, Array("2", "OnEnter", "", "Submitted", "OnEnter", "true", "", "sendmail(""entered submitted state"")", "", "", "", "", "", "0")
    .AddNew varColumnNames, Array("3", "OnExpiry", "Submitted", "Submitted", "OnExpiry", "true", "", "sendmail(""submitted state expired"")", "", "", "", "", "", "0")
    .AddNew varColumnNames, Array("4", "OnDelete", "Submitted", "", "OnDelete", "true", "", "sendmail(""deleted ProcessInstance"")", "", "", "", "", "", "0")
   End With

For an example of how to append fields to a recordset before adding records, see Creating Action Table Columns. For a more detailed explanation of working with Record and Recordset objects, see the Microsoft® ActiveX® Data Objects (ADO) topic in the MSDN® Library Platform SDK, Data Access Services, Microsoft Data Access Components (MDAC).

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.