Process indexing

We will present here a simple example of indexing a process.

Configuration

Indexing class

com.axemble.axvdocsearch.extensions.base.implementation.BaseVDPJProcessResourceIndexExtension

Required input parameters

Parameter Name Description
CONTEXT_LOGIN Login used to browse the data to be indexed
ORGANIZATION_NAME System name of the organization attached to the project
PROJECT_NAME System name of the project (Version 11 and later)
CATALOG_NAME System name of the application (From version 11 onwards, it will be called “process group” instead)
RESOURCE_DEFINITION_NAME Collection of the system names of the process versions to be indexed (separated by “|”)

Custom Tags « system »

Attribute Name Description Type
ID text
REFERENCE text
ORGANIZATIONNAME System name of the organization attached to the project text
PROJECTNAME System name of the project text
CATALOGNAME System name of the application text
RESOURCEDEFINITIONNAME System name of the process version text

Type mapping tables

Mapping of standard types

Type Process Type Java Types XtendedSearch Type java search result
Text java.lang.String text java.lang.String
Decimal Number java.lang.Float number java.lang.Float
Boolean java.lang.Boolean boolean java.lang.Boolean
Date java.util.Date date java.util.Date
Period
attachments IAttachment file CtlHyperLink
Organization< IOrganization text java.lang.String (only the name is indexed)
Localization ILocalization text java.lang.String (only name is indexed)
Group IGroup text java.lang.String (only name is indexed)
User IGroup text java.lang.String (only name is indexed)
Reservoir data IStorageResource text java.lang.String (only reference is indexed)
Process document IWorkflowInstance text java.lang.String (only reference is indexed)

Mapping of development types

Type Process Type Java Types XtendedSearch Type java search result
Integer number java.lang.Long number java.lang.Float (caution the display type is less precise than the source type)
Double number java.lang.Double number java.lang.Float (note that the display type is less precise than the source type)
External element ExternalElement text java.lang.String (only the name is indexed)
Blob byte[] text java.lang.String (only for FCKEditor fields)
Map
High precision number java.math.BigDecimal number java.lang.Float (warning the display type is less precise than the source type)

An example of a XML configuration

Let’s say a process “Expense report” integrating the fields (system names):

  • TravelDate
  • Amount
  • Comment
  • Customer (Person field)
  • Receipts (Attachments field)

Here is a possible XML configuration:

<index name="IndexNotesDeFrais" 
	label="LG_IndexNotesDeFrais" 
	controller="com.axemble.axvdocsearch.core.controllers.implementation.LuceneController" 
	extension="com.axemble.axvdocsearch.extensions.base.implementation.BaseVDPJProcessResourceIndexExtension" 
	indexStorePath="vdocsearch\IndexNotesDeFrais" 
	updateOnIndexedDocuments="true" 
	locales="fr" >
	
	<parameters>
		<parameter key="CONTEXT_LOGIN" value="sysadmin" />
		<parameter key="ORGANIZATION_NAME" value="DefaultOrganization" />
		<parameter key="PROJECT_NAME" value="DefaultProject" />
		<parameter key="CATALOG_NAME" value="Administratif" />
		<parameter key="RESOURCE_DEFINITION_NAME" value="NoteDeFrais_1.0" />
	</parameters>
	
	<customtag name="DateDeDeplacement" type="date" />
	<customtag name="Montant" type="number" />
	<customtag name="Commentaire" type="text" />
	<customtag name="Client" type="text" />
    <customtag name="Justificatifs" type="file" collection="true" />
</index>

Note on the “client” field:

  • Even if the client is a “person” field, we will use a text type;
  • Xtended Search only manages native types: text, number, date, boolean, file.
  • We must therefore ask ourselves the question: what type of data is “useful” in the field I am indexing?
  • If I index a user, I will really index his name and surname, so it is text.

Source : https://wiki.myvdoc.net/xwiki/bin/view/Dev+Floor/VDPJProcessResourceIndexExtension