Module

frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing

Methods

# inner buildEndMarker(predecessor) → {Object}

Builds a dummy endMarker element and returns them
Parameters:
Name Type Description
predecessor Object As an Object to get the predecessorId

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 327

Dummy endMarker as JSON => currently MARKERS aren't defined in our RPAf-Syntax and therefore there aren't implemented
Object

# inner buildSingleAttributeObject(currentElement, singleElementFromTasksSection, robotId) → {Object}

Builds the attributeObject for a single element
Parameters:
Name Type Description
currentElement Object Current instruction element
singleElementFromTasksSection Object Parsed Object from the RPAf Code
robotId String Id of the current robot / ssot

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 342

AttributeObject for a single attribute
Object

# inner buildSingleParameterObject(singleAtrributeObject, singleElementFromTasksSection, taskAndApplicationCombinations) → {Object}

Builds the parameterObject for a single element
Parameters:
Name Type Description
singleAtrributeObject Object Attribute Object of the current activity
singleElementFromTasksSection Object Parsed Object from the RPAf Code
taskAndApplicationCombinations Array All combinations of applications and tasks

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 365

ParameterObject for a single attribute
Object

# inner buildStartMarker() → {Object}

Builds a dummy startMarker element and returns them

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 313

Dummy startMarker as JSON => currently MARKERS aren't defined in our RPAf-Syntax and therefore there aren't implemented
Object

# inner currentLineWithoutOutputValueName(currentLine, splitPlaceholder) → {String}

Deletes everything before the first occurence of '=' and then trims all emptyspace until the rpa task name to get the expected format
Parameters:
Name Type Description
currentLine String Current line of RPAf code
splitPlaceholder String Placeholder to split the string

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 157

Current line without the outputVariableName prefix
String

# inner getActivityId() → {String}

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 27

Unique Id; wrapped with the activity nomenclature
String

# inner getApplicationArray(robotCodeSettingsSection) → {Array}

Checks all lines of the settings section for the right syntax and returns all declared applications as an array
Parameters:
Name Type Description
robotCodeSettingsSection Array All lines from the settings section as an array-entry (typeof string)

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 55

All declared applications or undefined if an error occures
Array

# inner getElementsArray(robotCodeTaskSection, declaredApplications, robotId) → {Array}

Build the elementsArray of the ssot
Parameters:
Name Type Description
robotCodeTaskSection Array Robot code w/o empty lines as an array of strings
declaredApplications Array All declared applications from ***settings*** section as strings
robotId String Id of the current robot / ssot

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 425

elementsArray with all needed properties
Array

# inner getEventId() → {String}

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 32

Unique Id; wrapped with the event nomenclature
String

# inner getInstructionBlocksFromTaskSection(robotCodeTaskSection, taskAndApplicationCombinations) → {Array}

"Preprocesses" the code in a usable data format
Parameters:
Name Type Description
robotCodeTaskSection Array Robot code w/o empty lines as an array of Strings
taskAndApplicationCombinations Array All declared tasks and applications from database

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 225

Array of instructionBlocks with the following schema: instructionBlocks = [rpaApplication:String, rpaTask:String, name:String, paramArray:Array]
Array

# inner getLineNumberForSelector(robotCodeAsArray, selector) → {number}

Retrieves the line number for a given selector
Parameters:
Name Type Description
robotCodeAsArray Array Complete robotCode w/o new lines as array
selector String Selector for which the line number will be retrieved

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 525

Line number where the selector occurs
number

# inner getOutputName(currentLine) → {String}

Retrieves the outputVariable name from the current code line
Parameters:
Name Type Description
currentLine String Current line of RPAf code

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 113

Name of the outputVariable
String

# inner getRobotCodeAsArray(robotCode) → {Array}

Splits the robot code into an array and deletes all empty lines
Parameters:
Name Type Description
robotCode String Code from the code editor

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 39

Robot code without empty lines as an array
Array

# inner getRpaParameters(currentLine, splitPlaceholder, instructionBlocks) → {Array}

Retrieves the rpa parameters from the current code line
Parameters:
Name Type Description
currentLine String Current line of RPAf code
splitPlaceholder String Placeholder to split the string
instructionBlocks String Current intruction block to get the rpaTask

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 143

List of parameters for the current code line
Array

# inner getRpaTask(currentLine, splitPlaceholder) → {String}

Retrieves the rpa task from the current code line; if there are no parameters, the indexOfFirstSplitPlaceholder returns -1 and therefore the function returns the whole line
Parameters:
Name Type Description
currentLine String Current line of RPAf code
splitPlaceholder String Placeholder to split the string

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 129

RpaTask for the given code line
String

# inner getStarterId(elementsArray) → {String}

Retrieves the starterId of the robot from the elements array
Parameters:
Name Type Description
elementsArray Array Array of all elements of the robot

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 507

Id of the element that has no predecessors and is therefore the start element of the robot
String

# inner getUniqueId() → {Number}

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 18

"uniqueId" which is just an increment from the counter in the local storage
Number

# inner numberOfOccurrencesOfTask(allMatchingCombinations, rpaTask) → {Number}

Counts the number of occurences of the current task in the subset of all Task/Application combinations for the current robot code
Parameters:
Name Type Description
allMatchingCombinations Array All combinations from database that match the rpaTask
rpaTask * RpaTask from current robotCode line

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 175

Number of occurrences of the rpaTask in allMatchingCombinations
Number

# inner parseRobotCodeToSsot(robotCode) → {Object}

Parses the RPA-Framework code from the code editor to the single source of truth
Parameters:
Name Type Description
robotCode String Code from the code-editor

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 544

Single source of truth as a JavaSctipt-object or undefined if an error occures
Object

# inner returnMatchingCombination(rpaTask, allMatchingCombinations) → {Object}

Returns the matching task object for the rpaTask or throws a notification
Parameters:
Name Type Description
rpaTask String RpaTask from current robotCode line
allMatchingCombinations Array All combinations from database that match the rpaTask

View Source frontend/src/utils/parser/robotCodeToSsotParsing/robotCodeToSsotParsing.js, line 191

Matching task object for the rpaTask or undefined if an error occurs
Object