8 Replies Latest reply: Jun 6, 2012 9:00 AM by Jonathan Hult RSS

    Checkin Filter Issue

    user1175496
      Hi,
      I have created a Custom component with a check in filter which updates the external database with some of the fields on Checking in a new document.The Filter is getting executed ,but the update is not happening.I tried to use "validateStandard" and "preComputeDocName" both but I'm simply seeing this line in the server output logs: ">services/6     05.24 02:37:06.020     IdcServer-9     Calling filter event preComputeDocName on class com.org.updateDatabase with parameter null ".
      I followed the steps given in "Bex Huff",Can any one please point to any other configurations that need to be done in order to get this running.
      TIA
        • 1. Re: Checkin Filter Issue
          831206
          Hi,

          Please post the server logs. and the details for the custom component. Please check if the connection is done properly with the external database.


          Thanks,

          Saurabh
          • 2. Re: Checkin Filter Issue
            user1175496
            Saurabh Anand wrote:
            Hi,

            Please post the server logs. and the details for the custom component. Please check if the connection is done properly with the external database.


            Thanks,

            Saurabh
            PFB the server logs and Connection is being done properly i tested the piece of code for connection and Insertion ,its working fine.



            services/6     05.24 07:08:27.622     IdcServer-18     Instantiated service class intradoc.server.DocService to execute service CHECKIN_NEW_SUB
            services/6     05.24 07:08:27.622     IdcServer-18     Calling filter event executeSubServiceCode on class collections.CollectionFilters with parameter executeSubServiceCode
            services/7     05.24 07:08:27.623     IdcServer-18     Executing CHECKIN_NEW_SUB of type SubService (No Idoc stack)
            services/7     05.24 07:08:27.623     IdcServer-18     Doing action type 3 and function setLocalValues
            services/6     05.24 07:08:27.623     IdcServer-18     Executed method setLocalValues on service intradoc.server.DocService
            services/7     05.24 07:08:27.623     IdcServer-18     Doing action type 3 and function checkDocRules
            services/6     05.24 07:08:27.623     IdcServer-18     Called filter event checkDocRules with no filter plugins registered
            services/6     05.24 07:08:27.624     IdcServer-18     Called filter event checkDocRules with no filter plugins registered
            services/6     05.24 07:08:27.624     IdcServer-18     Called filter event checkMetaChangeSecurity with no filter plugins registered
            services/6     05.24 07:08:27.624     IdcServer-18     Called filter event isUseEntitySecurity with no filter plugins registered
            services/6     05.24 07:08:27.624     IdcServer-18     Executed method checkDocRules on handler tiffconverter.ConditionalDocState
            services/7     05.24 07:08:27.624     IdcServer-18     Doing action type 3 and function makeNewRevClass
            services/6     05.24 07:08:27.624     IdcServer-18     Called filter event makeNewRevClass with no filter plugins registered
            systemdatabase/7     05.24 07:08:27.625     IdcServer-18     (start) SELECT IdcSeqRevClassID.NEXTVAL as dNextIndex FROM DUAL
            systemdatabase/6     05.24 07:08:27.626     IdcServer-18     1.58 ms. SELECT IdcSeqRevClassID.NEXTVAL as dNextIndex FROM DUAL[Executed. Returned row(s): true]
            services/6     05.24 07:08:27.627     IdcServer-18     Called filter event preComputeDocName with no filter plugins registered
            services/6     05.24 07:08:27.627     IdcServer-18     Called filter event computeDocName with no filter plugins registered
            systemdatabase/6     05.24 07:08:27.627     IdcServer-18     Closing active result set
            systemdatabase/6     05.24 07:08:27.627     IdcServer-18     Closing statement in closing internals
            systemdatabase/7     05.24 07:08:27.627     IdcServer-18     (start) SELECT/*+ INDEX (Revisions dDocName_Revisions)*/ dID
            systemdatabase/7     05.24 07:08:27.627     IdcServer-18               FROM Revisions
            systemdatabase/7     05.24 07:08:27.627     IdcServer-18               WHERE dDocName = 'PMDEV_001825'
            systemdatabase/6     05.24 07:08:27.630     IdcServer-18     3.03 ms. SELECT/*+ INDEX (Revisions dDocName_Revisions)*/ dID
            systemdatabase/6     05.24 07:08:27.630     IdcServer-18               FROM Revisions
            systemdatabase/6     05.24 07:08:27.630     IdcServer-18               WHERE dDocName = 'PMDEV_001825'[Executed. Returned row(s): false]
            systemdatabase/6     05.24 07:08:27.630     IdcServer-18     Closing active result set
            systemdatabase/6     05.24 07:08:27.630     IdcServer-18     Closing statement in closing internals
            systemdatabase/7     05.24 07:08:27.630     IdcServer-18     (start) INSERT INTO RevClasses (dRevClassID, dDocName, dDocCreator, dDocCreatedDate,
            systemdatabase/7     05.24 07:08:27.630     IdcServer-18               dDocLastModifier, dDocLastModifiedDate, dDocOwner, dDocFunction)
            systemdatabase/7     05.24 07:08:27.630     IdcServer-18               VALUES(1825, 'PMDEV_001825', 'weblogic', {ts '2012-05-24 07:08:27.627'}, 'weblogic', {ts '2012-05-24 07:08:27.627'}, 'weblogic', '')
            systemdatabase/6     05.24 07:08:27.633     IdcServer-18     2.61 ms. INSERT INTO RevClasses (dRevClassID, dDocName, dDocCreator, dDocCreatedDate,
            systemdatabase/6     05.24 07:08:27.633     IdcServer-18               dDocLastModifier, dDocLastModifiedDate, dDocOwner, dDocFunction)
            systemdatabase/6     05.24 07:08:27.633     IdcServer-18               VALUES(1825, 'PMDEV_001825', 'weblogic', {ts '2012-05-24 07:08:27.627'}, 'weblogic', {ts '2012-05-24 07:08:27.627'}, 'weblogic', '')[Executed. 1 row(s) affected.]
            services/6     05.24 07:08:27.633     IdcServer-18     Executed method makeNewRevClass on handler tiffconverter.ConditionalDocState
            services/7     05.24 07:08:27.633     IdcServer-18     Doing action type 3 and function validateStandard
            services/6     05.24 07:08:27.634     IdcServer-18     Calling filter event validateStandard on class dynamicconverter.DynConverterFilters with parameter validateStandardCheckinParams
            services/6     05.24 07:08:27.634     IdcServer-18     Calling filter event validateStandard on class com.org.updateDatabase with parameter null
            services/6     05.24 07:08:27.780     IdcServer-18     Calling filter event validateStandard on class collections.CollectionFilters with parameter validateStandard
            systemdatabase/7     05.24 07:08:27.780     IdcServer-18     (start) UPDATE RevClasses SET dRevClassID = dRevClassID WHERE dDocName = 'PMDEV_001825'
            systemdatabase/6     05.24 07:08:27.782     IdcServer-18     1.42 ms. UPDATE RevClasses SET dRevClassID = dRevClassID WHERE dDocName = 'PMDEV_001825'[Executed. 1 row(s) affected.]
            services/6     05.24 07:08:27.782     IdcServer-18     Called filter event postMetaFileValidation with no filter plugins registered
            services/6     05.24 07:08:27.783     IdcServer-18     Executed method validateStandard on handler tiffconverter.ConditionalDocState
            services/7     05.24 07:08:27.783     IdcServer-18     Doing action type 3 and function getNextCounter
            systemdatabase/7     05.24 07:08:27.783     IdcServer-18     (start) SELECT IdcSeqRevID.NEXTVAL as dNextIndex FROM DUAL
            systemdatabase/6     05.24 07:08:27.785     IdcServer-18     1.14 ms. SELECT IdcSeqRevID.NEXTVAL as dNextIndex FROM DUAL[Executed. Returned row(s): true]
            services/6     05.24 07:08:27.785     IdcServer-18     Executed method getNextCounter on service intradoc.server.DocService
            services/7     05.24 07:08:27.785     IdcServer-18     Doing action type 3 and function checkCriteriaWorkflow
            services/6     05.24 07:08:27.785     IdcServer-18     Executed method checkCriteriaWorkflow on handler tiffconverter.ConditionalDocState
            services/7     05.24 07:08:27.785     IdcServer-18     Doing action type 3 and function validateCheckinData
            services/6     05.24 07:08:27.786     IdcServer-18     Calling filter event validateCheckinData on class collections.CollectionFilters with parameter validateCheckinData
            services/6     05.24 07:08:27.786     IdcServer-18     Calling filter event validateCheckinData on class desktoptag.DesktopTagFilters with parameter validateCheckinData
            services/6     05.24 07:08:27.786     IdcServer-18     Called filter event desktopTagCheckinFilter with no filter plugins registered
            services/6     05.24 07:08:27.823     IdcServer-18     Instantiated service class intradoc.server.UserService to execute service EC_GET_PROPERTY
            services/6     05.24 07:08:27.823     IdcServer-18     Calling filter event afterHttpImplementorInit on class intradoc.idcwls.IdcServletFilter with parameter afterHttpImplementorInit
            services/6     05.24 07:08:27.823     IdcServer-18     Called filter event initFileStore with no filter plugins registered
            services/6     05.24 07:08:27.823     IdcServer-18     Called filter event beforeInitLocale with no filter plugins registered
            services/6     05.24 07:08:27.823     IdcServer-18     Called filter event copyOverProxyHeaders with no filter plugins registered
            services/6     05.24 07:08:27.823     IdcServer-18     Calling filter event alterUserCredentials on class proxyconnections.ProxyConnectionsFilter with parameter mapProxiedCredentials
            services/6     05.24 07:08:27.824     IdcServer-18     Calling filter event alterUserCredentials on class extendeduserattributes.ExtendedUserAttributesFilter with parameter alterUserCredentials
            services/7     05.24 07:08:27.824     IdcServer-18     Executing EC_GET_PROPERTY of type TopLevel (No Idoc stack)
            services/7     05.24 07:08:27.824     IdcServer-18     Doing action type 3 and function getExtendedConfigProperty
            systemdatabase/6     05.24 07:08:27.824     IdcServer-18     Closing active result set
            systemdatabase/6     05.24 07:08:27.824     IdcServer-18     Closing statement in closing internals
            systemdatabase/7     05.24 07:08:27.825     IdcServer-18     (start) SELECT * FROM ExtendedConfigProperties
            systemdatabase/7     05.24 07:08:27.825     IdcServer-18     WHERE dECPropType='WebCenter'
            systemdatabase/7     05.24 07:08:27.825     IdcServer-18     AND dECPropFullKey='Public:DesktopIntegrationURL'
            systemdatabase/6     05.24 07:08:27.826     IdcServer-18     1.76 ms. SELECT * FROM ExtendedConfigProperties
            systemdatabase/6     05.24 07:08:27.826     IdcServer-18     WHERE dECPropType='WebCenter'
            systemdatabase/6     05.24 07:08:27.826     IdcServer-18     AND dECPropFullKey='Public:DesktopIntegrationURL'[Executed. Returned row(s): false]
            services/6     05.24 07:08:27.826     IdcServer-18     Executed method getExtendedConfigProperty on handler extendeduserattributes.ExtendedUserAttributesHandler
            services/6     05.24 07:08:27.827     IdcServer-18     Calling filter event validateCheckinData on class emailmetadata.EmailMetadataFilters with parameter validateCheckinData
            services/6     05.24 07:08:27.827     IdcServer-18     Called filter event evaluateGlobalRulesAndProfile with no filter plugins registered
            services/6     05.24 07:08:27.828     IdcServer-18     Called filter event finishProfileEvaluation with no filter plugins registered
            services/6     05.24 07:08:27.828     IdcServer-18     Called filter event createDocData with no filter plugins registered
            systemdatabase/6     05.24 07:08:27.828     IdcServer-18     Closing active result set
            systemdatabase/6     05.24 07:08:27.828     IdcServer-18     Closing statement in closing internals
            systemdatabase/7     05.24 07:08:27.828     IdcServer-18     (start) SELECT IdcSeqDocID.NEXTVAL as dNextIndex FROM DUAL
            systemdatabase/6     05.24 07:08:27.829     IdcServer-18     1.26 ms. SELECT IdcSeqDocID.NEXTVAL as dNextIndex FROM DUAL[Executed. Returned row(s): true]
            services/6     05.24 07:08:27.829     IdcServer-18     Calling filter event determineDocConversion on class damconvertersupport.DamConverterSupportFilter with parameter determineDocConversionFilter
            services/6     05.24 07:08:27.832     IdcServer-18     Called filter event setMetaDefaults with no filter plugins registered
            services/6     05.24 07:08:27.833     IdcServer-18     Executed method setMetaDefaults on handler intradoc.server.DocCommonHandler
            services/6     05.24 07:08:27.834     IdcServer-18     Calling filter event postValidateCheckinData on class collections.CollectionValidateCheckinData with parameter postValidateCheckinData
            services/6     05.24 07:08:27.834     IdcServer-18     Calling filter event postValidateCheckinData on class collections.CollectionFilters with parameter postValidateCheckinData
            systemdatabase/6     05.24 07:08:27.834     IdcServer-18     Closing active result set
            systemdatabase/6     05.24 07:08:27.834     IdcServer-18     Closing statement in closing internals
            systemdatabase/7     05.24 07:08:27.834     IdcServer-18     (start) SELECT ColMeta.xForceFolderSecurity,dSecurityGroup,dDocAccount FROM ColMeta,Collections WHERE ColMeta.dCollectionID=0 and Collections.dCollectionID=0
            systemdatabase/6     05.24 07:08:27.836     IdcServer-18     1.42 ms. SELECT ColMeta.xForceFolderSecurity,dSecurityGroup,dDocAccount FROM ColMeta,Collections WHERE ColMeta.dCollectionID=0 and Collections.dCollectionID=0[Executed. Returned row(s): false]
            services/6     05.24 07:08:27.836     IdcServer-18     Calling filter event updateExtendedAttributes on class linkmanager.LinkDocFilter with parameter updateExtendedAttributes
            services/6     05.24 07:08:27.836     IdcServer-18     Calling filter event updateExtendedAttributes on class folios.FolioIndexerFilter with parameter updateExtendedAttributes
            systemdatabase/6     05.24 07:08:27.836     IdcServer-18     Closing active result set
            systemdatabase/6     05.24 07:08:27.836     IdcServer-18     Closing statement in closing internals
            systemdatabase/7     05.24 07:08:27.837     IdcServer-18     (start) UPDATE/*+ INDEX (Revisions dRevClassID_2_Revisions)*/ Revisions SET dRevRank=dRevRank+1 WHERE dRevClassID=1825 and dID<2021
            systemdatabase/6     05.24 07:08:27.840     IdcServer-18     2.99 ms. UPDATE/*+ INDEX (Revisions dRevClassID_2_Revisions)*/ Revisions SET dRevRank=dRevRank+1 WHERE dRevClassID=1825 and dID<2021[Executed. 0 row(s) affected.]
            services/6     05.24 07:08:27.840     IdcServer-18     Executed method validateCheckinData on handler tiffconverter.ConditionalDocState
            services/7     05.24 07:08:27.840     IdcServer-18     Doing action type 2 and function Irevision
            systemdatabase/7     05.24 07:08:27.840     IdcServer-18     (start) INSERT INTO Revisions (dID, dDocName, dDocType, dDocTitle, dDocAuthor,
            systemdatabase/7     05.24 07:08:27.840     IdcServer-18               dRevClassID, dRevisionID, dRevLabel, dIsCheckedOut, dDocAccount, dSecurityGroup,
            systemdatabase/7     05.24 07:08:27.840     IdcServer-18               dCreateDate, dInDate, dOutDate, dStatus, dReleaseState,
            systemdatabase/7     05.24 07:08:27.840     IdcServer-18               dPublishType, dPublishState, dWorkflowState, dRevRank)
            systemdatabase/7     05.24 07:08:27.840     IdcServer-18               values(2021, 'PMDEV_001825', 'Document', '111', 'weblogic', 1825, 1, '1', 0, '', 'Public', {ts '2012-05-24 07:08:27.627'}, {ts '2012-05-24 05:32:00.000'}, null, 'GENWWW', 'N', '', '', '', 0)
            systemdatabase/6     05.24 07:08:27.872     IdcServer-18     32 ms. INSERT INTO Revisions (dID, dDocName, dDocType, dDocTitle, dDocAuthor,
            systemdatabase/6     05.24 07:08:27.872     IdcServer-18               dRevClassID, dRevisionID, dRevLabel, dIsCheckedOut, dDocAccount, dSecurityGroup,
            systemdatabase/6     05.24 07:08:27.872     IdcServer-18               dCreateDate, dInDate, dOutDate, dStatus, dReleaseState,
            systemdatabase/6     05.24 07:08:27.872     IdcServer-18               dPublishType, dPublishState, dWorkflowState, dRevRank)
            systemdatabase/6     05.24 07:08:27.872     IdcServer-18               values(2021, 'PMDEV_001825', 'Document', '111', 'weblogic', 1825, 1, '1', 0, '', 'Public', {ts '2012-05-24 07:08:27.627'}, {ts '2012-05-24 05:32:00.000'}, null, 'GENWWW', 'N', '', '', '', 0)[Executed. 1 row(s) affected.]
            services/7     05.24 07:08:27.873     IdcServer-18     Doing action type 2 and function Imeta
            systemdatabase/7     05.24 07:08:27.873     IdcServer-18     (start) INSERT INTO DocMeta(dID,xComments,xIdcProfile,xPartitionId,xWebFlag,xStorageRule,xCpdIsTemplateEnabled,xCpdIsLocked,xCollectionID,xHidden,xReadOnly,xInhibitUpdate,xForceFolderSecurity,xWCTags,xWCPageId,xWCWorkflowAssignment,xWCWorkflowApproverUserList,xWebsiteObjectType,xWebsites,xDontShowInListsForWebsites,xWebsiteSection,xRegionDefinition,xDamConversionType,xPackagedConversions,xVideoRenditions,xExternalDataSet,xTemplateType) VALUES(2021,'','','','','AAADBStorage',0,0,0,'FALSE','FALSE','FALSE','FALSE','','','','','','','','','','','','','','')
            systemdatabase/6     05.24 07:08:28.100     IdcServer-18     227 ms. INSERT INTO DocMeta(dID,xComments,xIdcProfile,xPartitionId,xWebFlag,xStorageRule,xCpdIsTemplateEnabled,xCpdIsLocked,xCollectionID,xHidden,xReadOnly,xInhibitUpdate,xForceFolderSecurity,xWCTags,xWCPageId,xWCWorkflowAssignment,xWCWorkflowApproverUserList,xWebsiteObjectType,xWebsites,xDontShowInListsForWebsites,xWebsiteSection,xRegionDefinition,xDamConversionType,xPackagedConversions,xVideoRenditions,xExternalDataSet,xTemplateType) VALUES(2021,'','','','','AAADBStorage',0,0,0,'FALSE','FALSE','FALSE','FALSE','','','','','','','','','','','','','','')[Executed. 1 row(s) affected.]
            services/7     05.24 07:0
            • 3. Re: Checkin Filter Issue
              klee
              Do you have autocommit set off and not committing after the insert? Just trying to go for the simple solution here :-)
              • 4. Re: Checkin Filter Issue
                user1175496
                klee wrote:
                Do you have autocommit set off and not committing after the insert? Just trying to go for the simple solution here :-)
                Yepp I have already checked all these details ,but no luck :-(
                • 5. Re: Checkin Filter Issue
                  klee
                  If I am understanding your problem correctly - Looking at the code you posted, I suggest making the following change and see how the results turn out.

                  I wouldn't make a change to the docmeta table during a check-in. This is a transaction in progress. If you need to, either insert the data to another table of your creation, or if you need to, update meta data using the binder.putLocal("meta-name").

                  Hope that helps,

                  Ken
                  • 6. Re: Checkin Filter Issue
                    user1175496
                    klee wrote:
                    If I am understanding your problem correctly - Looking at the code you posted, I suggest making the following change and see how the results turn out.

                    I wouldn't make a change to the docmeta table during a check-in. This is a transaction in progress. If you need to, either insert the data to another table of your creation, or if you need to, update meta data using the binder.putLocal("meta-name").

                    Hope that helps,

                    Ken
                    Hi,
                    The code which i have written makes an update to the custom table created in DEV_OCS schema,The code when run independently is Inserting the values in the table ,but while being executed via a filter;update is not happening.
                    I created the filter using the steps given in Bex's Book.I absolutely have no clue as to where am i going wrong and Is there any other way to debug this....
                    • 7. Re: Checkin Filter Issue
                      user1175496
                      Can anyone give me any pointers to debug this issue..and Is there any way to see where the method is getting stuck ???
                      TIA
                      user1175496 wrote:
                      klee wrote:
                      If I am understanding your problem correctly - Looking at the code you posted, I suggest making the following change and see how the results turn out.

                      I wouldn't make a change to the docmeta table during a check-in. This is a transaction in progress. If you need to, either insert the data to another table of your creation, or if you need to, update meta data using the binder.putLocal("meta-name").

                      Hope that helps,

                      Ken
                      Hi,
                      The code which i have written makes an update to the custom table created in DEV_OCS schema,The code when run independently is Inserting the values in the table ,but while being executed via a filter;update is not happening.
                      I created the filter using the steps given in Bex's Book.I absolutely have no clue as to where am i going wrong and Is there any other way to debug this....
                      • 8. Re: Checkin Filter Issue
                        Jonathan Hult
                        Please post your Java code and we can help examine it.

                        Also, you may want to hook into a filter such as serviceCleanUp instead of validateStandard. If the checkin/update fails after validateStandard, you would have already put something in the database. serviceCleanUp runs at the end of every service call so you could check to see if it was a checkin/update and then try to put something in the database. You should also be far enough out of the checkin/update transaction, that you do not have any database transaction issues.

                        Jonathan
                        http://redstonecontentsolutions.com
                        http://corecontentonly.com