3 Replies Latest reply on Apr 21, 2014 2:22 PM by Santanu.WCC

    CheckinFilter component

    Sonal C

      This is the code of the CheckinFilter component


          public int doFilter(Workspace ws, DataBinder binder, ExecutionContext cxt) throws DataException, ServiceException {

              String type = binder.getLocal("dDocType");



              String prefix = binder.getEnvironmentValue(type + "_prefix");



              if (prefix != null) {

                  binder.putLocal("AutoNumberPrefix", prefix);


              return CONTINUE;




      Now this is the output of "traceVerbose(binder.getEnvironment().toString());":


      {HTTP_ORIGIN=http://localhost:16201, HTTP_USER_AGENT=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36, IsServletRequest=1, CONTENT_TYPE=multipart/form-data; boundary=----WebKitFormBoundaryTOnyQUkIRJKVenu2, SERVER_PROTOCOL_TYPE=NONE, HTTP_ACCEPT_LANGUAGE=en-US,en;q=0.8, HTTP_REFERER=http://localhost:16201/cs/idcplg?IdcService=CHECKIN_SIMILAR_FORM&dID=206&dDocName=DOCDOC000206&submit=Check+In+Similar, HTTP_CACHE_CONTROL=max-age=0, HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8, IDCCOOKIEPATH=, HTTP_ACCEPT_ENCODING=gzip,deflate,sdch, SERVER_NAME=localhost, SERVER_SOFTWARE=WebLogic Server Tue Nov 15 08:52:36 PST 2011 1441050 Oracle WebLogic Server Module Dependencies 10.3 Thu Sep 29 17:47:37 EDT 2011 Oracle WebLogic Server on JRockit Virtual Edition Module Dependencies 10.3 Wed Jun 15 17:54:24 EDT 2011 , IDCSESSIONVALUE=RhQhTRhKLQXwnw3Whd2bM2x1hGdjxxnkQXby3gbnJm0dByXHJYbn!179715943, URI_PATH=/cs/idcplg, IDCSESSIONKEY=JSESSIONID, HTTP_COOKIE=IdcLocale=English-US; IntradocAuth=Internet; IntradocLoginState=1; IdcTimeZone=Pacific/Midway; ADMINCONSOLESESSION=6yY2TRZb2mJKXvv6LcGsLt62XqNsNhstmCQkG36nTdjkBchqnvnK!-1979890900; JSESSIONID=RhQhTRhKLQXwnw3Whd2bM2x1hGdjxxnkQXby3gbnJm0dByXHJYbn!179715943, SERVER_PROTOCOL=HTTP, REQUEST_METHOD=POST, RemoteClientHostAddress=0:0:0:0:0:0:0:1, SERVER_PORT=16201, REMOTE_ADDR=0:0:0:0:0:0:0:1, IdcAuthChallengeType=http, IS_HTTPS=0, HTTP_CONNECTION=keep-alive, HTTP_HOST=localhost:16201, EXTERNAL_ACCOUNTS=#0023all, REMOTE_USER=weblogic, IsCookieLoggedIn=1, EXTERNAL_ROLES=admin,sysmanager,refineryadmin,rmaadmin,pcmadmin,ermadmin, IDC_REQUEST_AGENT=webserver, BOUNDARY=----WebKitFormBoundaryTOnyQUkIRJKVenu2, ORIGINAL_USER=weblogic, ThreadCount=1, CONTENT_LENGTH=3311}


      But in this output, I couldn't see the value of environment variables that were defined in the dynamic_prefix_environment.cfg file. Why is it so?


      One more ques, what is this m_environment? And what is binder.getEnvironment()? I mean what is its significance? And how to get all its values?

        • 1. Re: CheckinFilter component



          the caveat is in the binder. If you write a Service or ServiceHandler, the system sets m_binder attribute, and you are allowed to get variables defined in .cfg


          Whilst in a filter, the binder is taken from the service from which the filter is triggered - there is no magic in filters and they have to be triggered via commands as follows:

          intradoc.shared.PluginFilters.filter("validateStandard", workspace, binder, service);

          Therefore, the binder points to the context of the other service such as CHECKIN*, where your variables are unknown. I'm not sure if there is way (either via workspace, or through executionContext) to get to variables defined by your component. I'm sure you read my intradoc tutorial, and the only way I could find out was using SharedObjects that are accessible from filters with no issues.



          • 2. Re: CheckinFilter component
            Jonathan Hult

            Like Jiri said, I've always used SharedObjects to retrieve configuration/preference prompt variables.




            • 3. Re: CheckinFilter component

              Hi Sonal,

              I had also faced the same issue long time back. After that I have used SharedObject to retrieve configuration variable.


              Hope it will work.