Sorry Michel I dont understand that clearly: I want to apply this scenario of retrieve action of the microflow but in java action: Retrieve list from database of entity called EGateFrontEnd.Service with the follwing x-path constraint:
Entity called --->EGateFrontEnd.Service
[RequestStatus=$ServiceDetailsSearchObject/RequestStatus] [SourceType=$ServiceDetailsSearchObject/SourceType] [EGateFrontEnd.ServiceCard/EGateFrontEnd.Card/EGateFrontEnd.CardCardType= $ServiceDetailsSearchObject/EGateBackEnd.ServiceDetailsSearchObject_CardType]
where $ServiceDetailsSearchObject is just a temporary object of entity used only for searching.
You can use the following snippet in any java action. If you use user entered value, use the retrieveXPathQueryEscaped to escape any user input.
List<imendixobject> result = Core.retrieveXPathQuery(this.getContext(), "//ModuleName.TypeName[yourconstraint]");
I used this code
List<imendixobject> result = Core.retrieveXPathQuery(this.getContext(), "//EGateFrontEnd.Service[RequestStatus="+ServiceDetailsSearchParam.getRequestStatus().getCaption()+"]"); but it raised this error : Object 'EGateFrontEnd.Service' doesn't contain member 'Submitted', exception occured on mapping the following query: SELECT EGateFrontEnd.Service.* FROM EGateFrontEnd.Service WHERE EGateFrontEnd.Service.RequestStatus = EGateFrontEnd.Service.Submitted
while I just want to add the string value (ServiceDetailsSearchParam.getRequestStatus().getCaption()) but I dont know how?