Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Count of incoming hops in Javascript entry

  1. #1
    Join Date
    Mar 2012

    Question Count of incoming hops in Javascript entry

    Hello all,

    I googled already and searched the forum but I couldn't find a solution for the following:

    My intention is to run some entries in a job in parallel but then wait at a specific entry until all predecessors are completed and then run sequentially. The idea is to use a JavaScript entry which increments a job variable each time it's called. After the expected value is reached it continues with the following entries. Generally this works fine but to make it even more handy I'm looking for a way to access the count of incoming hops in the JavaScript entry. Is this possible via some variable/function in the JS code?

    Thanks in advance!

  2. #2
    Join Date
    Jun 2011


    you can access variable by using the getVariable() - getEnvironmentVar() functions.

  3. #3
    Join Date
    Mar 2012


    Thanks for your answer. I know how to access variables in general but I'm interested in getting the count of incoming hops to make my JS entry more generic and reusable.

  4. #4
    Join Date
    Apr 2008


    The current way to accomplish this in PDI is to use nested jobs:

    Job 1
    - Job 2 (Parallel Wrapper)
    - - Job 3 (Parallel)
    - - Job 4 (Parallel)
    - - Job 5 (Parallel)
    - Job 6

    Jobs 3, 4, and 5 will execute at the same time (in parallel)
    Job 6 will not start until Job 2 finishes, which will not happen until all Jobs (3, 4, 5) complete.
    Job 1 will not finish until Job 6 finishes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.