0

I have referred to similar issue on Github (issue#18), but nothing there worked for me.

I am trying to use the following transition/service:

<transition name="storeContactInfo">
    <service-call name="mantle.party.ContactServices.store#PartyContactInfo" in-map="context" out-map="context" />
    <default-response url="." />
</transition>

The url parameter for the screen is workEffortId, but it gets stripped from the url once the transition is run.

I also tried, to no avail:

<transition name="storeContactInfo">
    <path-parameter name="workEffortId"/>
    <service-call name="mantle.party.ContactServices.store#PartyContactInfo" in-map="context" out-map="context" />
<default-response url="." >
    <parameter name="workEffortId" from="workEffortId" />
</default-response>
</transition>

And I also tried adding in the action tag, which I saw resolved the issue previously. But that didn't work either.

My other transitions for the screen work fine. Is there still an issue there, or am I doing something wrong?

I am using 1.5.1.


Update: I assume that the problem is with what I am doing and not the previous issue #18.

Following carefully through the maps and values passed through, it seems there is some significant complexity to understand - evolving through get#PartyContactInfo through to StupidUtilities.flattenNestedMap (creates a single Map with fields from the passed in Map and all nested Maps and removes entries with a null value from the Map) through to store#PartyContactInfo called in my transition which utilises a number of conditions passed through to drive PartyForms.xml#ContactInfo.

I have tried to pass the value through right from the first service call:

<set field="partyId" from="facility.ownerPartyId" />
<service-call name="mantle.party.ContactServices.get#PartyContactInfo" out-map="projectSiteContactInfo" in-map="[partyId:partyId, workEffortId:workEffortId, postalContactMechPurposeId:'PostalShippingDest', telecomContactMechPurposeId:'PhoneShippingDest', emailContactMechPurposeId:'EmailShippingDest']" />

... all the way through, but for some reason it's not coming out the other side.

Ronan Keane
  • 189
  • 8
  • Could you clarify this statement: "The url parameter for the screen is workEffortId, but it gets stripped from the url once the transition is run."? Are you saying there is a workEffortId parameter in the request but it doesn't get passed through in the response redirect? – David E. Jones Apr 23 '15 at 16:23
  • FYI the path-parameter element is not for declaring parameters of transition, use the screen.parameter or transition.parameter elements for that. The path-parameter tag tells it to look for extra elements in the request URL path and add them, in the order of the path-parameter tags if there is more than one, as named parameters using the path-parameter.@name values. See the Making Apps with Moqui book for more details and examples of usage (like in the REST-ish transitions in ExampleApp.xml). – David E. Jones Apr 23 '15 at 16:26

1 Answers1

0

The solution was to add a workEffortId field (hidden) in the /mantle-usl/template/party/PartyForms.xml#ContactInfo widget component that was called up in the container dialogue before the transition.

I could see once I added:

<parameter name="workEffortId" value="${workEffortId}" />

to the transition, that workEffort was indeed null, and thus must be getting stripped out somewhere.

Adding workEffortId to the ContactInfo form resolved the issue.

Ronan Keane
  • 189
  • 8