Yes, that works, thank Emre.
The other thing about this particular setup is that it isn’t really an Admin PIN. It is just an arbitrary PIN used in the Rule.
This is the setup …
##Change Ticket Entity
We will use this Action to reverse the Entity change.
##EL Change Ticket Entity
[Change Ticket Entity]
(Action)##
Action Name: | EL Change Ticket Entity |
Action Type: | Change Ticket Entity |
Can Create Ticket: | True |
Can Create Entity: | False |
Entity Type Name: | [:entityType] |
Entity Name: | [:entityName] |
Entity Search Value: |
|
Update Null Entity: |
|
Entity Screen Name: |
|
Entity Screen Search Value: |
|
##Execute Automation Command
We will use this Action to invoke other Rules and optionally, run a process in the background.
##EL ExecAMC
[Execute Automation Command]
(Action)##
Action Name: | EL ExecAMC |
Action Type: | Execute Automation Command |
Automation Command Name: | [:AMCname] |
Command Value: | [:AMCvalue] |
Background: | [:runBG] |
Delay: | [:delay] |
##Update Program Setting
We will use this Action to store the Old Entity and New Entity, so that we can reverse it if PIN verification fails.
##EL Store Value
[Update Program Setting]
(Action)##
Action Name: | EL Store Value |
Action Type: | Update Program Setting |
Setting Name: | [:settingName] |
Setting Value: | [:settingValue] |
Update Type: | Update |
Is Local: | True |
##Update Entity State
We will use this Action to reverse the Entity State if PIN verification fails.
##EL Update Entity State
[Update Entity State]
(Action)##
Action Name: | EL Update Entity State |
Action Type: | Update Entity State |
Entity Type Name: | [:entityType] |
Entity Name: | [:entityName] |
Entity State Name: | [:stateName] |
Current State: | [:currentState] |
Entity State: | [:newState] |
Quantity Exp: |
|
##RULE - Ticket Entity Changed
This Rule is repsonsible for detecting the change in the Ticket Entity. It then stores the Old and New Entity Names, and prompts for a PIN. Finally, it invokes the PIN verification via Execute Automation Command Action
##EL Store Entity
[Ticket Entity Changed]
(Rule)##
Rule Name: | EL Store Entity |
Event Name: | Ticket Entity Changed |
Rule Tags: |
|
Execute Rule if: | Matches |
Entity Type Name | Equals | Tables |
New Entity Name | Not Equals | {SETTING:EL_oldEntity} |
Old Entity Name | Is Not Null |
|
##Actions (4):##
EL Store Value
Constraint: (none)
settingName: | EL_oldEntity |
settingValue: | [:OldEntityName] |
EL Store Value
Constraint: (none)
settingName: | EL_newEntity |
settingValue: | [:NewEntityName] |
EL Store Value
Constraint: (none)
settingName: | EL_PIN |
settingValue: | [?Enter PIN to change Table;;;OCP] |
EL ExecAMC
Constraint: (none)
AMCname: | EL Confirm Entity Change |
AMCvalue: | {:EL_PIN} |
runBG: | |
delay: | |
##Mappings##
Mappings
Terminal | User Role | Department | Ticket Type |
* | * | * | * |
##RULE - Automation Command Executed - EL Confirm Entity Change
This Rule checks the entered PIN against a value that you set in this Rule. This Rule only fires if the PIN is incorrect. It then shows a “failure message”, then it reverses the Entity change, and finally execute another Automation Command in the background to reset the Entity State.
##EL Confirm Entity Change
[Automation Command Executed]
(Rule)##
Rule Name: | EL Confirm Entity Change |
Event Name: | Automation Command Executed |
Rule Tags: |
|
Execute Rule if: | Matches |
Automation Command Name | Equals | EL Confirm Entity Change |
Command Value | Not Equals | 12345 |
##Actions (3):##
MSG TEST
Constraint: (none)
MessageToDisplay: | Incorrect PIN for Table Change!\rOld:{:EL_oldEntity}\rNew:{:EL_newEntity} |
EL Change Ticket Entity
Constraint: (none)
entityType: | Tables |
entityName: | {:EL_oldEntity} |
EL ExecAMC
Constraint: (none)
AMCname: | EL Update Entity State |
AMCvalue: | {:EL_newEntity} |
runBG: | True |
delay: | 0 |
##Mappings##
Mappings
Terminal | User Role | Department | Ticket Type |
* | * | * | * |
##RULE - Automation Command Executed - EL Update Entity State
This Rule is responsible for resetting the Entity State when PIN verification fails. It also clears our stored values for the New/Old Entity Names.
##EL Update Entity State
[Automation Command Executed]
(Rule)##
Rule Name: | EL Update Entity State |
Event Name: | Automation Command Executed |
Rule Tags: |
|
Execute Rule if: | Matches |
Automation Command Name | Equals | EL Update Entity State |
##Actions (3):##
EL Update Entity State
Constraint: (none)
entityType: | Tables |
entityName: | [:CommandValue] |
stateName: | Status |
currentState: | |
newState: | Available |
EL Store Value
Constraint: (none)
settingName: | EL_newEntity |
settingValue: | |
EL Store Value
Constraint: (none)
settingName: | EL_oldEntity |
settingValue: | |
##Mappings##
Mappings
Terminal | User Role | Department | Ticket Type |
* | * | * | * |