ServiceNow integration Job Migration questions from OLD method to new 12.1.SP1 new version
search cancel

ServiceNow integration Job Migration questions from OLD method to new 12.1.SP1 new version

book

Article ID: 280276

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Require a method to update all existing jobs from the older service desk format to the new format delivered in 12.1sp1

The existing service desk integration has a "service_desk: 1" job attribute.
This creates tickets in the existing ServiceNow system.  

The new value is helpdesk_value = 14

Environment

Autosys 12.1SP1

Resolution

When moving from the old service now integration to the new integration it is required that ALL individual job definitions, that need to use the integration, be updated.

There are two options for mass updating the job definitions.
The first option has an audit trail.
The second does not.

Option 1:
Export the jobs to a file in JIL format.
Update the jobs and then import them back in.

This would provide the recommended audit trail for job modifications.

Option 2:
This option uses direct database queries and DOES NOT HAVE any audit.

The below queries will update ALL jobs to raise tickets.

  1. Configure the helpdesk parameter in the helpdesk configuration file.
  2. Restart or Pause-Resume the Scheduler to apply the configuration changes.
  3. Update the database for the Active Jobs.

    1. Set the Helpdesk flag in the ujo_job table

      To Make changes to all jobs at once:
      update ujo_job
      set helpdesk_value = 14
      where joid > 100 and is_active = 1

      To make changes to an individual job:
      update ujo_job
      set helpdesk_value = 14
      where is_active = 1 AND join in (SELECT joid FROM ujo_job WHERE job_name = '<JOB_NAME>') ;

    2. Entry in ujo_helpdesk

      To Make changes to all jobs at once:
      insert into ujo_helpdesk(job_ver, joid, over_num, helpdesk)
      select j.job_ver, j.joid, j.over_num, 'y'
      from ujo_job j where j.joid > 0 and j.is_active = 1
      AND NOT EXISTS (SELECT 1 FROM ujo_helpdesk h
      WHERE j.joid = h.joid AND j.job_ver = h.job_ver AND h.over_num = j.over_num)

      To make changes to an individual job:
      insert into ujo_helpdesk(job_ver, joid, over_num, helpdesk)
      select j.job_ver, j.joid, j.over_num, 'y'
      from ujo_job j where j.joid > 0 and j.is_active = 1 AND joid in (SELECT joid FROM ujo_job WHERE job_name = 'JOB_NAME')
      AND NOT EXISTS (SELECT 1 FROM ujo_helpdesk h WHERE j.joid = h.joid AND j.job_ver = h.job_ver AND h.over_num = j.over_num);

    3. To disable old service desk integration
      (Optional)

      To Make changes to all jobs at once:
      UPDATE ujo_job SET has_service_desk=0, service_desk=0 WHERE joid > 0; 

      To make changes to an individual job:
      UPDATE ujo_job SET has_service_desk=0, service_desk=0 WHERE joid in (SELECT joid FROM ujo_job WHERE job_name = 'JOB_NAME');

  4. change $AUTOUSER/config.$AUTOSERV to comment out the following attributes:
    ServiceDeskURL
    ServiceDeskUser
    ServiceDeskCust


  5. Create a default template for FAILURE

Note:
- This procedure will add the helpdesk attribute with 'y' for all active jobs. No other helpdesk attributes will be present at the job.
- This is a blanket change for all active jobs at once.


Roll Back Proceadure:

  1. Uncomment the following attributes in $AUTOUSER/config.$AUTOSERV and add valid values for below: 
    ServiceDeskURL
    ServiceDeskUser
    ServiceDeskCust


  2. Run below queries:

    To Make changes to all jobs at once:
    UPDATE ujo_job
    SET service_desk = 1, has_service_desk = 1, helpdesk_value = 0
    WHERE helpdesk_value = 14

    To make changes to an individual job:
    UPDATE ujo_job
    SET service_desk = 1, has_service_desk = 1, helpdesk_value = 0
    WHERE joid in (SELECT joid FROM ujo_job WHERE job_name = '<JOB_NAME>');

    To Make changes to all jobs at once:
    DELETE FROM ujo_helpdesk;

    NOTE: There is no way to keep track of jobs that already use the helpdesk, there is a risk of removing the helpdesk for all jobs created earlier with the helpdesk option.

    To make changes to an individual job:
    DELETE FROM ujo_helpdesk WHERE joid in (SELECT joid FROM ujo_job WHERE job_name = '<JOB_NAME>');



    Rollback changes are done for the Helpdesk.

Additional Information