Hello,
How can I build a SearchQuery that filters Client Varibles?
Consider this:
<ProcessInstance>
<processUUID>
<value>XXXXXXXX--1.1</value>
</processUUID>
<instanceUUID>
<value>XXXXXXXX--1.1--278691</value>
</instanceUUID>
<rootInstanceUUID>
<value>XXXXXXXX--1.1--278691</value>
</rootInstanceUUID>
<nb>278691</nb>
<lastUpdate>1442324995913</lastUpdate>
<state>STARTED</state>
<endedDate>0</endedDate>
<startedBy>admin</startedBy>
<startedDate>1441187449615</startedDate>
<isArchived>false</isArchived>
<**clientVariables**>
<entry>
<string>MY_CUSTOM_FIELD</string>
<string>1507280132</string>
</entry>
.....
I would like to build a query, to be used on Bonita’s REST API:
=> bonita-server-rest/API/queryRuntimeAPI/searchByMaxResult
<SearchQueryBuilder>
<index class="org.ow2.bonita.search.index.ProcessInstanceIndex"/>
<query>
<org.ow2.bonita.search.Criterion>
<builder reference="../../.."/>
<fieldName>processDefUUID</fieldName>
<value>XXXXXXXX*</value>
</org.ow2.bonita.search.Criterion>
<string> AND </string>
<org.ow2.bonita.search.Criterion>
<builder reference="../../.."/>
<fieldName>MY_CUSTOM_FIELD</fieldName>
<value>1507280132</value>
</org.ow2.bonita.search.Criterion>
</query>
</SearchQueryBuilder>
How can I build a criterion element that filters that Client Variable named MY_CUSTOM_FIELD?
Thank you!
I’m using Bonita v5.9.1