EAOyoonWorkPlaceUpdateToUpdateInfo
This document was generated using Claude.ai
Overview
Automatically generates or updates employee information update documents when workplace changes are committed or deleted. Creates one UpdateEmployeeInfo document for each workplace update line, maintaining employee workplace history through the standard employee update process.
When This Action Runs
Automatic execution on:
- Post-commit of WorkPlaceUpdate documents
- Post-delete of WorkPlaceUpdate documents
This action runs automatically and cannot be disabled.
How It Works
- Processes each workplace update line - Iterates through all detail lines in the workplace update document
- Finds or creates UpdateEmployeeInfo - Searches for existing update document or creates new one
- Copies field values - Transfers data from workplace update using field mapping in Parameter 1
- Sets employee information - Links to employee and sets effective date from line
- Retrieves current employee info - Gets employee's information as of day before change date
- Updates workplace - Sets new workplace in the target employee information
- Applies field mappings - Uses Parameter 2 to map additional fields
- Commits update documents - Saves all generated UpdateEmployeeInfo documents
- Cleans up orphaned documents - Deletes any UpdateEmployeeInfo documents no longer needed
Parameters
Parameter 1: Fields Initializer - Field assignments for the generated document Example:
book="UPDT"
term="UPDTERM"
Parameter 2: UpdateEmployeeInfo fields Map - Additional field mappings Example:
branch=toInfo.empWorkPlace.branch
Database Tables Affected
- UpdateEmployeeInfo - Creates/updates/deletes employee update documents
- WorkPlaceUpdateLine - Reads workplace change details (read-only)
- EmployeeHRInfo - Retrieves current employee HR information
- HRPeriod - Determines appropriate HR period for the update
Module: hr
Full Class Name: com.namasoft.modules.humanresource.utils.actions.EAOyoonWorkPlaceUpdateToUpdateInfo