Searching for custom attributes

You can create a process that searches the custom attributes you created.

  1. In Workbench, create an application named RCACustomAttributes.

  2. Add a new process named SearchCustomAttributes.

  3. 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

  4. Add a Set Value operation named Get Search Param and add the following mapping data:

    • Location: /process_data/@release

    • Expression: /process_data/customAttributeMap[@id=’release’]

  5. 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:

      • Index: 1 Type:STRING Value: /process_data/@release

    • 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:

      • Index: 1 Column Name: reviewed Element: id

    • Assign outDoc as the output variable.

  6. 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)

  7. Add DecisionPoint operation named Decision.

  8. 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

  9. Connect the Decision operation to Populate Result operation using a conditional path. Set the condition as follows:

    (/process_data/@nodeCount >= /process_data/@currentCount).

  10. Connect the Populate Result operation to the Decision operation.

  11. Save and deploy the application.

  12. In Livecycle Administration Console, navigate to Home > Services > Applications and Services > Service Management > and select the ReviewCommentingAndApprovalService.

  13. Select Whether To Use Custom Processes To Store/update/search Custom Attributes. checkbox.

  14. In the Process Which Stores Custom Attributes box, type RCACustomAttributes/SearchCustomAttributes.

  15. Save.

// Ethnio survey code removed