We have a Service-Rest, which should return list of cases according to the criteria. One of the fields we should return is caseURI which should return the relative path to launch the case. (Example: “/{case-types}/C-1234”"). How do we dynamically return the CaseURI (specifically case type part) when we have around 20 Case Types. Should we maintain a decision table and manually enter the semantic urls. Or is there an automatic way to return Semantic links to Cases
pyRoutingTable rule is the engine that maps case types to their semantic links.
Please check this post for additional details Deep linking and Semantic URL
Specifically for the case type name part, we need to open the routing table instance from the DB and parse the JSON using Java code to fetch the route that is specific to your case type class. If you look at the below example, this is one of the routes present in the routing table. We can also create a Java function with input as case class and an output that returns the route and reuse it wherever needed.
“hardware-request/{workID}”: {
“routeKey”: “openWorkByHandle”,
“payload”: {
“caseID”: “Gogo-Gogoroad-Work {workID}”,
“caseName”: “hardware-request”,
“caseClassName”: “Gogo-Gogoroad-Work-HardwareRequest”,
“page”: “pyDetails”,
“workID”: “{workID}”
}
}