Dynamic catalog task creation#2173
Conversation
|
HI @MYaswanth28 Thank You for the contribution. Code looks good. However, if the requirement is simply to create catalog tasks based on conditions, the OOTB “Create Catalog Task” action can handle this more easily. With this script, we would need to create a separate action to call the Script Include and add separate wait conditions for task completion, which makes the overall solution more complex. Additionally, this approach doesn’t support multiple “AND”/OR" conditions easily which limits flexibility in more advanced scenarios. Let me know your thoughts on this. |
|
@rohi-v The CatalogTaskGenerator script is not intended to replace simple OOTB conditional task creation. It solves problems that the standard OOTB actions struggle with If a user selects 10 servers in a Multi-Row Variable Set (MRVS), the OOTB action requires a loop and separate task creation within a subflow or custom action. The Script Include can easily loop through the MRVS data and call the same _createTask helper function 10 times in a single step. |
|
Understood @MYaswanth28 The call of script include still require custom action but I understand what you're talking about. Can you please add that point in the readme file too so that its used only when intended and not for every workflow/flowS |
|
Updated Now @rohi-v |
PR Description:
Dynamic Catalog Task Generator - The primary goal is to decouple complex task creation logic from the visual Flow Designer or Workflow canvas. Instead of using numerous branches and conditional activities within a flow, this script centralizes the rules for task fulfillment.
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions