Examples of Loading Work Relationship Changes

The Worker object provides several indicator attributes that simplify maintenance of work relationships. Use these indicators to request actions such as termination or a change of primary assignment. This topic provides examples of work-relationship changes that you request using these indicators.

Note: These indicators aren't supported when you're supplying full date-effective history. They're provided solely for independent actions. Also, you can't provide multiple indicators on the same work relationship record. For example, you can't both terminate a work relationship (TerminateWorkRelationshipFlag) and perform a global transfer (GlobalTransferFlag) on the same work relationship at the same time.

Changing the Hire Date

The hire date is the start date of a work relationship. To change the hire date, provide the new date on the NewStartDate attribute of the Work Relationship component. You can load just the work relationship record. The employment terms and assignment records are maintained automatically.

This example changes the hire date for an existing worker.

SET PURGE_FUTURE_CHANGES N
METADATA|WorkRelationship|SourceSystemOwner|SourceSystemId|PersonId(SourceSystemId)|LegalEmployerName|NewStartDate
MERGE|WorkRelationship|VISION|1009_POS|1009|Cox-6-CWB|2002/02/10

Terminating a Work Relationship

To terminate a work relationship, load the Work Relationship component with the TerminateWorkRelationshipFlag attribute set to Y. Specify the termination date on the ActualTerminationDate attribute. All associated assignments are automatically made inactive after the termination date.

This example terminates a work relationship.

SET PURGE_FUTURE_CHANGES N
METADATA|WorkRelationship|SourceSystemOwner|SourceSystemId|PersonId(SourceSystemId)|LegalEmployerName|TerminateWorkRelationshipFlag|ActualTerminationDate|ActionCode|ReasonCode
MERGE|WorkRelationship|VISION|1009_POS|1009|Cox-6-CWB|Y|2015/10/02|RESIGNATION|RESIGN_PERSONAL

You can update the assignment status while terminating the work relationship by loading the work relationship and assignment rows in the Worker.dat file.

This example updates the assignment status while terminating the work relationship.

METADATA|WorkRelationship|SourceSystemOwner|SourceSystemId|PersonId(SourceSystemId)|LegalEmployerName|ActualTerminationDate|ActionCode|ReasonCode
MERGE|WorkRelationship|VISION|1009_POS|1009|Cox-6-CWB|2015/10/02|RESIGNATION|RESIGN_PERSONAL
METADATA|WorkTerms|AssignmentNumber|PersonNumber|LegalEmployerName|DateStart|WorkerType|ActionCode|ReasonCode|EffectiveStartDate|EffectiveEndDate|EffectiveLatestChange|EffectiveSequence|AssignmentStatusTypeCode|BusinessUnitShortCode
MERGE|WorkTerms|ET955160008178426|955160008178426|Vision Corporation|2009/01/01|E|RESIGNATION|RESIGN_PERSONAL|2015/10/03|4712/12/31|Y|1|INACTIVE_PROCESS|Vision ADB
METADATA|Assignment|AssignmentNumber|PersonNumber|LegalEmployerName|DateStart|WorkerType|ActionCode|ReasonCode|WorkTermsNumber|EffectiveStartDate|EffectiveEndDate|EffectiveLatestChange|EffectiveSequence|AssignmentStatusTypeCode|BusinessUnitShortCode|FLEX:PER_ASG_DF|hdlG(PER_ASG_DF=Global Data Elements)
MERGE|Assignment|E955160008178426|955160008178426|Vision Corporation|2009/01/01|E|RESIGNATION|RESIGN_PERSONAL|ET955160008178426|2015/10/03|4712/12/31|Y|1|INACTIVE_PROCESS|Vision ADB|Global Data Elements|TestValue
Note: When a work relationship is terminated, the worker supervisor relationship is end-dated.

Correcting the Termination Date of a Work Relationship

To correct a work relationship termination date, supply a new ActualTerminationDate and set the CorrectTerminationFlag attribute to Y.

This example corrects the termination date for a terminated work relationship.

SET PURGE_FUTURE_CHANGES N
METADATA|WorkRelationship|SourceSystemOwner|SourceSystemId|PersonId(SourceSystemId)|LegalEmployerName|CorrectTerminationFlag|ActualTerminationDate
MERGE|WorkRelationship|VISION|1009_POS|1009|Cox-6-CWB|Y|2015/10/08

Reversing a Termination

To reverse a termination, load the Work Relationship component with the ReverseTerminationFlag attribute set to Y.

This example reverses the termination of a work relationship.

SET PURGE_FUTURE_CHANGES N
METADATA|WorkRelationship|SourceSystemOwner|SourceSystemId|PersonId(SourceSystemId)|LegalEmployerName|ReverseTerminationFlag
MERGE|WorkRelationship|VISION|1009_POS|1009|Cox-6-CWB|Y

Canceling a Work Relationship

To cancel a work relationship, use a DELETE instruction for the work relationship and set the CancelWorkRelationshipFlag attribute to Y.

This example deletes the specified work relationship and all its child records.

SET PURGE_FUTURE_CHANGES N
METADATA|WorkRelationship|SourceSystemOwner|SourceSystemId|PersonId(SourceSystemId)|CancelWorkRelationshipFlag
DELETE|WorkRelationship|VISION|1008_POS|1008|Y

Changing the Primary Assignment or Work Relationship

When you load a primary work relationship, the existing primary work relationship automatically becomes nonprimary on the date that you supply on the DateForPrimaryFlagChange attribute.

To make a nonprimary work relationship primary, you load the work relationship to be made primary with the PrimaryFlag attribute set to Y. Specify the date when the work relationship becomes primary on the DateForPrimaryFlagChange attribute. The corresponding changes to employment terms and assignments occur automatically. The primary indicator for the existing primary work relationship is set to N automatically.