Blame view

applications/product/servicedef/services_facility.xml 73 KB
c16038356   Anchit Jindal   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
  <?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.
  -->
  
  <services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
      <description>Product Component Services</description>
      <vendor>OFBiz</vendor>
      <version>1.0</version>
  
      <!-- Permission Services -->
      <service name="facilityGenericPermission" engine="simple"
          location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="facilityGenericPermission">
          <implements service="permissionInterface"/>
      </service>
      <service name="checkProductFacilityRelatedPermission" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="checkProductFacilityRelatedPermission">
          <description>ProductFacility Permission Checking Logic</description>
          <implements service="permissionInterface"/>
      </service>
      <!-- Product Inventory Services -->
      <service name="createInventoryItem" default-entity-name="InventoryItem" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryItem" auth="true">
          <description>Create an InventoryItem</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="OUT" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true">
              <exclude field-name="availableToPromiseTotal"/>
              <exclude field-name="quantityOnHandTotal"/>
          </auto-attributes>
          <attribute name="isReturned" mode="IN" type="String" default-value="N" />
          <override name="inventoryItemTypeId" optional="false"/>
          <override name="productId" optional="false"/>
          <override name="facilityId" optional="false"/>
      </service>
      <service name="createInventoryItemCheckSetAtpQoh" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryItemCheckSetAtpQoh" auth="false">
          <description>
          </description>
          <attribute name="inventoryItemId" type="String" mode="IN" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="IN" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="IN" optional="true"/>
      </service>
  
      <service name="updateInventoryItem" default-entity-name="InventoryItem" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateInventoryItem" auth="true">
          <description>Update an InventoryItem</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true">
              <exclude field-name="availableToPromiseTotal"/>
              <exclude field-name="quantityOnHandTotal"/>
          </auto-attributes>
          <attribute name="oldOwnerPartyId" mode="OUT" optional="true" type="String"/>
          <attribute name="oldProductId" mode="OUT" optional="true" type="String"/>
          <attribute name="oldStatusId" mode="OUT" optional="true" type="String"/>
      </service>
      <service name="changeOwnerUponIssuance" engine="simple"  auth="true"
          location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="changeOwnerUponIssuance">
          <description>If product store setOwnerUponIssuance is Y or empty, set the inventory item owner upon issuance.</description>
          <attribute name="itemIssuanceId" type="String" mode="IN" optional="false"/>
      </service>
      <service name="createInventoryItemStatus" engine="simple" default-entity-name="InventoryItemStatus"
              location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryItemStatus">
          <description>Create an inventory item status record</description>
          <auto-attributes mode="IN" include="all" optional="true"/>
          <override name="inventoryItemId" optional="false"/>
          <override name="statusId" optional="false"/>
      </service>
  
      <service name="checkProductInventoryDiscontinuation" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="checkProductInventoryDiscontinuation" auth="false">
          <description>Check Product Inventory Discontinuation</description>
          <attribute name="productId" mode="IN" optional="false" type="String"/>
      </service>
      <service name="inventoryItemCheckSetDefaultValues" default-entity-name="InventoryItem" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="inventoryItemCheckSetDefaultValues" auth="false">
          <description>Check and, if empty, fills with default values ownerPartyId, currencyUomId, unitCost</description>
          <attribute name="inventoryItemId" type="String" mode="IN" optional="true"/>
          <attribute name="inventoryItem" type="Map" mode="IN" optional="true"/>
      </service>
      <service name="createInventoryItemDetail" default-entity-name="InventoryItemDetail" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryItemDetail" auth="true">
          <description>Create an createInventoryItemDetail - note that the quantityOnHand and availableToPromise are relative (positive or negative) and will be added to the corresponding value on the given InventoryItem</description>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true">
              <exclude field-name="effectiveDate"/>
          </auto-attributes>
          <override name="inventoryItemDetailSeqId" mode="OUT"/>
      </service>
      <service name="updateInventoryItemFromDetail" default-entity-name="InventoryItemDetail" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateInventoryItemFromDetail" auth="false">
          <description>
              Sums all availableToPromiseDiff and quantityOnHandDiff elements for the inventoryItemId and sets the availableToPromise and quantityOnHand fields on the corresponding InventoryItem.
              Meant to be run as an Entity ECA triggered on any modify operation on the InventoryItemDetail entity.
          </description>
          <attribute name="inventoryItemId" type="String" mode="IN" optional="false"/>
      </service>
      <service name="updateSerializedInventoryTotals" default-entity-name="InventoryItem" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateSerializedInventoryTotals" auth="false">
          <description>Sets the ATP/QOH totals for serialized inventory items</description>
          <attribute name="inventoryItemId" type="String" mode="IN" optional="false"/>
      </service>
  
      <service name="createInventoryItemVariance" default-entity-name="InventoryItemVariance" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryItemVariance" auth="true">
          <description>Create an InventoryItemVariance - note that the quantityOnHand and availableToPromise are relative and will be added to the corresponding value on the given InventoryItem</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="createPhysicalInventory" default-entity-name="PhysicalInventory" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createPhysicalInventory" auth="true">
          <description>Create an PhysicalInventory</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="OUT" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="createPhysicalInventoryAndVariance" engine="simple" auth="true" transaction-timeout="600"
              location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createPhysicalInventoryAndVariance">
          <description>Create a PhysicalInventory and an InventoryItemVariance</description>
          <auto-attributes entity-name="InventoryItemVariance" include="pk" mode="IN" optional="false"/>
          <auto-attributes entity-name="PhysicalInventory" include="nonpk" mode="IN" optional="true"/>
          <auto-attributes entity-name="InventoryItemVariance" include="nonpk" mode="IN" optional="true"/>
          <override name="physicalInventoryId" mode="OUT"/>
      </service>
  
      <service name="getMktgPackagesAvailable" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="getMktgPackagesAvailable" auth="false" use-transaction="false">
          <description>Get Marketing Packages Available From Components In Inventory</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="true"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
      </service>
      <service name="getProductInventoryAvailable" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="getProductInventoryAvailable" auth="false" use-transaction="false">
          <description>Get Inventory Availability for a Product</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
      </service>
      <service name="getInventoryAvailableByFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="getProductInventoryAvailable" auth="false" use-transaction="false">
          <description>Get Inventory Availability for a Product constrained by a facilityId</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="lotId" mode="IN" type="String" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
      </service>
      <service name="getInventoryAvailableByLocation" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="getProductInventoryAvailable" auth="false">
          <description>Get Inventory Availability for a Product constrained by a facility and location</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="locationSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
      </service>
      <service name="getInventoryAvailableByContainer" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="getProductInventoryAvailable" auth="false" use-transaction="false">
          <description>Get Inventory Availability for a Product constrained by a containerId</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="containerId" type="String" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
      </service>
      <service name="getInventoryAvailableByItem" engine="simple"
               location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="getProductInventoryAvailable" auth="false" use-transaction="false">
          <description>Get Inventory Availability for an InventoryItem</description>
          <attribute name="inventoryItemId" type="String" mode="IN" optional="false"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
      </service>
      <service name="getProductInventoryAvailableFromAssocProducts" engine="java"
               location="org.ofbiz.product.inventory.InventoryServices" invoke="getProductInventoryAvailableFromAssocProducts" auth="false" use-transaction="false">
          <description>
              Get Inventory Availability for a product based on List of associated products,
              usually marketing package components.
          </description>
          <attribute name="facilityId" type="String" mode="IN" optional="true"/>
          <attribute name="assocProducts" type="List" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
      </service>
      <service name="getProductInventoryAvailableBySupplier" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="getProductInventoryAvailable" auth="false" use-transaction="false">
          <description>Get Inventory Availability for a Product by a Supplier</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="partyId" type="String" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseTotal" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="useCache" type="Boolean" mode="IN" optional="true"/>
      </service>
      <service name="countProductInventoryOnHand" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="countProductInventoryOnHand" auth="true" use-transaction="false">
          <description>Count Inventory On Hand for a Product constrained by a facilityId at a given date.</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="inventoryCountDate" type="Timestamp" mode="IN" optional="false"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="true"/>
      </service>
      <service name="countProductInventoryShippedForSales" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="countProductInventoryShippedForSales" auth="true" use-transaction="false">
          <description>Count Inventory Shipped for Sales Orders for a Product constrained by a facilityId in a given date range.</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
          <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="quantityOnHandTotal" type="BigDecimal" mode="OUT" optional="true"/>
      </service>
      <service name="getProductInventorySummaryForItems" engine="java"
                  location="org.ofbiz.product.inventory.InventoryServices" invoke="getProductInventorySummaryForItems" auth="false" use-transaction="false">
          <description>Get ATP/QOH Availability for a list of OrderItems by summing over all facilities.  If the item is a MARKETING_PKG_AUTO/PICK, then put its quantity available from components
              in the mktgPkgATPMap and mktgPkgQOHMap.</description>
          <attribute name="orderItems" type="List" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="true"/>
          <attribute name="quantityOnHandMap" type="Map" mode="OUT" optional="false"/>
          <attribute name="availableToPromiseMap" type="Map" mode="OUT" optional="false"/>
          <attribute name="mktgPkgQOHMap" type="Map" mode="OUT" optional="false"/>
          <attribute name="mktgPkgATPMap" type="Map" mode="OUT" optional="false"/>
      </service>
      <service name="getProductInventoryAndFacilitySummary" engine="java"
                  location="org.ofbiz.product.inventory.InventoryServices" invoke="getProductInventoryAndFacilitySummary" auth="false" use-transaction="false">
          <description>Get ATP/QOH Availability for a list of OrderItems by summing over all facilities.  If the item is a MARKETING_PKG_AUTO/PICK, then put its quantity available from components
              in the mktgPkgATPMap and mktgPkgQOHMap.</description>
          <attribute name="checkTime" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="minimumStock" mode="IN" type="BigDecimal" optional="true"/>
          <attribute name="statusId" type="String" mode="IN" optional="true"/>
          <attribute name="totalQuantityOnHand" mode="OUT" type="BigDecimal" optional="true"/>
          <attribute name="totalAvailableToPromise" mode="OUT" type="BigDecimal" optional="true"/>
          <attribute name="quantityOnOrder" mode="OUT" type="BigDecimal" optional="true"/>
          <attribute name="offsetQOHQtyAvailable" mode="OUT" type="BigDecimal" optional="true"/>
          <attribute name="offsetATPQtyAvailable" mode="OUT" type="BigDecimal" optional="true"/>
          <attribute name="defaultPrice" mode="OUT" type="BigDecimal" optional="true"/>
          <attribute name="listPrice" mode="OUT" type="BigDecimal" optional="true"/>
          <attribute name="wholeSalePrice" mode="OUT" type="BigDecimal" optional="true"/>
          <attribute name="usageQuantity" mode="OUT" type="BigDecimal" optional="true"/>
      </service>
  
      <service name="checkInventoryAvailability" engine="java"
              location="org.ofbiz.product.inventory.InventoryServices" invoke="checkInventoryAvailability">
          <description>Batch service for checking and sending backorder notifications.  Will also set an autoCancelDate for sales orders to 30 days (hard coded)
              beyond the OISGIR's promisedDatetime, which is in turn set by reserveProductInventory service using ProductFacility.daysToShip or 30 days by default.</description>
          <!-- this service has no parameters IN or OUT -->
      </service>
  
      <service name="balanceInventoryItems" engine="simple" transaction-timeout="600"
              location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="balanceInventoryItems" auth="true">
          <description>Balance inventory items based on the new item specified which will have available inventory that back-order (negative ATP) reservations can be reassigned to.</description>
          <attribute name="inventoryItemId" type="String" mode="IN" optional="false"/>
          <attribute name="priorityOrderId" type="String" mode="IN" optional="true"/>
          <attribute name="priorityOrderItemSeqId" type="String" mode="IN" optional="true"/>
          <attribute name="noLongerOnBackOrderIdSet" type="Set" mode="OUT" optional="true"/>
      </service>
  
      <service name="reassignInventoryReservations" engine="simple" transaction-timeout="600"
              location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="reassignInventoryReservations" auth="true">
          <description>Balance inventory reservations for a given product/facility, considering all the reservations with promised date greater than fromDate.</description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="noLongerOnBackOrderIdSet" type="Set" mode="OUT" optional="true"/>
          <attribute name="priority" type="String" mode="IN"  optional="true"/>
      </service>
      <service name="balanceOrderItemsWithNegativeReservations" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="balanceOrderItemsWithNegativeReservations">
          <description>For each product with a negative reservation in the order, calls reassignInventoryReservations</description>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
      </service>
  
      <service name="reserveAnInventoryItem" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml" invoke="reserveAnInventoryItem" auth="true">
          <description></description>
          <attribute name="inventoryItemId" type="String" mode="INOUT" optional="false"/>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
          <attribute name="orderItemSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="shipGroupSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/>
          <attribute name="reservedDatetime" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="requireInventory" type="String" mode="IN" optional="false"/>
          <attribute name="serialNumber" type="String" mode="IN" optional="true"/>
          <attribute name="sequenceId" type="Long" mode="IN" optional="true"/>
          <attribute name="promisedDatetime" type="Timestamp" mode="IN" optional="false"/>
          <attribute name="priority" type="String" mode="IN" optional="true"/>
      </service>
  
      <service name="reserveProductInventory" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml" invoke="reserveProductInventory" auth="true">
          <description>Reserve Inventory for a Product.
              If requireInventory is Y the quantity not reserved is returned, if N then a negative
              availableToPromise will be used to track quantity ordered beyond what is in stock.
          </description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
          <attribute name="orderItemSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="shipGroupSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/>
          <attribute name="reservedDatetime" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="requireInventory" type="String" mode="IN" optional="false"/>
          <attribute name="reserveOrderEnumId" type="String" mode="IN" optional="false"/>
          <attribute name="sequenceId" type="Long" mode="IN" optional="true"/>
          <attribute name="lotId" mode="IN" type="String" optional="true" />
          <attribute name="priority" type="String" mode="IN" optional="true"/>
          <attribute name="quantityNotReserved" type="BigDecimal" mode="OUT" optional="false"/>
      </service>
      <service name="reserveProductInventoryByFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml" invoke="reserveProductInventory" auth="true">
          <description>Reserve Inventory for a Product By Facility
              If requireInventory is Y the quantity not reserved is returned, if N then a negative
              availableToPromise will be used to track quantity ordered beyond what is in stock.
          </description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
          <attribute name="orderItemSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="shipGroupSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/>
          <attribute name="reservedDatetime" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="requireInventory" type="String" mode="IN" optional="false"/>
          <attribute name="reserveOrderEnumId" type="String" mode="IN" optional="true"/>
          <attribute name="sequenceId" type="Long" mode="IN" optional="true"/>
          <attribute name="quantityNotReserved" type="BigDecimal" mode="OUT" optional="false"/>
          <attribute name="priority" type="String" mode="IN"  optional="true"/>
          <attribute name="lotId" type="String" mode="IN" optional="true" />
      </service>
      <service name="reserveProductInventoryByContainer" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml" invoke="reserveProductInventory" auth="true">
          <description>Reserve Inventory for a Product By Container
              If requireInventory is Y the quantity not reserved is returned, if N then a negative
              availableToPromise will be used to track quantity ordered beyond what is in stock.
          </description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="containerId" type="String" mode="IN" optional="false"/>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
          <attribute name="orderItemSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="shipGroupSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/>
          <attribute name="reservedDatetime" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="requireInventory" type="String" mode="IN" optional="false"/>
          <attribute name="reserveOrderEnumId" type="String" mode="IN" optional="true"/>
          <attribute name="sequenceId" type="Long" mode="IN" optional="true"/>
          <attribute name="quantityNotReserved" type="BigDecimal" mode="OUT" optional="false"/>
      </service>
      <service name="reserveOrderItemInventory" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml" invoke="reserveOrderItemInventory" auth="true">
          <description>Create OrderItemShipGrpInvRes or increment existing reserved quantity.</description>
          <auto-attributes mode="IN" entity-name="OrderItemShipGrpInvRes" include="pk" optional="false"/>
          <auto-attributes mode="IN" entity-name="OrderItemShipGrpInvRes" include="nonpk" optional="true">
              <exclude field-name="createdDatetime"/>
          </auto-attributes>
          <attribute name="priority" type="String" mode="IN"  optional="true"/>
          <override name="quantity" optional="false"/>
      </service>
      <service name="cancelOrderInventoryReservation" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml" invoke="cancelOrderInventoryReservation" auth="true">
          <description>
              Iterates through each OrderItemShipGrpInvRes on each OrderItem for the order
              with the given orderId and cancels the reservation by changing the status
              of the OrderItemShipGrpInvRes and incrementing the corresponding non-serialized
              inventoryItem's availableToPromise quantity, or setting the status of the
              corresponding serialized inventoryItem to available.
          </description>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
          <attribute name="orderItemSeqId" type="String" mode="IN" optional="true"/>
          <attribute name="shipGroupSeqId" type="String" mode="IN" optional="true"/>
      </service>
      <service name="cancelOrderItemInvResQty" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml" invoke="cancelOrderItemInvResQty" auth="true">
          <description>Cancel a specific quantity for an order item</description>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
          <attribute name="orderItemSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="shipGroupSeqId" type="String" mode="IN" optional="true"/>
          <attribute name="cancelQuantity" type="BigDecimal" mode="IN" optional="true"/>
      </service>
      <service name="cancelOrderItemShipGrpInvRes" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryReserveServices.xml" invoke="cancelOrderItemShipGrpInvRes" auth="true">
          <description>Cancels an inventory reservation</description>
          <auto-attributes entity-name="OrderItemShipGrpInvRes" include="pk" mode="IN" optional="false"/>
          <attribute name="cancelQuantity" type="BigDecimal" mode="IN" optional="true"/>
      </service>
  
      <service name="interfaceInventoryTransfer" engine="interface" location="" invoke="">
          <description>Inventory Transfer Interface</description>
          <attribute name="inventoryItemId" type="String" mode="IN" optional="false"/>
          <attribute name="statusId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="true"/>
          <attribute name="locationSeqId" type="String" mode="IN" optional="true"/>
          <attribute name="containerId" type="String" mode="IN" optional="true"/>
          <attribute name="facilityIdTo" type="String" mode="IN" optional="true"/>
          <attribute name="locationSeqIdTo" type="String" mode="IN" optional="true"/>
          <attribute name="containerIdTo" type="String" mode="IN" optional="true"/>
          <attribute name="itemIssuanceId" type="String" mode="IN" optional="true"/>
          <attribute name="sendDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="receiveDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="comments" type="String" mode="IN" optional="true"/>
      </service>
      <service name="createInventoryTransfer" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryTransfer" auth="true">
          <description>Create an inventory transfer.  Uses the prepareInventoryTransfer service; see comments there about transfer quantities and inventory items.</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <implements service="interfaceInventoryTransfer"/>
          <attribute name="xferQty" type="BigDecimal" mode="IN" optional="false"/>
          <attribute name="inventoryTransferId" type="String" mode="OUT" optional="false"/>
      </service>
      <service name="updateInventoryTransfer" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateInventoryTransfer" auth="true">
          <description>Update an inventory transfer record</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <implements service="interfaceInventoryTransfer"/>
          <attribute name="inventoryTransferId" type="String" mode="IN" optional="false"/>
      </service>
      <service name="prepareInventoryTransfer" engine="java"
              location="org.ofbiz.product.inventory.InventoryServices" invoke="prepareInventoryTransfer">
          <description>Prepares inventory item for transfer.  If the xferQty is less than quantityOnHandTotal of the inventory item, then the inventory
                  item is "split," and an new inventory item will be created with xferQty and used for the inventory transfer.</description> <attribute name="inventoryItemId" type="String" mode="INOUT" optional="false"/>
          <attribute name="xferQty" type="BigDecimal" mode="IN" optional="false"/>
      </service>
      <service name="completeInventoryTransfer" engine="java"
              location="org.ofbiz.product.inventory.InventoryServices" invoke="completeInventoryTransfer">
          <description>Completes the inventory transfer</description>
          <attribute name="inventoryTransferId" type="String" mode="IN" optional="false"/>
          <attribute name="receiveDate" type="Timestamp" mode="IN" optional="true"/>
      </service>
      <service name="cancelInventoryTransfer" engine="java"
              location="org.ofbiz.product.inventory.InventoryServices" invoke="cancelInventoryTransfer">
          <description>Cancel the inventory transfer</description>
          <attribute name="inventoryTransferId" type="String" mode="IN" optional="false"/>
      </service>
  
      <service name="createInventoryTransfersForProduct" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryTransfersForProduct" auth="true">
          <description>Create inventory transfers for the given product and quantity. Return the units not available for transfers.</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="containerId" type="String" mode="IN" optional="true"/>
          <attribute name="facilityIdTo" type="String" mode="IN" optional="false"/>
          <attribute name="sendDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/>
          <attribute name="reserveOrderEnumId" type="String" mode="IN" optional="true"/>
          <attribute name="quantityNotTransferred" type="BigDecimal" mode="OUT" optional="false"/>
      </service>
  
      <service name="issueImmediatelyFulfilledOrder" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryIssueServices.xml" invoke="issueImmediatelyFulfilledOrder" auth="false">
          <description>
              Issues the Inventory for an Order that was Immediately Fulfilled, like in a POS environment.
              Note that this skips the normal inventory reservation process, and the shipment process (no shipment is created).
          </description>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
      </service>
      <service name="issueImmediatelyFulfilledOrderItem" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryIssueServices.xml" invoke="issueImmediatelyFulfilledOrderItem" auth="false">
          <description>
              Issues the Inventory for an Order Item that was Immediately Fulfilled for more info see the issueImmediatelyFulfilledOrder service.
          </description>
          <attribute name="orderId" type="String" mode="IN" optional="false"/>
          <attribute name="orderItemSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="orderHeader" type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
          <attribute name="orderItem" type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
          <attribute name="productStore" type="org.ofbiz.entity.GenericValue" mode="IN" optional="true"/>
      </service>
  
      <service name="createProductFacility" default-entity-name="ProductFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createProductFacility" auth="true">
          <description>Create an ProductFacility</description>
          <permission-service service-name="checkProductFacilityRelatedPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="updateProductFacility" default-entity-name="ProductFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateProductFacility" auth="true">
          <description>Update an ProductFacility</description>
          <permission-service service-name="checkProductFacilityRelatedPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="deleteProductFacility" default-entity-name="ProductFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="deleteProductFacility" auth="true">
          <description>Delete an ProductFacility</description>
          <permission-service service-name="checkProductFacilityRelatedPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
  
      <service name="createProductFacilityLocation" default-entity-name="ProductFacilityLocation" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createProductFacilityLocation" auth="true">
          <description>Create an ProductFacilityLocation</description>
          <permission-service service-name="checkProductFacilityRelatedPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="updateProductFacilityLocation" default-entity-name="ProductFacilityLocation" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateProductFacilityLocation" auth="true">
          <description>Update an ProductFacilityLocation</description>
          <permission-service service-name="checkProductFacilityRelatedPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="deleteProductFacilityLocation" default-entity-name="ProductFacilityLocation" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="deleteProductFacilityLocation" auth="true">
          <description>Delete an ProductFacilityLocation</description>
          <permission-service service-name="checkProductFacilityRelatedPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
  
      <!-- Product Storage Services -->
      <service name="createFacility" default-entity-name="Facility" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="createFacility" auth="true">
          <description>Create a Facility</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="OUT" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
          <override name="facilityTypeId" optional="false"/>
          <override name="facilityName" optional="false"/>
          <override name="ownerPartyId" optional="false"/>
      </service>
      <service name="updateFacility" default-entity-name="Facility" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="updateFacility" auth="true">
          <description>Update a Facility</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="deleteFacility" default-entity-name="Facility" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="deleteFacility" auth="true">
          <description>Delete a Facility</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
  
      <!-- Facility Attribute -->
      <service name="createFacilityAttribute" engine="entity-auto" default-entity-name="FacilityAttribute" invoke="create" auth="true">
          <description>Create Facility Attribute</description>
          <auto-attributes mode="IN" entity-name="FacilityAttribute" include="pk" optional="false"/>
          <auto-attributes mode="IN" entity-name="FacilityAttribute" include="nonpk" optional="true"/>
      </service>
      <service name="updateFacilityAttribute" engine="entity-auto" default-entity-name="FacilityAttribute" invoke="update" auth="true">
          <description>Update Facility Attribute</description>
          <auto-attributes mode="IN" entity-name="FacilityAttribute" include="pk" optional="false"/>
          <auto-attributes mode="IN" entity-name="FacilityAttribute" include="nonpk" optional="true"/>
      </service>
      <service name="deleteFacilityAttribute" engine="entity-auto" default-entity-name="FacilityAttribute" invoke="delete" auth="true">
          <description>Delete Facility Attribute</description>
          <auto-attributes mode="IN" entity-name="FacilityAttribute" include="pk" optional="false"/>
      </service>
  
      <service name="createFacilityLocation" default-entity-name="FacilityLocation" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="createFacilityLocation" auth="true">
          <description>Create a Facility Location</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="locationSeqId" type="String" mode="OUT" optional="false"/>
      </service>
      <service name="updateFacilityLocation" default-entity-name="FacilityLocation" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="updateFacilityLocation" auth="true">
          <description>Update a Facility Location</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="deleteFacilityLocation" default-entity-name="FacilityLocation" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="deleteFacilityLocation" auth="true">
          <description>Delete a Facility Location</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
  
      <service name="createFacilityGroup" default-entity-name="FacilityGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="createFacilityGroup" auth="true">
          <description>Create a Facility Group</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="OUT" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
          <override name="facilityGroupName" optional="false"/>
          <override name="facilityGroupTypeId" optional="false"/>
      </service>
      <service name="updateFacilityGroup" default-entity-name="FacilityGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="updateFacilityGroup" auth="true">
          <description>Update a Facility Group</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="deleteFacilityGroup" default-entity-name="FacilityGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="deleteFacilityGroup" auth="true">
          <description>Delete a Facility Group</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
  
      <!-- Facility ContactMech services -->
      <service name="createFacilityContactMech" engine="simple" debug="true"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="createFacilityContactMech" auth="true">
          <description>Create a FacilityContactMech</description>
          <auto-attributes entity-name="ContactMech" include="nonpk" mode="IN" optional="true"/>
          <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
          <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
          <attribute name="contactMechId" type="String" mode="INOUT" optional="true"/>
      </service>
      <service name="updateFacilityContactMech" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="updateFacilityContactMech" auth="true">
          <description>Update a FacilityContactMech</description>
          <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
          <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
          <attribute name="contactMechTypeId" type="String" mode="IN" optional="false"/>
          <attribute name="infoString" type="String" mode="IN" optional="true"/>
          <attribute name="newContactMechId" type="String" mode="IN" optional="true"/>
      </service>
      <service name="deleteFacilityContactMech" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="deleteFacilityContactMech" auth="true">
          <description>Delete a FacilityContactMech</description>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="contactMechId" type="String" mode="IN" optional="false"/>
      </service>
      <service name="createFacilityPostalAddress" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="createFacilityPostalAddress" auth="true">
          <description>Create a Postal Address</description>
          <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
          <auto-attributes entity-name="PostalAddress" include="nonpk" mode="IN" optional="true"/>
          <attribute name="paymentMethodId" type="String" mode="IN" optional="true"/>
          <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
          <attribute name="contactMechId" type="String" mode="OUT" optional="false"/>
          <override name="address1" optional="false"/>
          <override name="city" optional="false"/>
          <override name="postalCode" optional="true"/>
      </service>
      <service name="updateFacilityPostalAddress" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="updateFacilityPostalAddress" auth="true">
          <description>Update a Postal Address</description>
          <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
          <auto-attributes entity-name="PostalAddress" include="nonpk" mode="IN" optional="true"/>
          <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
          <attribute name="directions" type="String" mode="IN" optional="true"/>
      </service>
      <service name="createFacilityTelecomNumber" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="createFacilityTelecomNumber" auth="true">
          <description>Create a Telecommunications Number</description>
          <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
          <auto-attributes entity-name="TelecomNumber" include="nonpk" mode="IN" optional="true"/>
          <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
          <attribute name="contactMechId" type="String" mode="OUT" optional="false"/>
      </service>
      <service name="updateFacilityTelecomNumber" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="updateFacilityTelecomNumber" auth="true">
          <description>Update a Telecommunications Number</description>
          <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
          <auto-attributes entity-name="TelecomNumber" include="nonpk" mode="IN" optional="true"/>
          <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
      </service>
      <service name="createFacilityEmailAddress" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="createFacilityEmailAddress" auth="true">
          <description>Create an Email Address</description>
          <auto-attributes entity-name="ContactMech" include="nonpk" mode="IN" optional="true"/>
          <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
          <attribute name="contactMechPurposeTypeId" type="String" mode="IN" optional="true"/>
          <attribute name="contactMechId" type="String" mode="INOUT" optional="true"/>
          <attribute name="emailAddress" type="String" mode="IN" optional="false"/>
      </service>
      <service name="updateFacilityEmailAddress" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="updateFacilityEmailAddress" auth="true">
          <description>Update an Email Address</description>
          <auto-attributes entity-name="FacilityContactMech" include="all" mode="IN" optional="true"/>
          <attribute name="contactMechId" type="String" mode="INOUT" optional="false"/>
          <attribute name="emailAddress" type="String" mode="IN" optional="false"/>
      </service>
  
      <service name="createFacilityContactMechPurpose" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="createFacilityContactMechPurpose">
          <description>Create a purpose for facility contact mech</description>
          <auto-attributes entity-name="FacilityContactMechPurpose" include="pk" mode="IN" optional="false">
              <exclude field-name="fromDate"/>
          </auto-attributes>
          <attribute name="fromDate" type="Timestamp" mode="OUT" optional="false"/>
      </service>
      <service name="deleteFacilityContactMechPurpose" engine="simple"
              location="component://product/script/org/ofbiz/product/storage/FacilityContactMechServices.xml" invoke="deleteFacilityContactMechPurpose">
          <description>Delete a purpose for facility contact mech</description>
          <auto-attributes entity-name="FacilityContactMechPurpose" include="pk" mode="IN" optional="false"/>
      </service>
  
  <!-- end cm -->
      <service name="addContactMechToFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="addContactMechToFacility" auth="true">
          <description>Add ContactMech To Facility</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="contactMechId" type="String" mode="IN" optional="false"/>
      </service>
      <service name="removeContactMechFromFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="removeContactMechFromFacility" auth="true">
          <description>Remove ContactMech From Facility</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="contactMechId" type="String" mode="IN" optional="false"/>
      </service>
  
      <service name="addFacilityToGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="addFacilityToGroup" auth="true">
          <description>Add Facility To FacilityGroup</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <attribute name="facilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
      </service>
      <service name="updateFacilityToGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="updateFacilityToGroup" auth="true">
          <description>Update Facility -> Group Member</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <attribute name="facilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
          <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
      </service>
      <service name="removeFacilityFromGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="removeFacilityFromGroup" auth="true">
          <description>Remove Facility From FacilityGroup</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <attribute name="facilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
      </service>
  
      <service name="addFacilityGroupToGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="addFacilityGroupToGroup" auth="true">
          <description>Add FacilityGroup To FacilityGroup</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <attribute name="facilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="parentFacilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
      </service>
      <service name="updateFacilityGroupToGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="updateFacilityGroupToGroup" auth="true">
          <description>Update FacilityGroup To FacilityGroup Rollup</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <attribute name="facilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="parentFacilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
          <attribute name="thruDate" type="Timestamp" mode="IN" optional="true"/>
          <attribute name="sequenceNum" type="Long" mode="IN" optional="true"/>
      </service>
      <service name="removeFacilityGroupFromGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="removeFacilityGroupFromGroup" auth="true">
          <description>Remove FacilityGroup From FacilityGroup</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <attribute name="facilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="parentFacilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="fromDate" type="Timestamp" mode="IN" optional="false"/>
      </service>
  
      <service name="addPartyToFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="addPartyToFacility" auth="true" default-entity-name="FacilityParty">
          <description>Create a FacilityParty record</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
          <override name="fromDate" optional="true"/>
      </service>
  
      <service name="addPartyToFacilityGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="addPartyToFacilityGroup" auth="true">
          <description>Add Party To FacilityGroup</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <attribute name="facilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="partyId" type="String" mode="IN" optional="false"/>
          <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
      </service>
  
      <service name="removePartyFromFacility" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="removePartyFromFacility" auth="true" default-entity-name="FacilityParty">
          <description>Remove Party From Facility</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
  
      <service name="removePartyFromFacilityGroup" engine="simple"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="removePartyFromFacilityGroup" auth="true">
          <description>Remove Party From FacilityGroup</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <attribute name="facilityGroupId" type="String" mode="IN" optional="false"/>
          <attribute name="partyId" type="String" mode="IN" optional="false"/>
          <attribute name="roleTypeId" type="String" mode="IN" optional="false"/>
      </service>
  
      <service name="createFacilityContent" engine="simple" default-entity-name="FacilityContent"
          location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="createFacilityContent" auth="true">
          <description>Create a Facility Content</description>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
          <override name="fromDate" optional="true"/>
      </service>
  
      <service name="deleteFacilityContent" engine="simple" default-entity-name="FacilityContent"
                  location="component://product/script/org/ofbiz/product/storage/StorageServices.xml" invoke="deleteFacilityContent" auth="true">
          <description>Delete Content From Facility</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
  
      <!-- Stock Move Services -->
      <service name="findStockMovesNeeded" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/StockMoveServices.xml" invoke="findStockMovesNeeded">
          <description>
              Find all Stock Moves that need to be done.
              This service differs from the inventory transfer services in that it does not require
              sufficient availableToPromise to move the stock, in fact it is generally triggered because
              some promised inventory is in a bulk location and needs to be moved to a pick location.
          </description>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="moveByOisgirInfoList" type="List" mode="OUT" optional="true"/>
          <attribute name="stockMoveHandled" type="Map" mode="OUT" optional="true"/>
          <attribute name="warningMessageList" type="List" mode="OUT" optional="true"/>
      </service>
      <service name="findStockMovesRecommended" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/StockMoveServices.xml" invoke="findStockMovesRecommended">
          <description>
              Find all Stock Moves that should be done based on minimum quantities on each Pick/Primary ProductFacilityLocation.
          </description>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="stockMoveHandled" type="Map" mode="IN" optional="true"/>
          <attribute name="moveByPflInfoList" type="List" mode="OUT" optional="true"/>
          <attribute name="warningMessageList" type="List" mode="OUT" optional="true"/>
      </service>
      <service name="processPhysicalStockMove" engine="simple"
              location="component://product/script/org/ofbiz/product/inventory/StockMoveServices.xml" invoke="processPhysicalStockMove">
          <description>
              Process a Physical Stock Move from one FacilityLocation to another, in the same Facility.
              This service will not only move quantities from one InventoryItem to another but it will
              also reassign any existing OrderItemShipGrpInvRes records to the new InventoryItem.
          </description>
          <attribute name="productId" type="String" mode="IN" optional="false"/>
          <attribute name="facilityId" type="String" mode="IN" optional="false"/>
          <attribute name="locationSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="targetLocationSeqId" type="String" mode="IN" optional="false"/>
          <attribute name="quantityMoved" type="BigDecimal" mode="IN" optional="false"/>
          <attribute name="warningMessageList" type="List" mode="INOUT" optional="true"/>
      </service>
      <!-- Inventory Label Services -->
      <service name="createInventoryItemLabelType" default-entity-name="InventoryItemLabelType" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryItemLabelType" auth="true">
          <description>Create an InventoryItemLabelType</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="updateInventoryItemLabelType" default-entity-name="InventoryItemLabelType" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateInventoryItemLabelType" auth="true">
          <description>Update an InventoryItemLabelType</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
      </service>
      <service name="deleteInventoryItemLabelType" default-entity-name="InventoryItemLabelType" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="deleteInventoryItemLabelType" auth="true">
          <description>Delete an InventoryItemLabelType</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
      <service name="createInventoryItemLabel" default-entity-name="InventoryItemLabel" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryItemLabel" auth="true">
          <description>Create an InventoryItemLabel</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
          <override name="inventoryItemLabelTypeId" optional="false"/>
      </service>
      <service name="updateInventoryItemLabel" default-entity-name="InventoryItemLabel" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateInventoryItemLabel" auth="true">
          <description>Update an InventoryItemLabel</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true">
              <exclude field-name="inventoryItemLabelTypeId"/>
          </auto-attributes>
      </service>
      <service name="deleteInventoryItemLabel" default-entity-name="InventoryItemLabel" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="deleteInventoryItemLabel" auth="true">
          <description>Delete an InventoryItemLabel</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
      <service name="createInventoryItemLabelAppl" default-entity-name="InventoryItemLabelAppl" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createInventoryItemLabelAppl" auth="true">
          <description>Create an InventoryItemLabelAppl</description>
          <permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
          <auto-attributes include="pk" mode="IN" optional="false">
              <exclude field-name="inventoryItemLabelTypeId"/> <!-- The type is automatically retrieved from the inventoryItemLabel -->
          </auto-attributes>
          <auto-attributes include="nonpk" mode="IN" optional="true"/>
          <override name="inventoryItemLabelId" optional="false"/>
      </service>
      <service name="updateInventoryItemLabelAppl" default-entity-name="InventoryItemLabelAppl" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="updateInventoryItemLabelAppl" auth="true">
          <description>Update an InventoryItemLabelAppl</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
          <auto-attributes include="nonpk" mode="IN" optional="true">
              <exclude field-name="inventoryItemId"/>
          </auto-attributes>
      </service>
      <service name="deleteInventoryItemLabelAppl" default-entity-name="InventoryItemLabelAppl" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="deleteInventoryItemLabelAppl" auth="true">
          <description>Delete an InventoryItemLabelAppl</description>
          <permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
          <auto-attributes include="pk" mode="IN" optional="false"/>
      </service>
      <service name="setOrderReservationPriority" engine="simple" invoke="setOrderReservationPriority"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml"  auth="true">
          <description>set order priority</description>
          <attribute name="priority" mode="IN" type="String" optional="true"/>
          <attribute name="orderId" mode="IN" type="String" optional="false"/>
      </service>
      <service name="findProductInventorylocations" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/StockMoveServices.xml" invoke="findProductInventorylocations">
         <description>Find Product's inventory locations from facility</description>
         <permission-service service-name="facilityGenericPermission" main-action="VIEW"/>
         <attribute name="facilityId" type="String" mode="IN" optional="false"/>
         <attribute name="productId" type="String" mode="IN" optional="false"/>
         <attribute name="LocationList" type="List" mode="OUT" optional="true"/>
      </service>
      <service name="setLastInventoryCount" engine="simple"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="setLastInventoryCount">
          <description>Service which run as EECA (on InventoryItemDetail entity) and updates lastInventoryCount for products available in facility in ProductFacility entity</description>
          <attribute name="inventoryItemId" mode="IN" type="String" optional="false"/>
      </service>
      <service name="createUpdateFacilityGeoPoint" engine="simple" default-entity-name="GeoPoint"
                  location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="createUpdateFacilityGeoPoint">
          <description>Create or update GeoPoint assigned to facility</description>
          <permission-service service-name="facilityGenericPermission" main-action="UPDATE"/>
          <attribute name="facilityId" mode="IN" type="String"/>
          <auto-attributes include="all" mode="IN" optional="true"/>
          <override name="dataSourceId" optional="false"/>
          <override name="latitude" optional="false"/>
          <override name="longitude" optional="false"/>
      </service>
  </services>