This discussion is archived
11 Replies Latest reply: Dec 5, 2012 3:40 PM by Bunty RSS

UCM Including profile rules in custom checkin page

759279 Newbie
Currently Being Moderated
Hi ,

I am looking for a way to include ucm profile rules in our custom check in page.

Basically, we have a profile rule that includes custom metadata fields. We need to bring them over in our custom check in page.

Does anyone know how can we do it ?

For example, we have a HTMLDocumentRule with few application fields, and custom metadata.

So for a custom HTML Document Checkin page, we want all fields as part of HTMLDocumentRule to be part of the checkin page.


Thanks,
Sunil
  • 1. Re: UCM Including profile rules in custom checkin page
    jiri.machotka Guru
    Currently Being Moderated
    Sunil,

    I am a bit confused what your intentions are: have you made a custom check-in page from the scratch? Or, have you re-used some pieces of the standard code and now you want to use profiles? If the latter I'd expect it should work OOTB for you, on condition that you the correct ones.

    I'd recommend you to check how standard check-in pages are made (you can analyse it down from service to form, and finally to includes) and then you can decide which pieces you will reuse, or how new code shall be constructed.
  • 2. Re: UCM Including profile rules in custom checkin page
    759279 Newbie
    Currently Being Moderated
    Hi Jiri,

    We have a custom check-in page. We basically want to make use of the profile rule features that UCM provides. Is there a way to do that ?

    Thanks,
    Sunil
  • 3. Re: UCM Including profile rules in custom checkin page
    759279 Newbie
    Currently Being Moderated
    <html>
    <head>
         <$defaultPageTitle="Bpel Checkin Form"$>
         <$include std_html_head_declarations$>
    </head>

    <$include body_def$>

    <$include std_page_begin$>

    <h4 class="pageTitle">Bpel Checkin Form</h4>

    <div style="text-align:left;padding:0 2em 0 2em;">
    <p>This is an example of an bpel checkin form.</p>

    </div>

    <form name="Checkin" method="post" enctype="multipart/form-data" action="<$HttpCgiPath$>">

    <!-- prefilled default values... you can place other default
    values here for metadata such as 'dDocType' and 'dSecurityGroup'
    to make specialized contribution paes -->
    <input type=hidden name="IdcService" value="STN_CHECKIN">
    <input type=hidden name="dpTriggerValue" value="HTML Document">
    <input type=hidden name="dpDisplayLabel" value="HTML Document">
    <input type=hidden name=idcToken value="<$ idcToken $>">
    <input type=hidden name="dDocAuthor" value="<$UserName$>">
    <input type=hidden name="dRevLabel" value="1">

    <!-- these two values turn on autonumbering, and set the prefix. Generate Content ID -->
    <input type=hidden name="IsAutoNumber" value="1">
    <input type=hidden name="AutoNumberPrefix" value="STN_">

    <!-- these two values do not need to be set here, because they are
    set in the first line of the service definition for 'STN_CHECKIN. -->
    <input type=hidden name="dDocAccount" value="">
    <input type=hidden name="dSecurityGroup" value="">


    <table>

    <tr>
         <td colspan=2><hr></td>
    </tr>

    <tr>
         <td>Title</td>
         <td><input type="text" name="dDocTitle" size=35     maxlength=30>
         </td>
    </tr>


    <!-- this loads up all the doc types, security groups, option lists,
    and custom metedata definitions. -->
    <$loadDocMetaDefinition()$>

    <!--WE WANT TO PUT IN METADATA FIELDS DEFINED IN A BPELDOCUMENT PROFILE RULE -->

    <tr>
         <td>Type</td>
         <td>
              <select name="dDocType">
                   <option>
                   <$loop DocTypes$>
                        <option value="<$dDocType$>"><$dDocType$> <$if DocTypes.dDescription$>- <$DocTypes.dDescription$><$endif$>
                   <$endloop$>
              </select>
         </td>
    </tr>

    <tr>
         <td>File</td>
         <td><input type="file" name="primaryFile" maxlength=250>
         </td>
    </tr>

    <tr>
         <td colspan=2><hr></td>
    </tr>

    <tr>
         <td align=center colspan=2>
         <input type=submit name=submit value=" Check In ">
         <input type=reset name=reset value=" Reset ">
         </td>
    </tr>

    </table>

    </form>

    <$include std_page_end$>

    </body>
    </html>
  • 4. Re: UCM Including profile rules in custom checkin page
    Bunty Journeyer
    Currently Being Moderated
    include the following in the head tag
    <$dpTriggerValue="<--your profile trigger-->"$>
    <$dpDisplayLabel="<--your display label-->"$>
    <$include std_checkin_html_head_declarations$>

    and for displaying the fields, include <$include std_document_checkin_fields$> at "<!--WE WANT TO PUT IN METADATA FIELDS DEFINED IN A BPELDOCUMENT PROFILE RULE -->"
  • 5. Re: UCM Including profile rules in custom checkin page
    jiri.machotka Guru
    Currently Being Moderated
    Nice post.
  • 6. Re: UCM Including profile rules in custom checkin page
    759279 Newbie
    Currently Being Moderated
    Thanks Bunty..

    I tried doing the same. We noticed all the standard document checkin fields getting enabled. Not the one defined in the profile.

    I am assuming the custom check-in page is not getting aware of the dpTriggerValue="HTML Document"

    Any ideas what we may be missing ?

    Thanks,
    Sunil

    -- THE PAGE NOW LOOKS LIKE THIS ---

    <html>
    <head>
         <$dpTriggerValue="HTML Document"$>
         <$dpDisplayLabel="HTML Document"$>
         <$defaultPageTitle="Bpel Checkin Form"$>
         <$include std_html_head_declarations$>
    </head>

    <$include body_def$>

    <$include std_page_begin$>

    <h4 class="pageTitle">Bpel Checkin Form</h4>

    <div style="text-align:left;padding:0 2em 0 2em;">
    <p>This is an example of an bpel checkin form.</p>

    </div>

    <form name="Checkin" method="post" enctype="multipart/form-data" action="<$HttpCgiPath$>">

    <!-- prefilled default values... you can place other default
    values here for metadata such as 'dDocType' and 'dSecurityGroup'
    to make specialized contribution paes -->
    <input type=hidden name="IdcService" value="STN_CHECKIN">
    <input type=hidden name="dpTriggerValue" value="HTML Document">
    <input type=hidden name="dpDisplayLabel" value="HTML Document">
    <input type=hidden name=idcToken value="<$ idcToken $>">
    <input type=hidden name="dDocAuthor" value="<$UserName$>">
    <input type=hidden name="dRevLabel" value="1">

    <!-- these two values turn on autonumbering, and set the prefix. Generate Content ID -->
    <input type=hidden name="IsAutoNumber" value="1">
    <input type=hidden name="AutoNumberPrefix" value="STN_">

    <!-- these two values do not need to be set here, because they are
    set in the first line of the service definition for 'STN_CHECKIN. -->
    <input type=hidden name="dDocAccount" value="">
    <input type=hidden name="dSecurityGroup" value="">


    <table>

    <tr>
         <td colspan=2><hr></td>
    </tr>

    <tr>
         <td>Title</td>
         <td><input type="text" name="dDocTitle" size=35     maxlength=30>
         </td>
    </tr>


    <!-- this loads up all the doc types, security groups, option lists,
    and custom metedata definitions. -->

    <!-- this loads profile attributes. -->
    <$include std_document_checkin_fields$>

    <tr>
         <td>Type</td>
         <td>
              <select name="dDocType">
                   <option>
                   <$loop DocTypes$>
                        <option value="<$dDocType$>"><$dDocType$> <$if DocTypes.dDescription$>- <$DocTypes.dDescription$><$endif$>
                   <$endloop$>
              </select>
         </td>
    </tr>

    <tr>
         <td>File</td>
         <td><input type="file" name="primaryFile" maxlength=250>
         </td>
    </tr>

    <tr>
         <td colspan=2><hr></td>
    </tr>

    <tr>
         <td align=center colspan=2>
         <input type=submit name=submit value=" Check In ">
         <input type=reset name=reset value=" Reset ">
         </td>
    </tr>

    </table>

    </form>

    <$include std_page_end$>

    </body>
    </html>

    Edited by: user9138987 on Dec 4, 2012 12:54 PM
  • 7. Re: UCM Including profile rules in custom checkin page
    759279 Newbie
    Currently Being Moderated
    Sorry my bad..

    <$include std_html_head_declarations$> had to replaced by <$include std_checkin_html_head_declarations$>
  • 8. Re: UCM Including profile rules in custom checkin page
    759279 Newbie
    Currently Being Moderated
    include the following in the head tag
    <$dpTriggerValue="<--your profile trigger-->"$>
    <$dpDisplayLabel="<--your display label-->"$>
    <$include std_checkin_html_head_declarations$>

    and for displaying the fields, include <$include std_document_checkin_fields$> at "<!--WE WANT TO PUT IN METADATA FIELDS DEFINED IN A BPELDOCUMENT PROFILE RULE -->"

    ----FROM BUNTY
  • 9. Re: UCM Including profile rules in custom checkin page
    759279 Newbie
    Currently Being Moderated
    I noticed one problem in using <$include std_document_checkin_fields$> . When I include this the content checkin is not taking place.

    My HTMLDocumentrule has a dDocName (Content ID) field but the field is rendered incorrectly in the custom checkin page.

    It shows as Content ID followed by Blank.

    I try to enter the dDocName behind the scene like this :

    input type="text" name="dDocName" size=35 maxlength=30
    value="">

    But i keep getting error on checkin ;

    Content item 'sfdsfdsfdsf' was not successfully checked in. The content item is no longer in the system.

    Any idea why this may be happening ?

    Edited by: user9138987 on Dec 4, 2012 4:43 PM
  • 10. Re: UCM Including profile rules in custom checkin page
    759279 Newbie
    Currently Being Moderated
    <html>
    <head>
    <$dpTriggerValue="HTML Document"$>
    <$dpDisplayLabel="HTML Document"$>
         <$defaultPageTitle="Bpel Checkin Form"$>
         <$include std_checkin_html_head_declarations$>
    </head>

    <$include checkin_body_def$>


    <$include std_page_begin$>


    <h4 class="pageTitle">Bpel Checkin Form</h4>

    <div style="text-align:left;padding:0 2em 0 2em;">
    <p>This is an example of an Bpel checkin form. </p>

    </div>

    <form name="Checkin" method="post" enctype="multipart/form-data" action="<$HttpCgiPath$>">

    <!-- prefilled default values... you can place other default
    values here for metadata such as 'dDocType' and 'dSecurityGroup'
    to make specialized contribution paes -->
    <input type=hidden name="IdcService" value="CHECKIN_NEW">
    <input type=hidden name=idcToken value="<$ idcToken $>">
    <input type=hidden name="IsAutoNumber" value="1">
    <input type=hidden name="AutoNumberPrefix" value="STN_">


    <table class="idcFormTable">

    <$include std_document_checkin_fields$>
    <tr>
    <td>Content ID</td>
    <td><input type="text" name="dDocName" size=35 maxlength=30
    value="STNVV">
    </td>

    <tr>
         <td align=center colspan=2>
         <input type=submit name=submit value="Check In ">
         <input type=reset name=reset value=" Reset ">
         </td>
    </tr>

    </table>

    </form>

    <$include std_page_end$>

    </body>
    </html>

    Edited by: user9138987 on Dec 4, 2012 4:42 PM

    Edited by: user9138987 on Dec 4, 2012 4:42 PM

    Edited by: user9138987 on Dec 4, 2012 4:43 PM
  • 11. Re: UCM Including profile rules in custom checkin page
    Bunty Journeyer
    Currently Being Moderated
    something to do with your profile. do a view source and check the values for dSecurityGroup, dDocTitle and dDocType.
    this should be the first line of your code...<$isNew="1", isCheckin="1"$>
    And AutoNumberPrefix doesn't work if you are passing dDocName.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points