ListScripts()
This code sample describes how to create a script that returns a list of scripts that are stored in the scripts directory of the custmod module (for example, c:/opentext/module/custmod_8_1_x/scripts).
function List ListScripts()
String scriptPath
String moduleDir = $Custmod.custtaskmodule.PathPrefix()
String scriptsDir = moduleDir + "scripts" + File.Separator()
List vFileListList = File.FileList( scriptsDir )
List retList = {}
//Retrieve the list of scripts that are stored in your
//module's /script directory. These are the scripts that the
//creators of workflow maps can attach to the custom display step
//type in the Workflow Designer.
if ( !IsError( vFileListList ) && \
( Length( vFileListList ) > 0 ) )
for scriptPath in vFileListList
retList = { @retList, File.GetName( scriptPath ) }
end
end
return( retList )
end