トランジションでサービスを直接呼び出すことの違いを知りたい
<transition name="createExample">
<service-call name="org.moqui.example.ExampleServices.createExample" in-map="ec.web.parameters"
web-send-json-response="true"/>
<default-response type="none"/>
</transition>
のようなアクションタグ内でサービスを呼び出す
<transition name="createExample">
<actions>
<service-call name="org.moqui.example.ExampleServices.createExample" in-map="ec.web.parameters"
web-send-json-response="true"/>
<actions>
<default-response type="none"/>
</transition>
どちらの場合でも、Web パラメータはどのように処理されますか?
AngularJS を入力パラメーターとして使用して JSON で配列のマップを送信すると、両方のケースで異なる方法で解析されていました。
サービス呼び出しがアクション タグの内側または外側にある場合、パラメータは両方のケースで異なる方法で解析されていました。
Parameters in JSON
var parameters = { exampleId : ["example1","example2","example3"]};
ec.web.parameters for service-call in actions tag
exampleId : [example1, example2, example3]
ec.web.parameters for service-call outside actions tag
exampleId : [example1, example2, example3]
リスト内の要素には、アクション タグの外側にサービス用の余分なスペースが含まれます。
では、このように動作するはずですか?