Use the systemLinkStatus object to obtain information about a failed or unfinished SystemLink command.

Table 54. Status Objects
Object Description
systemLinkStatus:statusType statusType The type enumeration of the object type. The following values are possible:
  • file
  • result
  • step
text name The name of the file, result, or step.
text path The full path to the source file when a file is uploaded.
text parent The name of the parent result or step.
text status When you call getOpenJobs, the status depends on the object type. The following values are possible:
  • update
  • upload
  • incomplete
When you call getFailedJobs, the status contains an error message.
redo() When you call getFailedJobs, the command executes again.
delete() Deletes the SystemLink command from the command queue. The command also deletes all associated data and files.
Tip Query the processing status of the commands using getOpenJobs and getFailedJobs. The data returned by these functions is captured at the moment that you call the function. The contents of sytemLinkStatus object is static. To obtain new data, call getOpenJobs or getFailedJobs again.

Example: statusType

function printStatusType(systemLinkStatus:statusType type)
    switch type
        case systemLinkStatus:statusType:result
			sys:logInfo(sys:ui, "command type: result")
        case systemLinkStatus:statusType:step
			sys:logInfo(sys:ui, "command type: step")
        case systemLinkStatus:statusType:file
			sys:logInfo(sys:ui, "command type: file")
    endswitch
endfunction

Example: text status

function printOpenJobs()
	text type(10)
	systemLink:getOpenJobs sts
	list<systemLinkStatus> myStatusList
	systemLinkStatus currentObject
	
	[ myStatusList, sts ] = sys:systemLink:getOpenJobs()
		
	if sts == systemLink:getOpenJobs:notConnected then
		sys:logError(sys:ui|sys:rts, "interface not active !")
		return
	elseif sts == systemLink:getOpenJobs:systemError then
		sys:logError(sys:ui|sys:rts, "getOpenJobs: systemError !")
		return
	endif
			
	if myStatusList:count == 0 then
		sys:logInfo(sys:ui|sys:rts, "empty list !")
		return
	endif
			
	foreach currentObject in myStatusList
		switch currentObject:statusType
		case systemLinkStatus:statusType:result
			type = "result" 
		case systemLinkStatus:statusType:file
			type = "file" 
		case systemLinkStatus:statusType:step
			type = "step"
		endswitch
		sys:logInfo(sys:ui, "type:%s name:%s path:%s parent:%s status:%s", type, currentObject:name, currentObject:path , currentObject:parent, currentObject:status )
	endforeach
			
endfunction

Example: Output for text status

type:step name:myStepName1 path:- parent:myResultName status:incomplete
type:step name:myStepName2 path:- parent:myStepName1 status:incomplete
type:result name:myResultName path: "-" parent: "-" status: incomplete
type:file name:myFile.mdf path:my/path/to/myFile.mdf parent:myResultName status:  upload

Example: redo()

function redoCommand(systemLinkStatus stsObject)
	systemLinkStatus:redo redoSts
	redoSts = satusObject:redo()
	switch redoSts
            case systemLinkStatus:redo:ok
		sys:logInfo(sys:ui, "redo ok")
            case systemLinkStatus:redo:notConnected
		sys:logError(sys:ui, "command redo: interface not connected")
            case systemLinkStatus:redo:systemError
		sys:logError(sys:ui, "command redo: error occoured")
        endswitch
endfunction

Example: delete()

function deleteCommand(systemLinkStatus stsObject)
	systemLinkStatus:delete deleteSts
	deleteSts = satusObject:delete()
	switch deleteSts
            case systemLinkStatus:delete:ok
		sys:logInfo(sys:ui, "delete ok")
            case systemLinkStatus:delete:notConnected
		sys:logError(sys:ui, "command delete: interface not connected")
            case systemLinkStatus:delete:systemError
		sys:logError(sys:ui, "command delete: error occoured")
        endswitch
endfunction