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 functionality is essential for migrating and synchronizing data related to goals, strategies, and work items within the Goal Framework and related Planning item tables. These migrations help maintain data integrity and improve strategic planning capabilities.
Show less
Key Features
- Migrate Goal, Strategy, and Work Item Data: This scheduled job migrates existing goal records from the legacy
Goal [goal]table to the newGoal [sngfgoal]table, preserving sysid values. It also creates corresponding target records and maintains relationships between goals and work items (such as Project, Demand, Program) in theGoal Relationship [sngfgoalm2mrelationship]table. - Strategy Data Migration: Strategies from legacy tables like
Enterprise Strategy [enterprisestrategy],Business Unit Strategy [businessunitstrategy], andStrategic Objective [strategicobjective]are migrated to theStrategic Priority [sngfstrategy]table while keeping sysid intact. - Handling Multiple Strategy Associations per Goal: Since the Goal Framework allows a goal to map to only one strategy, if a goal has multiple strategies, the job clones the goal for each additional strategy. The original goal becomes the parent, and cloned goals are sub-goals with appropriate strategy assignments. Cloned sub-goals are prefixed with "Cloned SubGoal:".
- Migrate Strategy-Work Item Relationships: This migration ensures relationships between strategies and work items are reflected in the Goal Relationship table. If no existing association is found, the job creates a dummy goal prefixed with "Goal:" to maintain these links.
- Migrate Goal Relationships for Assigned Entities: This job populates the
Assigned entity typeandAssigned entityfields on the Goal form based on legacy fields (Business Unit, Department, Company, Portfolio) or existing many-to-many relationships with lens entities. For goals with multiple assigned entities, cloned sub-goals are created to represent each relationship.
Practical Benefits for ServiceNow Customers
- Automates the migration of complex strategic data ensuring consistency and coherence across new Goal Framework tables.
- Preserves relationships between goals, strategies, and work items, enabling accurate reporting and planning.
- Supports the transition from legacy data structures to the Goal Framework without data loss or manual intervention.
- Facilitates management of goal assignments and entity relationships, enhancing portfolio planning and goal visibility.
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. |