PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

Process Framework package guide

Read configuration, prepare folders, and write HTML logs with optional desktop captures.

Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested.

Jump to actions

Packages

Prerequisites

Shared fields

InputType; default; requirementUse
inputMethodInputMethoddefault FILEoptionalFILE reads a file. TEXT reads the text in the step. Only the selected source is read.
charsetNameStringdefault UTF-8optionalThe file encoding, such as UTF-8 or windows-1252⁠. Blank means UTF-8. An unknown name fails. Not used for TEXT⁠.
isTrimValuesBooleandefault falseoptionaltrue removes spaces at the start and end of each value. Keys do not change.
sessionNameStringdefault LoggeroptionalThe logger session name. Use Logger⁠, or one custom name such as InvoiceLog⁠, in start, message and stop.

Actions

Read JSON (configReadJson)

Read JSON into a Dictionary of text. Nested names join with dots (app.name), and list items use numbers from 0 (tags[0]). Empty objects and lists add nothing.

Inputs

InputType; default; requirementUse
jsonFilePathStringdefault emptyrequired for FILEA .json file, such as C:\AutomationSamples\config.json⁠.
jsonTextStringdefault emptyrequired for TEXTA JSON object or list. A single value, bad JSON or empty text fails.
parsingMethodJsonParsingMethoddefault ALLoptionalALL reads everything. SPECIFIC reads only the part named in jsonPathSegments⁠, with keys that start from that part. A single value gets an empty key.
jsonPathSegmentsListdefault emptyoptionalFor SPECIFIC⁠: exact names, such as ["app","database"]⁠. List numbers and dots do not work here. A missing name fails.

Uses the shared fields: inputMethod, charsetName, isTrimValues.

Outputs

OutputTypeMeaning
configDictionaryText values. Numbers, Booleans and null become text. Save it in settings⁠, then read $settings.app.name$⁠.

Example

Set inputMethod=TEXT, jsonText={"app":{"name":"demo","port":8080},"tags":["one","two"]}, parsingMethod=ALL and isTrimValues=false. Save config in the Dictionary settings. To read one part, set parsingMethod=SPECIFIC and jsonPathSegments=["app"].

Expected result

ALL gives app.name="demo", app.port="8080", tags[0]="one" and tags[1]="two". SPECIFIC gives name="demo" and port="8080". Bad JSON, a missing name or an unreadable file fails the step.

Back to actions

Read XML (configReadXml)

Read selected XML elements into a Dictionary of text. An attribute can give repeated elements their own keys.

Inputs

InputType; default; requirementUse
xmlFilePathStringdefault emptyrequired for FILEAn XML file with any extension, such as C:\AutomationSamples\config.xml⁠.
xmlTextStringdefault emptyrequired for TEXTValid XML. XML with a <!DOCTYPE> is refused.
xPathToNodesStringdefault emptyrequiredThe XPath to the elements, such as /config/item⁠. Namespace prefixes are not supported.
dictionaryKeysXmlKeySourcedefault TAG_NAMEoptionalTAG_NAME⁠: the element name. TAG_ATTRIBUTE⁠: the attribute named in dictionaryKeysAttributeName⁠. Empty keys are skipped. A repeated key keeps the last value.
dictionaryKeysAttributeNameStringdefault emptyrequired for TAG_ATTRIBUTEAn attribute name without a prefix, such as name⁠.
dictionaryValuesXmlValueSourcedefault TAG_TEXToptionalTAG_TEXT⁠: the element text. TAG_ATTRIBUTE_VALUE⁠: the attribute named in dictionaryValuesAttributeName⁠. A missing attribute gives empty text.
dictionaryValuesAttributeNameStringdefault emptyrequired for TAG_ATTRIBUTE_VALUEAn attribute name without a prefix, such as value⁠.

Uses the shared fields: inputMethod, charsetName, isTrimValues.

Outputs

OutputTypeMeaning
configDictionaryThe selected keys with text values. Save it in settings⁠, then read $settings.host$⁠.

Example

Set inputMethod=TEXT, xmlText=<config><item name="host" value="api.example.com"/><item name="mode" value="test"/></config>, xPathToNodes=/config/item, dictionaryKeys=TAG_ATTRIBUTE, dictionaryKeysAttributeName=name, dictionaryValues=TAG_ATTRIBUTE_VALUE and dictionaryValuesAttributeName=value. Save config in settings.

Expected result

The Dictionary holds host="api.example.com" and mode="test". An XPath that finds nothing gives an empty Dictionary. Bad XML or XPath, a <!DOCTYPE> or a missing attribute name fails the step.

Back to actions

Clean directory (deviceCleanDirectory)

Delete old files and folders inside a folder. Deleted items do not go to the Recycle Bin. A folder that holds a kept item is also kept.

