CBExecute()

This code sample defines the callback script that this workflow type calls before the workflow is initiated in Livelink. This callback script displays workflow information in the Debug window when you are running Livelink Builder. The workflow information is taken from the WWork table in the Livelink database. For more information about the WWork table, see Using WAPI and OScript for Workflow Management and Status.

Note:
If you are running Livelink on the Livelink Intranet server and you set Debug to 1, 2, or 11 in the opentext.ini file, workflow information from the WWork table in the Livelink database is displayed in the thread logs. Thread logs are stored in the /logs directory of your primary Livelink installation (for example, c:/opentext/logs).
Function Assoc CBExecute( \
    Object     prgCtx, \
    WAPIWORK   work, \
    Integer    workID, \
    Integer    subWorkID, \
    Integer    taskID, \
    Integer    returnSubWorkID, \
    Integer    returnTaskID, \
    List       info, \
    Dynamic    extraData )

    Assoc      data
    Dynamic    retVal
    Boolean    handled = True

   	//Perform a switch statement on the callback script's
	//identifier. If it is handled by this script, the handled field
	//returns TRUE and Livelink stops searching for a script to
	//handle the callback script's operation. Then the workflow
	//information is echoed to the Debug window in the Livelink
	//Builder.

	switch( info[ 1 ] )
	case 100
		List workStatus
		RecArray item
		workStatus = prgCtx.WSession().LoadWorkStatus( workID, \
subWorkID )
		for item in workStatus
			$LLIAPI.RecArrayPkg.DumpRecArray( item )
			echo()
			echo()
		end

		retVal = True
		end
		default
			handled = False
		end
	end
	data.Handled = handled
	data.retVal = retVal
	
	return( data )
end