Task #1256
open
HrEndContractProcess processes future contracts
Added by Alena Peterová over 6 years ago.
Updated over 6 years ago.
Category:
Contractual relationship
Description
Version 8.1.6
A new contract with future validity was created. Following HrEndContractProcess processed this contract.
In fact, this didn't break anything in our project, because we don't use any special HR workflow or notification. But it looks dangerous that a future contract is already handled by the HR end process. Could it be prevented?
I will need to test it, but after i read the code, this setting seems ok - LRT (or processors) sets identity state to FUTURE_CONTRACT correctly (if no "better" contract exists) and contract roles are not removed (wf and processors checks, if processed contract is valid in the future).
I'm only a little afraid about potential bugs in project implementations. E.g., we will have a special HR end workflow that will notify the managers about ending subordinates. So in this workflow, we mustn't forget to check the contract validity - if it is in the future, don't send any notification.
Ok, but this processor (or LRT) is needed for handle and change a state of the identity. Do you have some idea, how to prevent to be wrong implemented on the custom project?
I understand - we need some process to handle the contract... Maybe split the HrEndContractProcess into two would be safest and natural way:
- HrFutureContractProcess - handles only contracts with validFrom > today
- HrEndContractProcess - handles only contracts with validFrom < validTill < today
As Peter pointed out, this could also help with ending of future contracts. I mean this situation:
- 26.9.2018: a new contract with validity from 1.10.2018 is created
- HrEndContractProcess handles the contract - sets the identity to "Future valid" and puts the contract in the queue
- 29.9.2018: the contract validTo is set to 1.10.2018 (the person decided not to work, so HR ended the contract immediately)
- Will HrEndContractProcess handle the contract and set the identity to Left? I think not - the contract was already in the queue and I think there was no time where it could be deleted by that black-box-magic.
HrEndContractProcess set the identity to Left, when contract is no longer valid (2.10.2018). When identity has contract from 1.10.2018 to 1.10.2018 and now is 29.9.2018 - identity is future valid and this is valid state.
I don't know, if this split into two processors and two LRT (total hr 4+4) will lead to prevent mistakes on projects - i see bigger complexity now only.
Also available in: Atom
PDF