| <?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-v2.xsd"> |
| <simple-method method-name="createAccount" short-description="create Account Group"> |
| <set field="parameters.roleTypeId" value="ACCOUNT"/> |
| <call-simple-method method-name="createPartyGroupRoleAndContactMechs" xml-resource="component://party/script/org/ofbiz/party/party/PartySimpleMethods.xml"/> |
| <field-to-result field="partyId"/> |
| <set field="ensurePartyRoleCtx.partyId" from-field="userLogin.partyId"/> |
| <set field="ensurePartyRoleCtx.roleTypeId" value="OWNER"/> |
| <call-service service-name="ensurePartyRole" in-map-name="ensurePartyRoleCtx"/> |
| <set field="partyRelationshipCtx.partyIdFrom" from-field="userLogin.partyId"/> |
| <set field="partyRelationshipCtx.partyIdTo" from-field="partyId"/> |
| <set field="partyRelationshipCtx.roleTypeIdFrom" value="OWNER"/> |
| <set field="partyRelationshipCtx.roleTypeIdTo" value="ACCOUNT"/> |
| <set field="partyRelationshipCtx.partyRelationshipTypeId" value="ACCOUNT"/> |
| <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipCtx"/> |
| </simple-method> |
| </simple-methods> |