We need to write addrees change rule based on below logic
Logic 1:
If the State is not equal to Montana (MT) or Wyoming (WY)
and "Working at Home" flag is checked and the State is updated, send an address change notification to HR, Benefits, and Payroll.
Logic 2:
If the State is not equal to Montana (MT) or Wyoming (WY) and the City is updated, send an address change notification to Payroll, Benefits, and Legal.
Logic 3:
Do not send any notification for transaction don't fall under logic 1 and logic 2
Logic4:
Any transaction created by HR should autoapproved
Below is the rule which I have created:
Address change state:
((transactionApprovalRequest.ViewInstanceName == "PersonAddress") AND (transactionApprovalRequest.SelfServiceTransaction == "Y") AND (Worker's Assignment.result.workAtHome == "Y") AND ((Proposed Person Address.result.region2 != "MT") OR (Proposed Person Address.result.region2 != "WY")) AND (Current Person Address.result.region2 != Proposed Person Address.result.region2))