cancel
Showing results for 
Search instead for 
Did you mean: 

Work Order ID - Contingent Worker

Sunny_T
Contributor
0 Kudos
185

Hi Experts,

Currently whenever we hire a contingent worker as Work Order is created for the first time, we generate Work Order ID and save it via business rule (onSave rule under Work Order). It simply checks if Work Order ID field is blank, if yes generate a Work Order ID based off a sequence. We have kept Work Order ID field as read only.

Now when we try to rehire the same Contingent Worker , as Work Order ID already exists for the employee , NO new Work Order is created and system keeps the same old Work Order ID and updates it.

To force system to generate a new Work Order ID for Rehire Contingent Worker I tried to enhance our existing business rule by adding some conditions around Rehire Contingent Worker Event Reason so that new Work Order ID gets generated for Rehired Contingent Worker cases. It did generate a new Work Order ID.

But this opens another issue – Post Rehiring of Contingent Worker whenever we try to edit a Work Order detail like Start \ End Date etc under Contingent Worker Information portlet, our enhanced rule will again run and as business rule’s new condition is true for Rehire Contingent Worker Event Reason , another new Work Order ID will be generated for same employee overwriting earlier Work Order ID.

Is there any way I can apply logic in the business rule so that New Work Order only gets created when we rehire Contingent worker and NOT when we try to edit any Work Order information under Contingent Worker Information portlet post Rehiring of Contingent Worker?

Appreciate everyone's inputs

 

View Entire Topic
ManishJaiswal
Active Participant
0 Kudos

Hi @Sunny_T 

You can use the Rule Context and make it only applicable for Hire/Rehire scenario and not on Edit UI or Edit History.

Please mark this answer as Accepted Solution in case your query is resolved.

Thanks

Manish

Sunny_T
Contributor
0 Kudos
Hi,
Sunny_T
Contributor
0 Kudos

Hi,

Our business rule is under the Save Rules of MDF Object Work Order, there I don't see any Rule Context under MDF screen like we see under Manage Business Configuration.