Automic Workload Automation

  • 1.  Reload (schedule) definition at period turnaround

    Posted Feb 18, 2019 10:22 AM

    Introduction

    The Java User Interface provides a function for schedule (JSCH) tasks called Reload definition at period turnaround.

     

    When you do this, message U04002547 appears:

    U04002547 ATTENTION: Active instanc(es) of Schedule 'UC0.ITE.TEST#1_2.JSCH' will be reloaded at the next period turnaround.

     

    The same message appears whenever you save changes to a schedule that has active instances.

     

    The option can be toggled on or off. When this option has been chosen, a check mark appears next to the option in the menu.

     

    Even though it appears one performs this action at the task level, there is some evidence that the function applies to all running instances of the schedule. For example, if you open the schedule object, you’ll see a message like this at the top of the window:

    Active instance(s) will be reloaded after period turnaround (00:00).

     

    Also, the the related ReloadNextTurnaround Java API class works on schedule objects, not tasks.

     

    Implementation differences between JUI & Java API

    The Reload definition at period turnaround function behaves differently depending on how it is triggered:

     

    Triggered via a JSCH task in the JUI Activities window

    • Initiated at the task level.
    • Can be toggled ON or OFF for an individual task. (Whether this applies to just one task is another question.)
    • The state of the setting can be seen in the JSCH object, by the presence of the red message described above.
    • Causes a message to be written to the Activation log of the JSCH task. E.g.,

      U00020736 Schedule runtime modification: Reload was set to  'OFF' !
      U00020736 Schedule runtime modification: Reload was set to  'ON' !

    Triggered via the ReloadNextTurnaround Java API class

    • Initiated at the object level.
    • Can only be turned ON. If successful, when the object is saved with SaveObject, the AE will return message U04002547.
    • The state of the setting can be retrieved using the isTurnaroundWarning() method of the Schedule class.
    • No message is written to the log of the impacted JSCH task(s).

     

    Questions

    I have a few questions about the Reload definition at period turnaround function:

    1. Does the function operate at the task level or object level? In other words, if one triggers the function on one schedule in the JUI Activities window, does the change also apply to any other running tasks of the same JSCH?
    2. The function is implemented differently in the graphical user interfaces (JUI, AWI) compared to the Java APIs. Does it really behave differently in, or is the difference mostly superficial?
    3. If the function applies to all active instances of a task, why does the JUI give several indications that the function is task-specific? Moreover, is there a reason for the implementation difference?
    4. Is the function available in the Automic Web Interface?  Yes, the function is available in the AWI since v12.


  • 2.  Re: Reload (schedule) definition at period turnaround

    Posted Feb 18, 2019 10:42 AM

    Here’s one more detail. When one initiates the Reload definition at period turnaround operation via the Java User Interface, the program sends the following XML to the AE server:

    <uc-env clientVersion="12.0.6+build.5885" redlight=" " request="eh_79" session="0000000413898371" useridnr="0001025153">
      <request id="SET_RELOAD" idnr="413908838" name="jsch_setreload" src="eh"/>
    </uc-env>

    It seems pretty clear that the JUI uses an API that is not public.



  • 3.  Re: Reload (schedule) definition at period turnaround

    Posted Feb 18, 2019 12:56 PM

    I have learned that both the write (W) and modify at runtime (M) authorizations are required to perform the Reload definition at period turnaround operation.



  • 4.  Re: Reload (schedule) definition at period turnaround

    Posted Feb 19, 2019 10:16 AM

    I have learned that both the write (W) and modify at runtime (M) authorizations are required to perform the Reload definition at period turnaround operation.

     

    Actually, it’s a bit more complicated. The authorization required to use Reload definition at period turnaround depend on how the function is triggered.

    InterfaceAction levelEffect levelAuthorization required
    Java User Interface or Automic Web InterfaceSchedule taskSelected schedule taskModify at runtime (M)

    ReloadNextTurnaround API class

    Schedule object

    All active tasks of schedule

    Write (W)

     

    If the same user must be able to perform the action in both the JUI/AWI and via the APIs, the user must have both M and W authorizations.

     

    A few more things to note:

    • Even though ReloadNextTurnaround ultimately changes only tasks (values in the EH table), from an interface point of view, it behaves as though it were modifying the object. You must open the object in read-write mode, set the reload at turnaround flag, and then save the object before the changes to the associated tasks will be made. Even though write access to the object is required, no changes are made to the actual object definition.
    • Schedule.isTurnaroundWarning() returns true if any active instance of the schedule object is registered to reload at period turnaround time. It appears to do something like this behind the scenes:
    select max(EH_ReloadFlag)
    from EH left join OH on EH_OH_Idnr = OH_Idnr
    where OH_Name = 'TEST1.JSCH'


  • 5.  Re: Reload (schedule) definition at period turnaround

    Posted Feb 19, 2019 04:01 AM

    Q: Is the function available in the Automic Web Interface?

    A: Yes.

     

    The feature is available in AWI v12.0 and later. It has been moved however, compared to where it was in the Java User Interface. It is no longer located in the contextual menu that appears when one right-clicks on a schedule instance in the list of active tasks. Instead, one must open the Schedule Monitor for a schedule instance. First display the list of tasks in the Process Monitoring perspective.

    The Schedule Monitor tab for the selected schedule instance should appear.

     

    The Reload definition at period turnaround can be found in the Modify Schedule menu.

     

    When you have enabled this option, a blue informational message will appear at the top of the Schedule Monitor.

     

    Also, a check mark will appear next to the option in the Modify Schedule menu.

     

    See the page Modifying Active Schedules in the AWA v12.2 User Guide.



  • 6.  Re: Reload (schedule) definition at period turnaround

    Posted Feb 19, 2019 04:07 AM

    In the DB, the reload at period turnaround flag is stored in the EH (Activities) table in the column EH_ReloadFlag. This would suggest that it’s task/instance-specific.

     

    Query

    select OH_Name, EH_AH_Idnr, EH_ReloadFlag
    from EH left join OH
    on EH_OH_Idnr = OH_Idnr
    where OH_Name = 'UC0.ITE.TEST#1_2.JSCH'

     

    Results

    OH_NAMEEH_AH_IDNREH_RELOADFLAG
    UC0.ITE.TEST#1_2.JSCH4141184941
    UC0.ITE.TEST#1_2.JSCH4143539390


  • 7.  Re: Reload (schedule) definition at period turnaround
    Best Answer

    Posted Feb 19, 2019 05:15 AM

    Questions:

    1. Does the function operate at the task level or object level? In other words, if one triggers the function on one schedule in the JUI Activities window, does the change also apply to any other running tasks of the same JSCH?
    2. The function is implemented differently in the graphical user interfaces (JUI, AWI) compared to the Java APIs. Does it really behave differently in, or is the difference mostly superficial?
    3. If the function applies to all active instances of a task, why does the JUI give several indications that the function is task-specific? Moreover, is there a reason for the implementation difference?

     

    Answers:

    The Automation Engine really does behave differently depending on how the reload at period turnaround function is triggered.

     

    Via a particular schedule instance in the JUI Activities window or AWI Schedule Monitor

    • Initiated at the task level.
    • Applies to only the selected schedule instance.

    Via the ReloadNextTurnaround Java API class

    • Initiated at the object level.
    • Applies to all active instances of the object.

     

    I confirmed this using the DB query above.

     

    I have no idea why it works this way. My guess is that when the public Java APIs were being finalized:

    • Automic assumed that in most cases, only one instance of a schedule would be running at a time; and
    • The chosen approach was easier to implement.

    It does seem like a gap in the APIs though.



  • 8.  RE: Reload (schedule) definition at period turnaround

    Posted Mar 04, 2020 10:31 AM
    Hi Team,

    Kindly let us know if we save the schedule in Automic once applying changes to the schedule and message coming as : Active instances will reload after a period turnaround 00:00 " will it effect other schedules for other Jobs as well as we see if we are not saving and selecting yes to option save the schedule with turnaround time the new Job is not running as per schedule.

    Kindly assist on urgent basis.

    Regards,
    Mohd Zain Akbar



  • 9.  RE: Reload (schedule) definition at period turnaround

    Posted Mar 05, 2020 01:29 AM
    Hi Mohd,
    As a long time consultant supporting Automic, we always teach users to double their steps when adding anything to a JSCH.

    1: Add the item to the JSCH definition and when saving, select Yes to the prompt.
    2: Add the item to the Monitor of the same JSCH as 1: and select Yes to the prompt.
    **NOTE** ​​​Item 2 should not be used if the next start date is in the future after next day, only use it when the next start date is the next day.

    I realize it is an extra step, but over the years and versions the functionality has changed, this is one "Bullet Proof" way to make sure it works as expected.

    ------------------------------
    Founder and Partner
    Data Center Automation Consultants DCAC
    ------------------------------