Nearby locations
The Nearby locations process enables you to view important nearby places such as hospitals, schools, and so on that are supported by Google's Near Me service. You can also view the nearby cases and entities that are already in the application.
For example, if there is an application for school license, any reviewer can use this component to see if there are any bars or liquor stores in the nearby area and take the approval decision based on that. Also, for any investigation case for multiple events reported, the field investigators can use this component to check the event case in the nearby area.
Configuring Nearby locations
Use the Nearby locations process component in a case type as a step in any of the stages. You can configure the base location for searching nearby cases, entities, or places either with the current location, or using a property reference.
- Log in to Pega Government Platform as an administrator.
- In the header of your workspace, click the Switch Studio menu, and then click App Studio.
- In the navigation pane of App Studio, click Case types.
- From the Case types column, click a case type, or click the New button to create a new case type.
- In the Case life cycle section, click Stage, and then enter a name in the text box.
- Hover over process, and then click .
- Click the Select button.
- In the Location details section, in the Source list, select Current location to configure the current location as the base location for searching nearby cases, entities, or places.
- Alternatively, select By property reference, and then enter or select a property from the combo box.
- Select the Enable nearby result selection check box to select the nearby search results for further processing in the next steps or stages.
- In the Routing details area, select
an operator:
- To route the assignment to the current operator, click Current operator.
- To specify a user or operator to whom you want to route this assignment, click Specific user, and then, in the User field, select a user or enter a property in the work class that supplies a specific operator ID at run time.
- To route the assignment to a specific work queue, click Work queue, and then, in the Queue field, select a work queue name or enter a property in the work class that supplies a specific work queue at run time.
- Click Save.
- To show a list of selected nearby places, click the
Views tab, and then click Create new
view.
- In the Search box, enter Selected nearby places, and then click the Add to view icon.
- To show a list of selected nearby cases or entities,
Views tab, and then click Create new
view.
- In the Search box, enter Selected nearby cases and entities, and then click the Add to view icon.
- Click Submit.
Extending Nearby locations
Extend the Nearby locations component depending on the business use case and requirement.
Enabling a new case type for Nearby cases search
Enable a new case type to retrieve on search.
- Log in to Pega Government Platform as an administrator.
- In the header of your workspace, click the Switch Studio menu, and then click App Studio.
- In the navigation pane of App Studio, click Case types.
- From the Case types column, click a case type, or click the New button to create a new case type.
- In the Case life cycle section, click Stage, and then enter a name in the text box.
- Hover over process, and then click .
- Click the Select button.
- Expand Parameters and pass the property, which has the location to the process,
as a parameter.
Extending a new entity for nearby entity search
Add a new entity apart from the PGP-provided entities, as a part of nearby entity search, in the Nearby locations component.
For example, the AddressList property contains the addresses of a person. While saving the person details, the PersistEmbeddedPage activity (CL:PegaPS-Data-Entity-Person) runs which has the logic to save AddressList in PegaPS-Data-Address table.
- In the navigation panel of Dev Studio, click
- Click .
- Click the Records tab.
- Click Add record to add a new entity with Field Name /
Group as
Entity
. - Save as NearbyCasesList_Ext data transform and set pyClassName to new entity class when pyLabel is new entity.
- Save as FetchProximityEntity report definition (CL:PegaPS-Data-Entity-Facility) into New entity class and remove the Name property from columns.
- Create a new data page similar to D_FetchFacilityProximity and call the report definition created in the previous step.
- To show a different marker pin, on the map, for the new entity, save as SetEntityMarker data transform into the new entity class and set the MarkerImage property with any binary file.
- Save as SetNearbyAddressList_Ext activity, and load the data page created in step 7.
- Save as SetNearbyCasesEntitesResult_Ext data transform and append data page results to NearbyCasesEntities property.
Show new entity as one of the type in nearby cases and entities
Previous topic Verify document Next topic Evaluate