14 Replies Latest reply on Jun 12, 2014 9:03 AM by ShrabanFSUK

    Stop .exe file to get checked into WCC


      Hi All,


      I have couple of question:


      1)Do anybody knows how can we prevent a user checkin in .exe file into Oracle Webcenter Content

      2) Through DIS if I have checked in a email, another user should not be able to push the same email again?


      Does anybody has worked on this before please provide me with a solutions or suggestions.


      Best Regards,


        • 1. Re: Stop .exe file to get checked into WCC

          You could write a filter invalidating check-in (ideally, with a proper error message).


          I've done something similar for 10g - only my check was based on exceeding the assigned quota. So, you could use this component as a starting point: see https://drive.google.com/file/d/0B0NLbq1MqaEQT19oMGd4cEhWZXM/edit?usp=sharing

          • 2. Re: Stop .exe file to get checked into WCC

            Hi Shraban,


                   As Jiri mentioned you can develop a custom component to override the filter 'postValidateCheckinData' with your java code. Also in the design point of view you can create the environment file with the list of file formats/extenstion need to be blocked during check-in.

            For the second requirement I am just what would be the business usecase. With DIS outlook integration once you try to drop the existing email in the same folder then the name will be sufixed with (1).msg. It is nothing but a normal windows funtionality rather then DIS. Eventhough if you write a custom component for checkin filter to match the title then it would be very much time consuming and it is not a suggested option.





            • 3. Re: Stop .exe file to get checked into WCC

              Hi Manoj,


              Thanks for responding. For the Second requirement,I am using the outlook plugin to checkin the email , I don't want the drag and drop functionality of DIS.

              For the first requirement is there any configuration which we can use rather than creating a filter.


              Best Regards,


              • 5. Re: Stop .exe file to get checked into WCC

                Thanks William, that was really helpful and it worked like a gem.

                • 6. Re: Stop .exe file to get checked into WCC

                  Hi William,


                  The solution is working fine for the profile if we do checkin through WCC UI,but this doesn't work if I use DIS MS outlook integration for doing a check with a .exe attachment.




                  • 7. Re: Stop .exe file to get checked into WCC
                    Sonal C

                    Write a filter on postValidateCheckinData event.


                    Check this code. Its just a hint:


                    String dExtension = binder.getLocal("dExtension");

                    String ExtensionsToControl = "";

                    ExtensionsToControl = SharedObjects.getEnvironmentValue("ExtensionsToControl");

                    if (ExtensionsToControl.indexOf(dExtension) <=0)


                        return CONTINUE;




                    Create an environment file and mention the file extensions



                    Check this link for more info: Filter implementation in check-in content

                    • 8. Re: Stop .exe file to get checked into WCC
                      William Phelps

                      DIS/WebDAV doesn't set the flagging that the profile requires.


                      If you go into the rule's activation conditions and look at the tab marked "Custom", you'll probably seem something like


                      ( (dpEvent like "OnSubmit")

                      and (dpAction like "CheckinSel" or dpAction like "CheckinNew")

                      and (IsWorkflow or not IsWorkflow))


                      Tick the "Custom" checkbox and edit the code to look like this instead.  Save and retest.


                      ( (dpEvent like "OnSubmit")

                      and (dpAction like "CheckinSel" or dpAction like "CheckinNew" or dpAction like "NoAction")

                      and (IsWorkflow or not IsWorkflow))


                      I keep seeing suggestions for filters, which is fine, but the concept being demonstrated here is that Java coding simply isn't necessary for EVERYTHING.


                      One solution posted on this thread suggests a filter that looks at a string variable to accomplish the same thing the profile rule does (look at the file extension without sniffing the actual file contents). The filter approach in this case simply is not as flexible as using the profile.  Suppose I only need this for one specific use case and not a global configuration?  The profile rule can be either global or targeted to a specific profile.  Could I code a filter the same way? Yes, but the level of effort is greater, and I'm not getting any additional value that I couldn't achieve with the profile rule faster and less intrusively.


                      What if the file extension list changes - with a filter, to edit the configuration, a restart is required to take effect .  Today it's exe files, tomorrow it's exe and dll files. The profile can be changed much easier (and without a customization/edit to a config file/restart).


                      At the recent Collaborate convention in Las Vegas, I presented a session where I took several of the "customizations" that get repeatedly asked in the forums and showed how to do them in profiles.  Customizations have their place, but you'll be pleasantly surprised what the product can already do if you take the time to do your homework.   

                      • 9. Re: Stop .exe file to get checked into WCC
                        Sonal C

                        William, can you share the presentation which you used while presenting the session (if possible) ? I will like to know the list of the common customizations.

                        • 10. Re: Stop .exe file to get checked into WCC
                          William Phelps

                          The presentation is quite large actually, so it's not something I'm going to email around.  I'm also submitting it for OpenWorld consideration, so I'm not going to free-release it until after OpenWorld at the earliest in order to preserve most of the content.  (I respectfully think that it's not really fair to the people who paid and attended the Collaborate session to give it away in its entirety for free so soon after the conference.)


                          I will however be releasing some of the solutions on the Sena Sound Bites blog over the summer.

                          • 12. Re: Stop .exe file to get checked into WCC

                            Hi William,


                            I tried your suggestion but its throwing the below error while checking in any email:

                            Contentitem <undefined> has invalid content info values. csDPSideEffects(DisallowExeFiles) An error  while evaluating:


                            <$exec rsMakeFromString("rsTempFile",strFileName,"ext")$>

                            <$exec rsSetRow("rsTempFile", rsTempFile.#numRows-1)$>

                            <$if strTrimWs(rsTempFile.ext) like "exe"$>

                            <$abortToErrorPage("\n\nEXE files are not allowed.")$>


                            Offset in runtime evaluation is at line 4 and character 16.Unable to find values for specific lookup parameter 'rsTempFile.ext'.


                            Any suggestion if I have done any mistake.




                            • 13. Re: Stop .exe file to get checked into WCC
                              William Phelps

                              Your activation condition needs to be tweaked.


                              ( (dpEvent like "OnSubmit" or dpEvent like "OnImport") and

                              (dpAction like "CheckinSel" or dpAction like "CheckinNew"))


                              I tested this before posting this response, and the checkin fails as expected.

                              • 14. Re: Stop .exe file to get checked into WCC

                                Thanks William. It works as expected.