I am creating several GPKs for use in my Runtime application. Some of these GPKs take an input that is a GPFeatureRecordSetLayer Class. When I create the object with a Geometry or with a FeatureSet, the GPK completes successfully, so I know it works. But when I create the object with a URI it fails. My application is offline, so my only options for URI seem to be to either use sublayers of dynamic layers I have created using a LocalMapService (e.g. http://127.0.0.1:50001/J4JMYd/arcgis/rest/services/worldmap/MapServer/4) or to use a local path to a feature layer (e.g. file:///D:/shapefiles/world-cities.shp). Both of these options cause the task to fail without giving me any additional information.
What is the proper way to use a GPFeatureRecordSetLayer with an offline URI value? Basically, how can I use an existing layer on my map as an input for the geoprocessing task?