What bindings are available to jexl in a Location Scheme expression?

I am trying to use slot information to generate the destination url for a file. But I can’t seem to do it. As far as I can figure out, it is because $sys.assemblyItem is null. Here’s the jexl, which works fine in the template binding, but not in the Location Scheme parameter expression:
“/products/” +
$user.psoSlotTools.getSlotContents($sys.assemblyItem,“mwProductReference”,$rx.string.stringToMap(“template=mwBlank_Snippet”)).get(0).node.getProperty(“productbaseurl”).String

  • ‘/index.html’

Maybe there’s a way to access template bindings from the Location Scheme parameter?

Any help would be appreciated.

P.S., I would be willing to write a Java extension if that is necessary.

You may need to rewrite the JEXL expression, you can get the template by $sys.template and actual item by $sys.item.
You can use $sys.item.getProperty to get the field value from the item directly.
$sys.assemblyItem is not available in location scheme generators.

April,

To answer the question in your subject, system binding variables are described in a topic in the Workbench Help and in an appendix in the Rhythmyx Implementation Guide. The description of each indicates whether it is used in Templates or Location Schemes or both. A variable used in the wrong context (for example, a Template variable like $sys.assemblyItem used in a Location Scheme) may be null or incomplete and thus not function correctly.

Can you explain the use case you want to implement?

RLJII

The use case is the following:

Publishing Content Item A with Template A1
Content Item A has a relationship to Content Item B.
There is a field in B called B.path

I need B.path to build the Location Scheme expression.