Using the Search data service
Use case
- Search for data within other processes
- Display results indicating where the search key was found in other processes
- one process used to search data in another process - in our example “search_process_CDN”

- one process where we look for data - in our example “add_new_clients”

Add data process example
Firstly, create a process where data will be added. Subsequently, the second process will be used to search for data in this initial process.
Search process example
Configure the “Search process” to search data in the first created process instances:1
Create process
Create a process using the Process Designer.
2
Displaying the results (optional)
Add a Task node within the process. Configure this node and add a business rule if you want to customize the display of results, e.g:
3
Configure the search node
Add a user task and configure a send event using a Kafka send action. Configure the following parameters:

Topic name
Topic name
The Kafka topic for the search service requests (defined at 
KAFKA_TOPIC_DATA_SEARCH_IN environment variable in your deployment).
Body message
Body message
- searchKey - represents the process key used to search data stored in a process
- value - the dynamic process key added on our input element that will store and send the data entered by a user to the front end

- states -
["STARTED", "FINISHED, ONHOLD" "..."]- depending if you want to filter process instances based on their status, if the parameter is ommited, the process will display all the statuses
Check the Understanding the Process Status Data section for more example of possible states.
Data to send
Data to send
- Data to send (key): Used for validating data sent from the frontend via an action (refer to User Task configuration section)
Advanced configuration (Headers)
Advanced configuration (Headers)
- Headers: Mandatory -
{"processInstanceId": ${processInstanceId}}
If you also use callbackActions, you will need to also add the following headers:
{"destinationId": "search_node", "callbacksForAction": "search_for_client"}Example (dummy values extracted from a process):

4
Performing the search
A custom microservice (a core extension) will receive this event and search the value in the Elasticsearch.
5
Receiving the response
It will respond to the engine via a Kafka topic (defined at 
KAFKA_TOPIC_DATA_SEARCH_OUT env variable in your deployment). Add the topic in the Node config of the User task where you previously added the Kafka Send Action.
Response
The response’s body message will look like this:If there is no result:

If there is a list of results:
NOTE: Up to 50 results will be received if
tooManyResults is true.
Developer
Search data setup guide
For deployment and service setup instructions


