Scheduled Script Execution form
Summarize
Summary of Scheduled Script Execution form
Scheduled Script Executions in ServiceNow automate tasks at specific times or on recurring schedules. This form focuses on jobs designed to migrate and update strategic planning data—specifically goals, strategies, and their relationships—into the Goal Framework and related planning item tables. These migrations help maintain data integrity and enable improved management and reporting within the Goal Framework.
Show less
Key Features
- Migrate Goal, Strategy, and Work Item Data: This job migrates existing goal records from the legacy Goal table to the new Goal Framework Goal table, preserving sysid values and creating corresponding target records and relationships with work items (Projects, Demands, Programs). Strategies from various legacy strategy tables are migrated to the Strategic Priority table.
- Handling Multiple Strategies per Goal: Since in the Goal Framework each goal maps to only one strategy, if a goal has multiple strategies, clones of the goal are created as sub-goals, each associated with a single strategy. The original goal becomes the parent goal, and cloned sub-goals include a prefixed name for easy identification.
- Migrate Strategy-Work Item Relationships: This migration moves existing relationships between strategies and work items into the Goal Relationship table. If no existing relationship exists for a goal and strategy, a dummy goal is created to preserve this linkage.
- Migrate Goal Relationships for Assigned Entities: This job populates the Assigned entity type and Assigned entity fields on goals based on existing business unit, department, company, portfolio, or customized entity relationships. It also supports migrating many-to-many (m2m) relationships involving lens entities into goal records for easier management.
Practical Benefits for ServiceNow Customers
- Improved Data Consistency: Migration ensures that goal and strategy data are consolidated from legacy tables into the Goal Framework, supporting unified strategic planning.
- Enhanced Relationship Management: By accurately migrating and organizing relationships between goals, strategies, and work items, customers can better track dependencies and strategic alignment.
- Support for Complex Goal-Strategy Scenarios: The cloning mechanism for goals with multiple strategies allows customers to maintain detailed, accurate mappings without data loss.
- Streamlined Entity Assignments: Automatically populating assigned entities on goals based on existing relationships improves visibility and management of goals within organizational structures.
Usage Considerations
These scheduled script executions should be run to transition existing strategic planning data into the Goal Framework, especially during upgrades or initial framework adoption. Understanding the cloning behavior and dummy goal creation is important to anticipate changes in goal records and relationships.
Scheduled Jobs are automated pieces of work that can be performed at a specific time or on a recurring schedule.
Migrate Goal, Strategy, and Work item data to the Goal Framework and related Planning item tables
Use the Migrate Goal, Strategy, and Work item data to the Goal Framework and related Planning item tables job to migrate the existing goals data to the Goal Framework tables.
| Parameter | Description |
|---|---|
| migrateGoalData |
|
| migrateStrategyData | Migrates all existing strategy records from the Enterprise Strategy [enterprise_strategy], Business Unit Strategy [business_unit_strategy], and Strategic Objective [strategic_objective] tables to the Strategic Priority [sn_gf_strategy] table. The sys_id remains the same. |
| migratingGoalStrategyM2Mdata | In Goal Framework, a goal can be mapped to only one strategy. If an existing goal has two strategies mapped to it, a clone of the goal will be created (one as a generic goal and another as a sub-goal)
with the same strategy populated for both. And, for the sub-goal, the first goal will be set as the parent goal. For example, consider a scenario where an existing goal (G1) is mapped to five strategies (S1, S2, S3, S4, and S5). Then, four clones of G1 will be created as sub-goals (G2, G3, G4, and G5) and the parent goal is populated as G1. For the parent goal (G1) and the sub-goals (G2, G3, G4, and G5), the Strategy field is populated respectively (S1, S2, S3, S4, and S5). Note: The name of the cloned sub-goal will be prefixed with Cloned SubGoal:, followed by the parent goal name. |
| migrateStrategyWorkItemRelData |
|
Migrate goal relationships for assigned entities
Use the Migrate goal relationships for assigned entities job to populate the fields, Assigned entity type and Assigned entity on the Goal form based on the existing values in the legacy fields, Business Unit, Department, Company, Portfolio, and any customized entity field.
| Parameter | Description |
|---|---|
| Migrate goal relationships for assigned entities | (For Strategic Planning users) Populates the fields, Assigned entity type and Assigned entity on the Goal form based on the data in the Goal Relationship [sn_gf_goal_m2m_relationship] table if you've created an m2m relationship with lens
entities other than Company, Business Unit, Department, and Portfolio. If users had already created m2m relationship, they may use this script to move those relationships from the m2m table to the goals table to access and manage those goals in the respective portfolio plans. If the goal has only one relationship with an assign entity table type, the Assign entity type and Assign entity fields are populated on the Goal [sn_gf_goal] table based on the Goal Relationship [sn_gf_goal_m2m_relationship] table. If the goal has multiple relationships with an assign entity table type, number of relationships (n) cloned sub-goals will be created and the Assign entity type and Assign entity fields are populated on the Goal [sn_gf_goal] table based on the data in the Goal Relationship [sn_gf_goal_m2m_relationship] table for each cloned sub-goal. |