ObjectList

You can use this function for Optiva workflows.

Purpose

The ObjectlList property is used in a workflow in which a WIP can be run for all selected objects instead of one WIP for each object. Using the ObjectList property, a workflow script can determine if it is currently part of a batch of objects. The ObjectlList retrieves the list of object IDs for the current batch of Workflows-In-Progress (WIP).

Syntax


Dim variable() As String = Context.ObjectList

Description

Optiva creates a Workflow-In-Progress (WIP) for each object selected in the workspace.

The ObjectList property is used to return an array of object ID codes for the current workspace. This property also determines if the current workflow is a part of the batch of selected objects. You can run a single WIP for all the objects by creating the workflow script code using the object ID codes. The remaining WIPs exit the script with a return code 111.

Example

Using the script in the following example, the index of the current object ID can be verified from the ObjectlList property array.

Option Strict On
Imports System

Class ActionScript
Inherits FcProcFuncSetEventWF

Function wf_start() As Long
  Message List("Object list: ")
  For i As Integer = 0 To Context.ObjectList.Length - 1
      Dim objectCodeEntry As String = Context.ObjectList(i)
      Dim isCurrentObject As Boolean = (objectCodeEntry = _OBJECTKEY)
      If isCurrentObject Then
        MessageList(String.Format("{0} - {1} <-- CURRENT ObjectKey", i, objectCodeEntry))
      Else
        MessageList(String.Format("{0} - {1}", i, objectCodeEntry))
      End If
  Next i
  Return 111
End Function
End Class