Inputs

InputType; default; requirementUse
inputFolderPathStringdefault emptyrequiredA folder such as C:\AutomationSamples\cleanup⁠. Its contents can be deleted, but the folder stays.
selectMethodSelectMethoddefault ALLoptionalALL deletes old files and folders. FILE deletes only old files and keeps the folders.
recursiveBooleandefault trueoptionaltrue includes subfolders. false checks only the folder's own files and keeps all subfolders. Folder links are not followed.
thresholdNumberNumberdefault 30optionalThe minimum age, 0 or more. 30 with DAY deletes items 30 days old or older. 0 deletes everything in scope.
thresholdUnitThresholdUnitdefault DAYoptionalDAY⁠, HOUR⁠, MINUTE or SECOND⁠, counted from the current UTC time.
thresholdCriteriaThresholdCriteriadefault MODIFICATIONoptionalCREATION time or MODIFICATION (last change) time, checked for each item.
skipFolderPathPatternStringdefault emptyoptionalA case-sensitive regular expression that must match the full folder path. .*[\\/]archive keeps archive folders and their contents. Blank keeps none.
skipFilePathPatternStringdefault emptyoptionalA case-sensitive regular expression that must match the full file path. .*\.txt keeps text files and their folders. A bad pattern, or one that runs longer than five seconds, fails.
unableToDeleteBehaviorUnableToDeleteBehaviordefault IGNOREoptionalIGNORE skips items it cannot delete. THROW fails. Neither one restores deleted items.

Outputs

No output variables.

Example

Make a test folder C:\AutomationSamples\cleanup with old.log changed 40 days ago, recent.log changed yesterday and keep.txt changed 40 days ago. Set inputFolderPath to that folder, selectMethod=FILE, recursive=true, thresholdNumber=30, thresholdUnit=DAY, thresholdCriteria=MODIFICATION, skipFilePathPattern=.*\.txt and unableToDeleteBehavior=THROW.

Expected result

old.log is deleted. recent.log, keep.txt and the folder stay. A missing folder, a negative age or a bad pattern fails. With IGNORE, items that cannot be deleted stay and no error shows.

Back to actions

Close applications (deviceCloseApplications)

Close every running copy of the named programs. The step asks them to close, waits up to 30 seconds, then forces the rest and their child processes closed. Unsaved work can be lost.

Inputs

InputType; default; requirementUse
killTaskListListdefault emptyrequiredProgram names, such as ["SampleEditor.exe"]⁠. Case, folder and extension are ignored.

Outputs

No output variables.

Example

Start a test application named SampleEditor.exe and save its work. Set killTaskList=["SampleEditor.exe"]. Do not name the application that runs the automation.

Expected result

The matching programs close. If none runs, nothing changes. An empty List fails. Access errors are ignored, so a protected program can stay open.

Back to actions

Create folders (deviceCreateFolders)

Create working folders and get their full paths by name. Overwrite empties folders that already exist.

Inputs

InputType; default; requirementUse
pathTypePathTypedefault RELATIVEoptionalRELATIVE adds each entry to baseFolderPath⁠. ABSOLUTE resolves each entry to a full path.
baseFolderPathStringdefault emptyrequired for RELATIVESuch as C:\AutomationSamples⁠. An entry such as ..\other can still go outside it.
folderPathsListdefault emptyrequiredFolders such as ["input","work/pending"]⁠. Missing parents are created. The output key uses the last folder name, so equal last names share one key.
overwriteExistingBooleandefault falseoptionalfalse keeps the contents. true deletes all contents of each folder that exists. Use test folders.
prefixStringdefault emptyoptionalText before each output key, such as cfg_⁠. Folder names do not change.
suffixStringdefault _PathoptionalText after each output key. With _Path⁠, the folder input gets the key input_Path⁠.

Outputs

OutputTypeMeaning
foldersDictionaryFull paths, with the key prefix + last folder name + suffix. Save it in paths⁠, then read $paths.cfg_pending_Path$⁠.

Example

Set pathType=RELATIVE, baseFolderPath=C:\AutomationSamples, folderPaths=["input","work/pending"], overwriteExisting=false, prefix=cfg_ and suffix=_Path. Save folders in paths.

Expected result

Both folders exist. cfg_input_Path is C:\AutomationSamples\input and cfg_pending_Path is C:\AutomationSamples\work\pending. Existing contents stay. A bad path or a denied write fails, and folders made before the failure stay.

Back to actions

Log message (logMessage)

Add a row to an open HTML log. The row can link variable cards, a desktop screenshot and a video clip.

Inputs

