Automic Workload Automation

  • 1.  Get an IFolder for a given AE folder path, without first fetching the entire FolderTree

    Posted Nov 10, 2017 07:27 AM

    Using the AE Java Application Interface, is there a way to get an IFolder for a particular folder path in the AE system, without first fetching the entire FolderTree? I have been unable to find a way, but I thought perhaps someone might have found a solution.

     

    For what it’s worth, I have opened an enhancement request related to this question:
    More ways to get IFolder objects 



  • 2.  Get an IFolder for a given AE folder path, without first fetching the entire FolderTree

    Posted Nov 10, 2017 07:53 AM
    In the database, and at least acording to what I figured out a while ago, folders have a nesting level (OFS.OFS_LEVEL) and a single parent ID (OFS.OFS_OH_IDNR_F), so that forms a sort of linked list from the deepest nesting level back to the root element. I have not found a way to work from the root element downwards. That is probably the reason behind needing to build the FolderTree first. At least that's my mileage.

    Out of curiosity though: I have not done much with the Java API, how bad is working with folders in this way? I would assume you'd only need to fetch FolderTree once - or does one need to do that repeatedly? How big of a performance hit is it?


  • 3.  Get an IFolder for a given AE folder path, without first fetching the entire FolderTree

    Posted Nov 10, 2017 08:06 AM
    Depending on the size of the tree, it can take just a moment, or several seconds. As long as the tree doesn’t change, you can reuse the existing object.

    The GUI & AWI run an IKickEventListener, to listen for KickEvents of KickEventType type TREE_CHANGED. These kick events are sent any time a work process becomes aware that a change has been made to the OFS  table. If you develop an application that works with AE objects, and this app remains running for more than a few seconds, then it’s probably a good idea to implement something similar. (See also this discussion on kick events.)

    In a busy system, there can be frequent changes to the folder tree, particularly during deployments (XML imports or DB loads of transport case files). I do not know whether the scope of the folder tree changes is relevant to whether an existing FolderTree can still be used. Perhaps any change to the tree is sufficient to invalidate old FolderTree objects. I do not know what would happen if one tried to use an outdated FolderTree object.