Automic Workload Automation

Example of a Nested Process

  • 1.  Example of a Nested Process

    Posted Dec 12, 2016 11:35 AM
    Scenario:
    You want to nest PROCESS within a PROCESS. 

    Questions:
    1. Is there an example?
    2. Are there any constraints?

    Answers:
    1. Example -

    :set &hnd_names# = prep_process_var('VARA.NESTED_PROCESS_NAMES')
    :process &hnd_names#
      :set &name# = get_process_line(&hnd_names#, 2)
      :print 'Name: &name#'
      :set &hnd_number# = prep_process_var('VARA.NESTED_PROCESS_NUMBERS')
      :process &hnd_number#
        :set &number# = get_process_line(&hnd_number#, 2)
        :print 'Name and number: &name# - &number#'
        :if &number# = '2'
          :term_process &hnd_number#
        :endif
      :endprocess
      :close_process &hnd_number#
    :endprocess
    2. Only constraint is that a nested PROCESS can only be 10 levels deep.