Searching for custom attributes
       
       
       
       
       
       
       
 
       
        
         You can create a process that searches the custom attributes
you created.
        
        
         - 
          
           In Workbench, create an application named RCACustomAttributes.
           
- 
          
           Add a new process named SearchCustomAttributes.
           
- 
          
           Create the following variables:
            
            
             
              
               | 
                 Name
                 | 
                 Type
                 | 
                 Input/Output
                 |  
               | 
                 customAttributesMap
                 | 
                 map of String
                 | 
                 Input
                 |  
               | 
                 listOfReviewIDs
                 | 
                 list of string
                 | 
                 Output
                 |  
               | 
                 outDocXML
                 | 
                 CustomAttributeTO
                 |  |  
               | 
                 outDoc
                 | 
                 document
                 |  |  
               | 
                 nodeCount
                 | 
                 int
                 |  |  
               | 
                 currentCount
                 | 
                 int
                 |  |  
 
 
- 
          
           Add a Set Value operation named Get Search Param and add
the following mapping data:
           
- 
          
           Add a Query For Multiple Rows As XML (JDBC service) operation.
Complete the following steps to search for relevant reviews in the
table.
           
           - 
            
             For the Datasource name property, select the
appropriate data source from the list.
             
- 
            
             Click the ellipsis button for the SQL Statement property.
             
- 
            
             In the SQL Info Editor dialog box, in the SQL Statement box
write, type
             
              select reviewId from ReviewRelease where release = ?
             
             .
             
- 
            
             Select the Use Parameterized Query check box.
             
- 
            
             Add the following data set:
             
- 
            
             Click OK to close the SQL Info Editor dialog box.
             
- 
            
             Click the ellipsis box for the XML Information property.
             
- 
            
             In the XML Document Info Editor dialog box, in the Root Element
Name box, type result.
             
- 
            
             In the Repeating Element Name box, type reviewId.
             
- 
            
             Select the Escape Illegal Characters check box.
             
- 
            
             Add the following data set:
             
- 
            
             Assign outDoc as the output variable.
             
 
- 
          
           Add a Set Value operation named Parse Result. Add the following
mappings:
            
            
             
              
               | 
                 Location
                 | 
                 Expression
                 |  
               | 
                 /process_data/outDocXML
                 | 
                 /process_data/@outDoc
                 |  
               | 
                 /process_data/@nodeCount
                 | 
                 count(/process_data/outDocXML/result//id)
                 |  
 
 
- 
          
           Add DecisionPoint operation named Decision.
           
- 
          
           Add a Set Value operation named Populate Result. Add the
following mappings:
            
            
             
              
               | 
                 Location
                 | 
                 Expression
                 |  
               | 
                 /process_data/listOfReviewIDs[/process_data/@currentCount]
                 | 
                 /process_data/outDocXML/result/reviewId[/process_data/@currentCount
+ 0]/id/text()
                 |  
               | 
                 /process_data/@currentCount
                 | 
                 /process_data/@currentCount + 1
                 |  
 
 
- 
          
           Connect the Decision operation to Populate Result operation
using a conditional path. Set the condition as follows:
           
           (/process_data/@nodeCount
>= /process_data/@currentCount).
           
- 
          
           Connect the Populate Result operation to the Decision operation.
           
- 
          
           Save and deploy the application.
           
- 
          
           In Livecycle Administration Console, navigate to Home >
Services > Applications and Services > Service Management
> and select the ReviewCommentingAndApprovalService.
           
- 
          
           Select Whether To Use Custom Processes To Store/update/search
Custom Attributes. checkbox.
           
- 
          
           In the Process Which Stores Custom Attributes box, type RCACustomAttributes/SearchCustomAttributes.
           
- 
          
           Save.