Multi-step reference with CommunityCommons Xpath

1
Hey all, I'm working with a java-action that requires a number of xpath retrieves. Generally I tend to use the CommunityCommons Xpath generator for this.  However, some of the retrieves require me to go through several levels of Xpath, like so: ProcessModule.ProcessElement/ProcessModule.ProcessConnector_ProcessElement_Parent/ProcessModule.ProcessConnector/ProcessModule.ProcessConnector_ProcessElement_Child/ Whereas it's easy to add a single reference to the CC Xpath, I'm having some trouble reproducing the above path.  Would anyone have a working example to share? 
asked
1 answers
2

Hi Christiaan,

You can use the following method:

public XPath<T> eq(Object... pathAndValue)

In your example this becomes something like the following:

XPath<ProcessElement> xpath = XPath.create(getContext(), ProcessElement.class);
xpath.eq(
  ProcessElement.MemberNames.ProcessConnector_ProcessElement_Parent,
  ProcessConnector.entityName,
  ProcessConnector.MemberNames.ProcessConnector_ProcessElement_Child,
  childGuid
);

 

answered