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”);
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,
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).
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… ?