Computer - Lock
Declaration
<AMCOMPUTER ACTIVITY="lock" />
Description: Submits a request to lock the workstation's display.
Practical Usage
Commonly used as the final step in a task to lock the workstation in order to protect it from unauthorized use. It is common to use this activity to lock the workstation if the task was started when it was locked.
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: This task checks the AMTrigger.Locked dataset to determine if the workstation was initially locked when the task started. If it was in a locked state, the task re-locks the workstation before completion.
<AMVARIABLE NAME="AMTrigger.WasLocked" ISPARAMETER="YES">1</AMVARIABLE> < !-- Place these steps at the end of the task to make it re-lock if the task was started locked --> <AMIF EXPRESSION="%AMTrigger.WasLocked%=1"> <AMLOCKWORKSTATION /> </AMIF>