InputType; default; requirementUse
logLevelLogLeveldefault INFOoptionalINFO⁠, WARN or ERROR⁠. The session settings give each level its file and video rule.
logMessageStringdefault emptyrequiredThe message, such as Invoice INV-9 accepted⁠. HTML in it shows as text.
captureScreenshotBooleandefault falseoptionaltrue saves a PNG of the whole desktop, all screens.
variablesDictionarydefault emptyoptionalValues shown as text cards on a linked page, such as {"invoice":"INV-9","attempt":"2"}⁠. Empty makes no page. Credential values are hidden, but a secret in a plain String shows.

Uses the shared fields: sessionName.

Outputs

OutputTypeMeaning
screenshotPathStringThe PNG path when captureScreenshot=true⁠. Otherwise empty, also when the row has a video clip.

Example

Start InvoiceLog with logsStartSession, logFilePath=C:\AutomationSamples\logs\run.html and no video. Set sessionName=InvoiceLog, logLevel=INFO, logMessage=Invoice INV-9 accepted, captureScreenshot=false and variables={"invoice":"INV-9","attempt":"2"}. Save screenshotPath in shot.

Expected result

An INFO row shows the message and links two variable cards. shot is empty. With captureScreenshot=true, it holds the PNG path. The step fails if the session is not started or the message is empty. A screenshot or write error can also fail it. If a video clip cannot be made, the row has no clip.

Back to actions

Start logger session (logsStartSession)

Open an HTML log, with screenshots, variables and clips folders beside it. An open session with the same name is closed first.

Inputs

InputType; default; requirementUse
logLevelsAndFileOptionLogFileOptiondefault COMMON_FILEoptionalCOMMON_FILE⁠: one file, logFilePath⁠, for all levels. CONFIGURABLE_FILE⁠: one file per level. Only the selected paths are checked.
logFilePathStringdefault emptyrequired for COMMON_FILEA writable .html file, such as C:\AutomationSamples\logs\run.html⁠. Later sessions add rows to it.
infoLogFilePathStringdefault emptyrequired for CONFIGURABLE_FILEThe INFO .html file, such as C:\AutomationSamples\logs\info.html⁠. The clips folder goes beside it.
warnLogFilePathStringdefault emptyrequired for CONFIGURABLE_FILEThe WARN .html file. For video, put it in the INFO file's folder so clip links work.
errorLogFilePathStringdefault emptyrequired for CONFIGURABLE_FILEThe ERROR .html file. For video, put it in the INFO file's folder so clip links work.
maxLogEntriesNumberdefault 1000optionalRows per file, more than 0⁠, counted across sessions. A full file is renamed 1_run.html (older ones move to 2_run.html and on) and a new file starts. Old files are not deleted.
captureScreenRecordingScreenRecordingdefault NO_VIDEOoptionalNO_VIDEO or VIDEO_ENABLED⁠. Only VIDEO_ENABLED uses videoOn* and videoBufferSeconds⁠. It records the desktop all the time while a videoOn* is true⁠. If recording cannot start, logging goes on without video.
videoOnInfoBooleandefault falseoptionaltrue adds a video clip to INFO rows.
videoOnWarnBooleandefault falseoptionaltrue adds a video clip to WARN rows.
videoOnErrorBooleandefault trueoptionaltrue adds a video clip to ERROR rows.
videoBufferSecondsNumberdefault 30optionalSeconds of video before each row, 5 to 90. A clip can be shorter.
encodingModeEncodingModedefault FASToptionalVideo only. FAST makes clips quickly. COMPACT is slower and makes smaller files. Clips are made in the background.

Uses the shared fields: sessionName.

Outputs

No output variables.

Example

Set sessionName=InvoiceLog, logLevelsAndFileOption=COMMON_FILE, logFilePath=C:\AutomationSamples\logs\run.html, maxLogEntries=2 and captureScreenRecording=NO_VIDEO. Write three messages in this session, then stop it. For video on a test desktop, choose VIDEO_ENABLED, videoOnError=true, videoBufferSeconds=5 and encodingMode=FAST.

Expected result

The log page and its folders exist. With a new file and three messages, 1_run.html holds rows 1 and 2, and run.html holds row 3. A path that is not .html, a row limit under 1 or a buffer outside 5 to 90 seconds fails. A failed video start does not fail the step.

Back to actions

Stop logger session (logsStopSession)

Close the log pages, wait for video clips, and end the session.

Inputs

Uses the shared fields: sessionName.

Outputs

No output variables.

Example

After you write messages with sessionName=InvoiceLog, run this action with sessionName=InvoiceLog. A second stop with the same name is allowed.

Expected result

The log pages get their footer and the session ends. The step waits up to five minutes for clips, and clips not finished by then can be missing. Later messages need a new start. Stopping a session that is not open does nothing.

Back to actions