Cancelling a HR case via UI does not make case inactive, even state changes to Cancelled

manducchau
Mega Guru

The requirement is cancelling the hr_case should inactive the record like Close Complete or Close Incomplete. I tried a few below options and watched the field, even it showed these have made the field from true -> false, but it had not actually set the active field to false. After form reloads, active is still true.

1. Update the script of Cancellation state flow (run after Cancelled) to include current.active = false

2. Update OOB business rule "Cancel workflows and approvals on cancel" to include current.active = false

3. Create a new business rule running at the end to gets when state changes to Cancelled, then active is false.

I know this is task active field, and when closing complete which is active to false expectedly, I can see the below was running:

Server-side activity21:50:55 (625)BUSINESS RULE - Task Active State Managementtrue → false

Server-side activity21:50:55 (643)BUSINESS RULE - mark closedfalse → false

Any help would be appreciated. Thanks.

1 ACCEPTED SOLUTION

Kiel Sanders
ServiceNow Employee
ServiceNow Employee

Hi Duc (duccha)



The Cancelled state should be behaving the way you expected so you may want to check the items below.



  1. Confirm that the Cancelled state is considered closed
    1. Navigate to System Definition > Dictionary and search for the state column on the task table.
    2. Select sn_hr_core_case from the Dictionary Overrides related list (or hr_case in Helsinki or prior).
    3. Confirm that the number associated to the Cancelled state is listed under the close_states attribute.   The standard Cancelled state is 7 but confirm this has not changed in your instance.   If the Cancelled state you are using is not listed in the attribute, add it by separating the values with a semicolon.
  2. Confirm that the "Task Active State Management" business rule is active and has not been changed.   This business rule will set the case's state appropriately based off of the closed_state attribute.


If you are still having issues after the troubleshooting suggestions above, I'd suggest creating an incident on HI.



Kiel


View solution in original post

2 REPLIES 2

Kiel Sanders
ServiceNow Employee
ServiceNow Employee

Hi Duc (duccha)



The Cancelled state should be behaving the way you expected so you may want to check the items below.



  1. Confirm that the Cancelled state is considered closed
    1. Navigate to System Definition > Dictionary and search for the state column on the task table.
    2. Select sn_hr_core_case from the Dictionary Overrides related list (or hr_case in Helsinki or prior).
    3. Confirm that the number associated to the Cancelled state is listed under the close_states attribute.   The standard Cancelled state is 7 but confirm this has not changed in your instance.   If the Cancelled state you are using is not listed in the attribute, add it by separating the values with a semicolon.
  2. Confirm that the "Task Active State Management" business rule is active and has not been changed.   This business rule will set the case's state appropriately based off of the closed_state attribute.


If you are still having issues after the troubleshooting suggestions above, I'd suggest creating an incident on HI.



Kiel


Hi Kiel,

 

We are configured HR case workflow to set the HR case closed complete state  after few days when case setting to resolved state.But after that time period it is not updating state field to closed complete and if state changes even the workflow is not getting cancelled.I have checked every thing.Can you help me on this ?