Class PayrunEmployeeStartFunction
Executes at the start of each employee's payrun processing, before any wage types are evaluated.
Implements
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Function
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public class PayrunEmployeeStartFunction : PayrunFunction, IDisposable
Remarks
This function runs once per included employee, after PayrunEmployeeAvailableFunction
has returned true or null. It is used to initialize per-employee state that
wage type and collector functions will consume.
Typical uses:
- Pre-compute derived employee data and store it via SetEmployeeRuntimeValue(string, string) for use in subsequent functions.
- Log the start of employee processing for audit or debugging.
- Conditionally abort the employee’s processing by returning
false.
Return value: Return null to continue normally.
Return false to abort this employee’s processing: no wage types or collectors
will execute, and PayrunEmployeeEndFunction will not run for this employee.
Examples
// Cache a derived value for use in wage type functions
SetEmployeeRuntimeValue("FTE", GetCaseValue<decimal>("FTE").ToString());
Constructors
View SourcePayrunEmployeeStartFunction(object)
Initializes a new instance with the function runtime
Declaration
public PayrunEmployeeStartFunction(object runtime)
Parameters
| Type | Name | Description |
|---|---|---|
| object | runtime | The runtime |
PayrunEmployeeStartFunction(string)
New function instance without runtime (scripting development)
Declaration
protected PayrunEmployeeStartFunction(string sourceFileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sourceFileName | The name of the source file |
Remarks
Use GetSourceFileName(string) in your constructor for the source file name
Methods
View SourceStart()
Entry point for the runtime
Declaration
public bool? Start()
Returns
| Type | Description |
|---|---|
| bool? |
Remarks
Internal usage only, do not call this method