{"plugin":"o11n-core","pluginName":"System (Core Classes)","name":"System","description":"General set of functions, always available in the scripting environment.","attributes":[],"constructors":[],"methods":[{"name":"stdout","signature":"System.stdout(string text): void","parameters":"string text","returnType":"void","description":"Log a text in the standard output console. Use this for debug only."},{"name":"log","signature":"System.log(string text): void","parameters":"string text","returnType":"void","description":"Log a text in the system with a INFO threshold."},{"name":"createTempFile","signature":"System.createTempFile(string suffix): File","parameters":"string suffix","returnType":"File","description":"Creates an empty file in the temporary directory of\nAutomation Orchestrator (app-server/temp), using the given suffix to generate its name."},{"name":"error","signature":"System.error(string text): void","parameters":"string text","returnType":"void","description":"Log a text in the system with a ERROR threshold."},{"name":"warn","signature":"System.warn(string text): void","parameters":"string text","returnType":"void","description":"Log a text in the system with a WARNING threshold."},{"name":"debug","signature":"System.debug(string text): void","parameters":"string text","returnType":"void","description":"Log a text in the system with a DEBUG threshold."},{"name":"getCurrentTime","signature":"System.getCurrentTime(): number","parameters":"","returnType":"number","description":"Get current server time."},{"name":"currentWorkflowItem","signature":"System.currentWorkflowItem(): WorkflowItemInfo","parameters":"","returnType":"WorkflowItemInfo","description":"Read only information for currently executed workflow item."},{"name":"waitUntil","signature":"System.waitUntil(Date waitDate, number milli): boolean","parameters":"Date waitDate, number milli","returnType":"boolean","description":"Pause the current script context execution and wait for a given date to continue."},{"name":"waitCustomEventUntil","signature":"System.waitCustomEventUntil(string text, string text, Date endDate): EventCustom","parameters":"string text, string text, Date endDate","returnType":"EventCustom","description":"Wait for an external custom event (with an expiration date)."},{"name":"sendCustomEvent","signature":"System.sendCustomEvent(string eventKey): void","parameters":"string eventKey","returnType":"void","description":"Send a custom event to all Policies and Workflows."},{"name":"customEventUrl","signature":"System.customEventUrl(string eventName, boolean secure): URL","parameters":"string eventName, boolean secure","returnType":"URL","description":"Return an string url usable to generate HTTP custom event."},{"name":"customEventUrlforServer","signature":"System.customEventUrlforServer(string eventName, string host, string port, boolean secure): URL","parameters":"string eventName, string host, string port, boolean secure","returnType":"URL","description":"Return an string url usable to generate HTTP custom event.\n        The 'host' and 'port' parameters are useful if you want to be able to post events from outside a firewall.\nIn this case, indicate the host and port values on the firewall and make the firewall transfer the requests to the\nAutomation Orchestrator server, usually on port 8080."},{"name":"nextUUID","signature":"System.nextUUID(): string","parameters":"","returnType":"string","description":"Generate a unique ID."},{"name":"sleep","signature":"System.sleep(number ms): boolean","parameters":"number ms","returnType":"boolean","description":"Sleep for a given time."},{"name":"getModule","signature":"System.getModule(string name): Module","parameters":"string name","returnType":"Module","description":"Return an action module with the given name."},{"name":"getContext","signature":"System.getContext(): ExecutionContext","parameters":"","returnType":"ExecutionContext","description":"Get the context object for the current workflow run."},{"name":"getAllModules","signature":"System.getAllModules(): Module[]","parameters":"","returnType":"Module[]","description":"Return all action modules."},{"name":"getOsName","signature":"System.getOsName(): string","parameters":"","returnType":"string","description":"Return server running os"},{"name":"hexToDecimal","signature":"System.hexToDecimal(string value): number","parameters":"string value","returnType":"number","description":"Convert a hexadecimal string value to a number."},{"name":"decimalToHex","signature":"System.decimalToHex(number value): string","parameters":"number value","returnType":"string","description":"Convert a decimal number value to a hexadecimal string."},{"name":"extractDirectory","signature":"System.extractDirectory(any fullPath): string","parameters":"any fullPath","returnType":"string","description":"Extract the directory part from a file path."},{"name":"extractFileName","signature":"System.extractFileName(any fullPath): string","parameters":"any fullPath","returnType":"string","description":"Extract the file name part from a file path."},{"name":"extractFileNameExtension","signature":"System.extractFileNameExtension(any fullPath): string","parameters":"any fullPath","returnType":"string","description":"Extract the file extension part from a file path."},{"name":"extractFileNameWithoutExtension","signature":"System.extractFileNameWithoutExtension(any fullPath): string","parameters":"any fullPath","returnType":"string","description":"Extract the file without extension part from a file path."},{"name":"appendToPath","signature":"System.appendToPath(any rootPath, string toAdd): string","parameters":"any rootPath, string toAdd","returnType":"string","description":"Append a path fragment to another. (i.e. C:/temp and subpath/myfile.txt -> C:/temp/subpath/myfile.txt)"},{"name":"setLogMarker","signature":"System.setLogMarker(string logMarker): void","parameters":"string logMarker","returnType":"void","description":"Used to populate additional log info to every scripting log."},{"name":"formatBinaryValue","signature":"System.formatBinaryValue(number value): string","parameters":"number value","returnType":"string","description":"Format a given number in a human readable binary size format. (i.e 2048 -> 2K Bytes, 4718592 -> 4.5M Bytes)"},{"name":"getTempDirectory","signature":"System.getTempDirectory(): string","parameters":"","returnType":"string","description":"Return the default temporary directory on the server"},{"name":"formatDate","signature":"System.formatDate(date aDate, string pattern): string","parameters":"date aDate, string pattern","returnType":"string","description":"Format a given date in a given format.\nDate and time formats are specified by date and time pattern  strings. Within date and time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' are interpreted as pattern letters representing the components of a date or time string. Text can be quoted using single quotes (') to avoid interpretation. \"''\" represents a single quote. All other characters are not interpreted; they're simply copied into the output string during formatting or matched against the input string during parsing.\nThe following pattern letters are defined (all other characters from 'A' to 'Z' and from 'a' to 'z' are reserved):\n\n    G \tEra designator (AD)\ny \tYear (1996; 96)\n    M \tMonth in year (July; Jul; 07)\nw \tWeek in year\n    W \tWeek in month\nD \tDay in year\n    d \tDay in month\nF \tDay of week in month\n    E \tDay in week \t(Tuesday; Tue)\na \tAm/pm marker \t(PM)\n    H \tHour in day (0-23)\nk \tHour in day (1-24)\n    K \tHour in am/pm (0-11\nh \tHour in am/pm (1-12)\n    m \tMinute in hour\ns \tSecond in minute\n    S \tMillisecond\nz \tTime zone \tGeneral time zone \t(Pacific Standard Time; PST; GMT-08:00)\n    Z \tTime zone \tRFC 822 time zone \t(-0800)\nExamples\n\nThe following examples show how date and time patterns are interpreted in the U.S. locale. The given date and time are 2001-07-04 12:08:56 local time in the U.S. Pacific Time time zone.\nDate and Time Pattern \tResult\n    \"yyyy.MM.dd G 'at' HH:mm:ss z\" --> \"2001.07.04 AD at 12:08:56 PDT\"\n\"EEE, MMM d, ''yy\" --> \"Wed, Jul 4, '01\"\n    \"h:mm a\" --> \"12:08 PM\"\n\"hh 'o''clock' a, zzzz\" --> \"12 o'clock PM, Pacific Daylight Time\"\n    \"K:mm a, z\" --> \"0:08 PM, PDT\"\n\"yyyyy.MMMMM.dd GGG hh:mm aaa\" --> \"02001.July.04 AD 12:08 PM\"\n    \"EEE, d MMM yyyy HH:mm:ss Z\" --> \"Wed, 4 Jul 2001 12:08:56 -0700\"\n\"yyMMddHHmmssZ\" --> \"010704120856-0700\""},{"name":"formatNumber","signature":"System.formatNumber(number aNumber, string pattern): string","parameters":"number aNumber, string pattern","returnType":"string","description":"Format a number"},{"name":"isHostReachable","signature":"System.isHostReachable(string hostOrIp, number timeout): boolean","parameters":"string hostOrIp, number timeout","returnType":"boolean","description":"Test whether that address is reachable. Best effort is made by the implementation to try to reach the host, but firewalls and server configuration may block requests resulting in a unreachable status while some specific ports may be accessible. A typical implementation will use ICMP ECHO REQUESTs if the privilege can be obtained, otherwise it will try to establish a TCP connection on port 7 (Echo) of the destination host."},{"name":"resolveHostName","signature":"System.resolveHostName(string hostName): string","parameters":"string hostName","returnType":"string","description":"Returns the IP address given a host name, using a DNS lookup. DNS must be configured on the\nAutomation Orchestrator server. Failure to lookup the host will return null."},{"name":"resolveIpAddress","signature":"System.resolveIpAddress(string ipAddress): string","parameters":"string ipAddress","returnType":"string","description":"Returns the host name given an IP Address (in standard dotted notation, for example \"127.0.0.1\"), using a DNS lookup. DNS must be configured on the\nAutomation Orchestrator server. Failure to lookup the hostname, or badly formatted IP addresses will throw an exception"},{"name":"compareVersionNumber","signature":"System.compareVersionNumber(string v1, string v2): number","parameters":"string v1, string v2","returnType":"number","description":"compare two version number with format \"v1.v2.v3 .. vn\" and return the index of the change with positive and negative value depending what version is greater"},{"name":"getObjectClassName","signature":"System.getObjectClassName(any obj): string","parameters":"any obj","returnType":"string","description":"Return the class name of any scripting object that typeof(obj) returns \"object\"."},{"name":"getObjectPluginName","signature":"System.getObjectPluginName(any obj): string","parameters":"any obj","returnType":"string","description":"Return the plugin name of any scripting object. Base objects return \"Server\" as plugin"},{"name":"isNotFound","signature":"System.isNotFound(any obj): boolean","parameters":"any obj","returnType":"boolean","description":"Return true is object is a \"NotFound\" object"},{"name":"filterAuthorized","signature":"System.filterAuthorized(any obj): any","parameters":"any obj","returnType":"any","description":"Filter non authorized objects for the current user. If the parameter is an object the result will be null if the user is not authorized to use it, if it is an array or property, a recursive check is done and the unauthorized objects are removed."},{"name":"getDate","signature":"System.getDate(string inputString, Date refDate): Date","parameters":"string inputString, Date refDate","returnType":"Date","description":"Construct a new date from a natural input and a reference date."},{"name":"getObjectType","signature":"System.getObjectType(any obj): string","parameters":"any obj","returnType":"string","description":"Return the\nAutomation Orchestrator 'type' for the given object"},{"name":"getObjectId","signature":"System.getObjectId(any obj): string","parameters":"any obj","returnType":"string","description":"Return the\nAutomation Orchestrator 'id' for the given object, some object have no ids"},{"name":"formatDuration","signature":"System.formatDuration(number milisecond, boolean showMili, boolean showZero): string","parameters":"number milisecond, boolean showMili, boolean showZero","returnType":"string","description":"Format a given millisecond number in a human readable format"},{"name":"getDateFromFormat","signature":"System.getDateFromFormat(date date, string pattern): date","parameters":"date date, string pattern","returnType":"date","description":"Parses the given string to produce a date."}],"docUrl":"https://modernvroapi.in/#/plugin/o11n-core/class/System"}