- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2019 02:40 AM
I have a record producer that creates a HR Case. This HR case has an associated HR Service which has two tasks tagged on to it. I would like to set it in a way where when the last task is completed the Hr case is automatically set to closed (or awaiting acceptance).
Is this possible?
I don´t mind any type of solution but i thought this was something that could be done OOTB with New York.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2019 10:32 AM
Hi,
I believe we can do it in few ways:
1) Async Business rule on task table.
2) Editing and managing workflow.(Bit tricky and might not be good)
3) Use gs.sleep in business rule so that it will run ur code bit late i.e after 3 4 secs.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2019 07:27 AM
That's great! It almost covers what I need in that it definitely closes the case when the last task is closed.
However, I don´t want this business rule to run for all HR Cases. Only ones with certain HR services. As the Business rule is based on the task table I can´t reference the HR service using the conditions (which I would prefer).
I know I could put it in the code itself in the if statement but am I missing an easier way to do this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2019 08:47 AM
You can add a filter in Business Rule, which will certainly restrict this business rule to get triggered for other HR Cases.
At first you will be able to see the HR Task fields, scroll down select Show related field and you will see something like HR Cases ->HR Case fields select and now you will be able to select the HR Case fields in the filter, Select the desired field and value
Kindly Mark my answer as Correct and helpful based on the impact.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2019 05:42 AM
Thanks i looked for ti but didn´t see HR Case initially. But I found it in Parent - HR Case - Hr Service.
Job done. thanks again.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2019 11:31 AM
Hi,
Are this task created one after other or simultaneously and is there any workflow attached to it. I believe there will be.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2019 07:30 AM
HI, Ah yes you are right. The code above works however when I test with cases that have tasks arriving in series it sets the case into awaiting acceptance even though another task was created.
Is there a way around this that you know of?
(I´m doing it with service activities attached to a HR service BTW)