Need to add wait for completion feature in the business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2023 07:56 AM
function executeRule(current, previous /*null when async*/) { createChangeTask(current, current.assignment_group, 'Description for Task 1'); create(ChangeTask(current, current.assignment_group, 'Description for Task 2');
createChangeTask(current, current.assignment_group, 'Description for Task 3'); })(current, previous); function createChangeTask(change, assignmentGroup, description) { var gr = new GlideRecord("change_task"); gr.initialize(); gr.assignment_group = assignmentGroup; gr.state = '1'; gr.description = description; gr.change_request = current.sys_id; gr.insert(); }
I have written above business rule to generate change tasks but need to add a condition like 2nd task should be created after the first task ..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2023 08:41 AM
@sravya03 Instead of handling the sequential task creation via a business rule, I recommend creating these tasks via a workflow or flow. This flow/workflow can have a wait for condition activity/action and can create a new task once the previous task is created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2023 07:34 AM
@Sandeep Rajput thanks for the reply.
I have used workflow activities only finally.
I have one more doubt which i posted as question.
Can you pls click on below link