BPM Data Capture On New Attachment

Opinions & Brainstorming needed!
Business Case:
When a certain type of attachment is created or updated on say a Customer or Supplier, etc (say a 1099 or a NDA or something) we want to capture the date that document will expire (good Document Life Management). The tricky thing is that (per a trace) adding of an attachment usually calls a method inside that Business Object (Customer, Supplier, etc), which means when I call a BPM Form to capture a UD Date field on to be stored in the ‘primary table’ (Customer.XXXXDocExpireDt or Vendor.XXXXDocExpireDt) after the Attachment method is finished (BPM Form called in Post Directive of XXXXAttach) and I set the UD field of the ‘primary table,’ now the data in the UI is ‘old’/‘dirty’ and any further changes will be rejected with the old ‘another user has updated this record.’ I have gotten around this by immediately doing a Method Call for that BO of GetByXXXID to force the UI to get the latest version of the record. While this works… it doesn’t feel right I suspect there is a better, more elegant way to manage this odd situation.
I am considering a few things:

  • I shouldn’t store the doc expire date on the ‘primary table’ but rather on the Document record? XFileAttach or XFileRef?

  • Should I use a Data Directive on the XFile??? table

Any other thoughts, input, ideas, principles to follow or solutions anyone else has used is very much welcomed.

Hi Rick,

We have a data directive that does a user name stamp on addition of new attachment to any record and it works quite well. The DD is on XFileAttch in transaction directive and is shown below. You could make a UD on the XFileAttch for the expire date fairly easily I think.

Nancy

Thanks for the confirmation. The more I think about this the more I think XFileAttch or XFileRef is the best place. I am trying to anticipate future questions and needs with attachment so I like the idea of capturing the user ID too.
Is there a reason you choose XFileAttch instead of XFileRef?

Hi Rick,

I went in the direction of more data… not necessarily needed but there. We have a dashboard that shows all attachments made/present in tree structure. So, when a job is made, attachments are automatically brought in from Part record (IDK if this is always 100% case, but it is sometimes at least). So anywhere the same file is attached to a record in tree structure, we see who is responsible for it. See screenshots for XFileAttch data alone in BAQ vs our DB that ties both XFileAttch and XFileRef together. With you keeping an eye on the file date to expire, it might be best to go with XFileAttch UD field for datestamp.

Nancy

DASHBOARD

1 Like