Share

Netfabbtask

[Desktop Automation]

Properties

Property Read/write Type Description
lasterror Read String The description of the last error, that has occurred
parametercount Read Number Number of parameters of the task
resultcount Read Number Number of results for the task
status Read String A status string. One of SUCCESS, ERROR, RETURNED, CANCELED, NEW, INPROCESS. NEW and INPROCESS can't be set by the Netfabb Client API, this is only done by the Taskserver itself.
taskname Read String Name of the task
uuid Read String UUID of the task

Methods

Name Syntax Description
addparameter Task:addparameter(key:String; value: String) Adds a parameter to the task as a key/value pair.
addresult Task:addresult(key:String; value: String) Adds a result to the task as a key/value pair.
cancel Result:Boolean = Task: cancel () Sets the status of the task to "CANCELED"
error Result:Boolean = Task: error() Sets the status of the task to "ERROR"
getparameterbyindex param:String = Task:getparameterbyindex(index:Number) Gets a parameter value from the task by the index number of the parameter
getparameterbyname param:String = task:getparameterbyname(keyname:String) Gets a parameter value from the task by the name of the key of the parameter
getparametername param:String = task:getparametername(index:Number) Get the key name of a parameter by its index number
getresultbyindex Result:String = task:getresultbyindex(index:Number) Gets a result value from the task by the index number of the result
getresultbyname Result:String = task:getresultbyname(keyname:String) Gets a result value from the task by the name of the key of the result
getresultname result:String = task:getresultname(index:Number) Get the key name of a result by its index number
giveback Result:Boolean = Task: giveback() Sets the status of the task to "RETURNED"
submit Result:Boolean = Task:submit() Submits the task to the Taskserver. Returns TRUE when successful.
success Result:Boolean = Task: success () Sets the status of the task to "SUCCESS"
updatestatus Result:Boolean = Task: updatestatus () Poll task for updated status

Was this information helpful?