attachments

I am using the attachments interface and for some reason it doesn’t appear enabled. I can’t figure what might be wrong but it maybe has something to do we it referencing an #environment variable - how do I change that? i recall it might be through mws front end to the environment?

In most cases when attachments panel is shown as disabled is when attachments provider it uses has incorrect value for container ID. The container ID should be ID or alias of a valid MWS folder to which user has permissions to read/update. Also taskID can be used when attaching files to the task instances.

I am getting this in the logs:
2009-04-20 13:40:46 PDT (Framework : INFO) [RID:5] - Processing request [6r2k0vp9h52x:SysAdmin] http://eme-dev-vm1:8585/meta/default/folder/0000014663 (POST)
2009-04-20 13:40:46 PDT (jsf : WARN) [RID:5] - row not found: ty
2009-04-20 13:40:46 PDT (jsf : WARN) [RID:5] - row not found: ty
2009-04-20 13:40:46 PDT (jsf : WARN) [RID:5] - row not found: ty
Attachments Folder Id = \webMethods712\lecgDataFolder
2009-04-20 13:40:46 PDT (jsf : ERROR) [RID:5] - Action phase of the portlet failed (INVOKE_APPLICATION 5)
com.webMethods.portal.bizPolicy.BizException: [POP.002.0006] Unable to locate biz policy for resource: null
at com.webMethods.portal.bizPolicy.biz.impl.BizPolicyManager.getBizPolicy(BizPolicyManager.java:55)
at com.webMethods.caf.ccdataentry.CcDataEntryDefaultviewView.createFolder(CcDataEntryDefaultviewView.java:1378)
at com.webMethods.caf.ccdataentry.CcDataEntryDefaultviewView.attachmentAction(CcDataEntryDefaultviewView.java:1415)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
at com.webMethods.caf.faces.application.CAFMethodBinding.invoke(CAFMethodBinding.java:67)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at com.webMethods.caf.faces.component.ViewRoot.broadcastEvents(ViewRoot.java:202)
at com.webMethods.caf.faces.component.ViewRoot.processApplication(ViewRoot.java:116)

Yes, this seems like file system location \webMethods712\lecgDataFolder. But it is certainly not an MWS folder. E.g. the folder you create when you login as sysadmin for example. Create folder, give it an alias and use this alias as “containerID” property.

Okay - I understand how to do this - but we want the attachment to be saved to the file system because we antipate alot of files. Does this need to be done outside the form and inside of the data moving along the process?

Are you concerned about MWS not being able to handle amount of files? In reality MWS also stores files on a file system is so called Content Service (you can configure this file system location using Administration > Content > Content Services Admin). But even though files will be stored on a file system they will not be easily accessible from file system directly because MWS applies some logical structure on top, changes names of files etc.

As another option you can do your own implementation of IAttachmentsProvider interface which is meant to save/retrieve raw files and your implementation may quite well store files physically on file system or anywhere your want. Then use your implementation to configure Attachments Panel control

Do you have any information about DIY IAttachmentsProvider that I can reference? That would be great - thanks

Don’t have any samples, but javadocs for the interface can be found here:

http://www.ajax-softwareag.com/articles/Y4LCDN/Caf-7-1-1JavaDocs/com/webmethods/caf/faces/data/attachments/IAttachmentsProvider.html

Alright created a com.lecg.util.AttachmentsProvidersToFileSystem in project and implemented com.webMethods.caf.faces.data.attachments.IAttachmentsProvider but how do I get the reference on the caf ui to point at this? Do I need to add it as a managed/bean or reference?

That is correct, you add a managed bean of your custom class to the page bean. The rest is the same as using OOTB attachments providers