Task #1256
openHrEndContractProcess processes future contracts
0%
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?
Updated by Radek Tomiška over 6 years ago
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).
Updated by Alena Peterová over 6 years ago
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.
Updated by Radek Tomiška over 6 years ago
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?
Updated by Alena Peterová over 6 years ago
- HrFutureContractProcess - handles only contracts with validFrom > today
- HrEndContractProcess - handles only contracts with validFrom < validTill < today
- 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.
Updated by Radek Tomiška over 6 years ago
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.