2022.2

Table Of Contents
createGUID()
Thisfunctionreturnsaunique36-characterstringconsistingof32alphanumeric,lowercasecharacters
andfourhyphens.
Format:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx(8-4-4-4-12characters).|
Example:123e4567-e89b-12d3-a456-426655440000.
Thefunctionproducesuniquestringsoneachandeverycall,regardlessofwhetherthecalloccurs
withinthesamedatamapperornot,oronconcurrentthreads.
createHTTPRequest()
FunctionthatcreatesanewScriptableHTTPRequestobject,inordertoissueREST/AJAXcallsto
externalservers.
Thisfeatureallowsthedatamappingprocesstocomplementitsextractionprocesswithexternaldata,
includingdatathatcouldbeprovidedbyanHTTPprocessinWorkflow,forinstanceaprocessthat
retrievescertainvaluesfromWorkflow’sDataRepository.AnotherpossibleuseistohaveaPost-
processorthatwritestheresultsoftheextractionprocesstoafileandimmediatelyuploadsthatfiletoa
Workflowprocess.
ThereturnedScriptableHTTPRequesthasaselectionofthepropertiesandmethodsofthestandard
JavaScriptXMLHTTPRequestobject(seehttps://developer.mozilla.org/en-US/-
docs/Web/API/XMLHttpRequest).
Supportedpropertiesandmethodsarelistedbelow.
Itisnotpossibletousetheasyncmode,whichcanbesetviatheopen()functionoftheScript-
ableHTTPRequest(seehttps://developer.mozilla.org/en-US/-
docs/Web/API/XMLHttpRequest/open)inadatamappingconfiguration.Async-relatedproperties
andmethodsoftheScriptableHTTPRequestobject-forexample.onreadystatechange,
.readyStateand.ontimeout-arenot supported.
Thereasonforthisisthatbythetimetheresponsecomesbackfromtheserver,theDataMapper
scriptmayhavefinishedexecutingandgoneoutofscope.
Supported properties
l
response
l
status
l
statusText
l
timeout(ms).Default:1minute.
Page 405