Platform SDK: Exchange 2000 Server

Adding Action Table Rows

[This is preliminary documentation and subject to change.]

Once you have a recordset with the proper layout of columns you can begin adding records. To do this you first open the recordset with the fields previously appended, then use the AddNew method to add records — rows in the action table. For an example of how to append fields to a recordset before adding records see Creating Action Table Columns. See the Microsoft® ActiveX® Data Objects (ADO) topic (in the MSDN™ Library, Platform SDK: Data Access Services : Microsoft Data Access Components (MDAC)) for a more detailed explanation of working with record and recordset objects. Once you have added your records to the recordset, you can assign the recordset object to the ActionTable property of the ProcessDefinition.

[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