IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Creating new folders on MYS dynamically

    Posted Mon February 23, 2009 03:03 PM

    Hello,

    I’m trying to implement the logic to permit new folders being created dynamically in MWS 7.1.2 from a business process. Unfortunatelly, I can only create raw objects instead of folders.

    My implementation is using the interface com.webMethods.portal.bizPolicy.biz.meta.IContainerPolicy to create new folders from a already created one (the root folder) in the following way:

    [i]HashMap properties = new HashMap();
    properties.put(IConstants.XTYPE_ID,“xtype”);
    properties.put(IConstants.NAME, “folderName”);
    properties.put(IConstants.FOLDER_TYPE, “folder”);

    IContainerPolicy.createChild(IContext, IThingID, properties).[/i]

    I think the problem is related on the properties values “XTYPE_ID”, “NAME” and “FOLDER_TYPE”, as actually a new object is created on MWS after its invocation, but it is not a folder. I’m not able to find the Javadoc of the interface com.webMethods.portal.framework.IConstants, so I just guessed the values to be used…

    Is this interface javadoc anywhere or does anybody know the appropiate values to create a new folder? Is there any other way to implement such functionallity?

    Thanks in advance for any suggestion and best regards,

    Albert Capdevila


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 2.  RE: Creating new folders on MYS dynamically

    Posted Mon February 23, 2009 03:34 PM

    Hi Albert
    instead of doing
    properties.put(IConstants.FOLDER_TYPE, “folder”);

    use this property:
    properties.put(IConstants.XTYPE_NAME, “folder”);

    I believe that should solve it.

    Best regards
    Javier


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 3.  RE: Creating new folders on MYS dynamically

    Posted Mon February 23, 2009 03:47 PM

    Hi Javier,

    I already tried that, as specified in the IContainerPolicy.createChild javadoc, but I get a compilation error as the member XTYPE_NAME does not exist in the interface IConstants. I also tried to specify “folder” as the value of “XTYPE_ID” with the same bad results.
    I’m not sure if any of the following causes could be the problem:

    • Something in the API changed (the javadoc is refered to MWS 7.1.1 and I’m using 7.1.2).
    • The right IConstants interface is in another package thant the one I’m using (com.webMethods.portal.framework).

    Thanks and best regards.

    Albert


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 4.  RE: Creating new folders on MYS dynamically

    Posted Mon February 23, 2009 04:15 PM

    Hi
    that is exactly the problem… you have to use the interface

    com.webmethods.portal.system.IConstants

    best regards,
    Javier


    #webMethods-BPMS
    #webMethods
    #MWS-CAF-Task-Engine


  • 5.  RE: Creating new folders on MYS dynamically

    Posted Mon February 23, 2009 05:09 PM

    It was really the problem. Now it works.

    Thanks a lot.


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 6.  RE: Creating new folders on MYS dynamically

    Posted Wed July 16, 2014 01:37 PM

    Hi,

    I have tried to create folders, too. However the IContainerPolicy.createChild(…) cannot be invoked statically. How do I retrieve an IContainerPolicy object? Somewhere via PortalSystem… ?

    Regards, Michael


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS