Question


BNY Mellon
US
Last activity: 17 Jul 2017 16:30 EDT
Storing emails & attachments in a CMS
Following from (the unanswered question Design Strategy for Class Specialization ) -- consider a class like Data-Corr-Email, use dfor storing otubound emails. Since it doesn't follow class specialization, all of these are stored in the same class, and same table, which happens to be pr_data (probably not the best design).
Through v7.1.5, I see that it's Data-Corr-.OnSend that saves the Data-Corr-Email (but not the Link-Attachment, I haven't found that). Suppose we want to store these in a different place entirely (e.g., pass it to a service to save in CMS). What's the best way to that?
Another Also, regarding say your sending attachments. And your attachments live not in Data, but in a CMS. SendEmailWithAllAttachments gets the attachments from Link-Attachment/is final. How does Pega propose that this functionality be extended for use with a CMS?
***Updated by moderator: Marissa to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Content management interoperability services (CMIS) under Edit Application > Integration allows you to save Work attachments to an external CMIS system.
"Please note that existing work objects attachments for this application will continue to be accessible as they are stored in the PRPC database. However, disabling content management for this application later will prevent access to work object attachments stored in the content management repository.
Enable for attachments”


BNY Mellon
US
Yes, I'm aware of that. Integration is easier when using CMIS. The (non-class-specialized) Link-Attachment table is used to link to ECM references in the (again, non-class-specialized) Data-WorkAttach-ECM table. And this, I would presume, works with SendEmailWithAllAttachments.
Suppose we just integrate with an ECM system outside of CMIS. We can override in many places, but we can't override activities like SendEmailWithAllAttachments.
And my question about Data-Corr-Email still stands -- has their been any need from anyone to class-specialize this, and/or store in an ECM?


BNY Mellon
US
Let me amend my query above. Here's a summary of code from the final rule SendEmailWithAllAttachments in v7
page_Attachment = db_inf.open(myStepPage.getString(".pxLinkedRefTo"),true); strClass = page_Attachment.getString("pxObjClass"); if ( strClass.equals("Data-WorkAttach-File") ) { ... //purip BUG-122627 use the new utility function to get hold of cmis attachment content String strFileData = pega_processengine_workutilities.pxGetFileAttachmentContent(prop_pxResults.getPageValue(prop_pyAttachment.indexOf())); } else if ( strClass.equals("Data-WorkAttach-Note") ) { ... } else if ( strClass.equals("Data-WorkAttach-ScanDocument") ) { ... } else if ( strClass.equals("Data-WorkAttach-ScreenShot") ) { ... } else if ( strClass.equals("Data-WorkAttach-URL") ) { ... }
This is meant to support a sort of polymorphism -- based on the class of the attachment, open it in a particular sort of way.
But it's not real polymorphism, because of the limited if/else construction.
so our options at this point are:
Let me amend my query above. Here's a summary of code from the final rule SendEmailWithAllAttachments in v7
page_Attachment = db_inf.open(myStepPage.getString(".pxLinkedRefTo"),true); strClass = page_Attachment.getString("pxObjClass"); if ( strClass.equals("Data-WorkAttach-File") ) { ... //purip BUG-122627 use the new utility function to get hold of cmis attachment content String strFileData = pega_processengine_workutilities.pxGetFileAttachmentContent(prop_pxResults.getPageValue(prop_pyAttachment.indexOf())); } else if ( strClass.equals("Data-WorkAttach-Note") ) { ... } else if ( strClass.equals("Data-WorkAttach-ScanDocument") ) { ... } else if ( strClass.equals("Data-WorkAttach-ScreenShot") ) { ... } else if ( strClass.equals("Data-WorkAttach-URL") ) { ... }
This is meant to support a sort of polymorphism -- based on the class of the attachment, open it in a particular sort of way.
But it's not real polymorphism, because of the limited if/else construction.
so our options at this point are:
- Fork the above code into our own activity... which we'd rather not do
- Await 7.1.8 where we can override the R-U-F pxGetFileAttachmentContent
(ideally, what would be really cool is if R-U-Functions can be polymorphic with respect to Pega pxObjClass, so we could )
Indeed, yes, the easiest thing to do is to get our ECM into CMIS compliance. As I said, there were specific reasons it's not using CMIS (which I don't have in front of me right now). But I thought it necessary to point out that this is a gap in polymorphic design that leads to bad programming (forking final rules)


Pegasystems Inc.
IN
Hi Jon, Good Morning!
instead of simple if/else condition - would it be helpful if the condition is specified as (@isAncestorOf(tools, .pyClassName,"Data-WorkAttach-File"))?
note: function 'pxGetFileAttachmentContent' is a final rule...
Please share your comments, Thank you!
psahukaru


BNY Mellon
US
I don't follow exactly how that supports polymorphism. Ideally, you'd have pxGetFileAttachmentContent() call an activity rule in the given class.


Pegasystems Inc.
IN
checking 'isAncestorOf' may help in creating/extending custom classes from 'Data-WorkAttach-' based on requirement if not polymorphic call...sorry for the confusion...


BNY Mellon
US
Sure, but you're not addressing how (or whether) the Java code should be written, and whether this is a supported direction of the code. SendEmailWithAllAttachments is final.


Pega
AU
Hi Jon,
I was wondering if you made any progress around this issue. We are working right now at a customer with very similar requirements.
We should be able to store file attachments in a non-CMIS compliant ECM. Emails (inbound/outbound) should be stored as well. Storing the file attachments seems to be fairly easy overwriting the CMIS rules (e.g. pySaveContent, pyDownloadAttachmentContent, etc.) so instead of invoking to the CMIS connectors, the system invokes to the custom connectors that bring/put content from/to ECM.
However, I cannot find any valid solution for the email part ... did you follow any particular approach?
Jorge


JPMC
IN
Hi,
I also have a very similar requirement to store emails in NON CMIS compliant ECM, Please suggest if you found a good wayout.
Am using Pega 7.2.1