「persistence-model.xml」の「fr-workflow-send-submission」にリクエストパラメータを渡すにはどうすればよいですか?たとえば、次のようにフォームを開いた場合:
... / orbeon ..?myRequestParameter = myRequestParameterValue
そして、myRequestParameterを「oxf.fr.detail.send.success.uri..」に渡します。
私は次のことをしようとしました:
<xforms:model id="fr-persistence-model"....
....
<xxforms:variable name="parameters" value="xxforms:instance('fr-parameters- instance')" as="element()"/>
<xxforms:variable name="app" value="$parameters/app" as="xs:string"/>
<xxforms:variable name="form" value="$parameters/form" as="xs:string"/>
<xxforms:variable name="document" select="$parameters/document"/>
<xxforms:variable name="mode" select="$parameters/mode"/>
....
<xxforms:variable name="myVariable"/>
....
<xforms:action ev:event="xforms-model-construct-done" if="$app != '*' and $form != '*'">
....
<xforms:setvalue ref="$myVariable" value="xxforms:get-request-parameter('myRequestParameter')">
....
<xforms:submission id="fr-workflow-send-submission"
resource="{$workflow-success-uri}?myRequestParameter={$myVariable}"
relevant="{xxforms:property(string-join(('oxf.fr.detail.send.success.prune', $app, $form), '.'))}"
validate="false" method="{$workflow-success-method}"
serialization="{if ($workflow-success-method = 'get') then 'none' else 'application/xml'}"
ref="if (instance('fr-workflow-send-instance') != '') then instance('fr-workflow-send-instance') else xxforms:instance('fr-form-instance')"
replace="all"/>
....
変数「myVariable」は常に空です。
また、「xforms-model-construct-done」イベントに挿入を試みました:
....
<xxforms:variable name="parameters" value="xxforms:instance('fr-parameters- instance')" as="element()"/>
<xxforms:variable name="myVariable" select="$parameters/myRequestParameter"/>
....
//on xforms-model-construct-done
<xforms:action>
<xxforms:variable name="myRequestParameter-name" select="'myRequestParameter'"/>
<xxforms:variable name="myRequestParameter-value" select="xxforms:get-request-parameter($myRequestParameter-name)"/>
<xforms:insert context="instance('fr-parameters- instance')" origin="xxforms:element($myRequestParameter-name, $myRequestParameter-value)"/>
</xforms:action>
....
しかし、「myVariable」はまだ空です。