blob: ff158b5d7f207430c7ca7c224a1702c78975c8ed [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
<simple-method method-name="createOagisMessageInfo" short-description="Create MessageInfo">
<make-value entity-name="OagisMessageInfo" value-field="newEntity"/>
<set-pk-fields map="parameters" value-field="newEntity"/>
<!-- make sure it doesn't already exist: motivation: if it already exists we'll get a HUGE error message on the create with the whole XML file in it if debug is on for that, so we want a smaller error message -->
<find-by-primary-key map="newEntity" value-field="currentOagisMessageInfo"/>
<if-not-empty field="currentOagisMessageInfo">
<add-error>
<fail-property resource="OagisUiLabels" property="OagisMessageAlreadyReceived"/>
</add-error>
<check-errors/>
</if-not-empty>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
<create-value value-field="newEntity"/>
<!--if-compare value="1" field-name="newEntity.confirmation" operator="equals" type="Integer">
<set-service-fields to-map="oagisMessageErrorInfoMap" service-name="createOagisMessageErrorInfo" map="parameters"/>
<call-service service-name="createOagisMessageErrorInfo" in-map-name="oagisMessageErrorInfoMap"/>
</if-compare-->
</simple-method>
<simple-method method-name="updateOagisMessageInfo" short-description="Update Oagis MessageInfo">
<entity-one entity-name="OagisMessageInfo" value-field="lookedUpValue"/>
<set-nonpk-fields value-field="lookedUpValue" map="parameters"/>
<store-value value-field="lookedUpValue"/>
</simple-method>
<simple-method method-name="createOagisMessageErrorInfo" short-description="Create MessageErrorInfo">
<make-value entity-name="OagisMessageErrorInfo" value-field="newEntity"/>
<set-pk-fields map="parameters" value-field="newEntity"/>
<make-next-seq-id value-field="newEntity" seq-field-name="errorSeqId"/>
<set-nonpk-fields map="parameters" value-field="newEntity"/>
<create-value value-field="newEntity"/>
</simple-method>
<simple-method method-name="updateOagisMessageErrorInfo" short-description="Update Oagis MessageErrorInfo">
<entity-one entity-name="OagisMessageErrorInfo" value-field="lookedUpValue"/>
<set-nonpk-fields value-field="lookedUpValue" map="parameters"/>
<store-value value-field="lookedUpValue"/>
</simple-method>
<simple-method method-name="createOagisMsgErrInfosFromErrMapList" short-description="Create MessageErrorInfo From Error Map List">
<set field="createOagisMsgErrCtx.logicalId" from-field="parameters.logicalId"/>
<set field="createOagisMsgErrCtx.component" from-field="parameters.component"/>
<set field="createOagisMsgErrCtx.task" from-field="parameters.task"/>
<set field="createOagisMsgErrCtx.referenceId" from-field="parameters.referenceId"/>
<if-not-empty field="parameters.errorMapList">
<iterate list="parameters.errorMapList" entry="errorMap">
<set field="createOagisMsgErrCtx.description" from-field="errorMap.description"/>
<set field="createOagisMsgErrCtx.reasonCode" from-field="errorMap.reasonCode"/>
<call-service service-name="createOagisMessageErrorInfo" in-map-name="createOagisMsgErrCtx"/>
</iterate>
<else>
<call-service service-name="createOagisMessageErrorInfo" in-map-name="createOagisMsgErrCtx"/>
</else>
</if-not-empty>
</simple-method>
</simple-methods>