Advertisement
aadddrr

service-flow-salesorder-custom

Apr 3rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 7.03 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <services-flow xmlns:xs="http://www.w3.org/2001/XMLSchema"
  3.     xmlns="http://www.jleaf.org/jleaf/service-flow" schemaLocation="http://www.jleaf.org/jleaf/service-flow service-flow-schema.xsd">
  4.    
  5.     <service name="submitSalesOrder" output="outputDtoForSubmitSalesOrder">
  6.         <informations>
  7.             <description>Submit sales order</description>
  8.             <info-in>
  9.                 <info name="result.header.userLoginId" description="user login id" type="Long" />
  10.                 <info name="result.header.roleLoginId" description="role login id" type="Long" />
  11.                 <info name="result.header.tenantLoginId" description="tenant login id" type="Long" />
  12.                 <info name="result.header.datetime" description="datetime" type="String" />
  13.                 <info name="result.header.sessionId" description="session id" type="String" />
  14.                 <info name="result.header.secureKey" description="secure key" type="String" />
  15.                 <info name="result.header.taskName" description="task name" type="String" />
  16.                 <info name="result.payload.id" description="sales order id" type="Long" />
  17.                 <info name="result.payload.version" description="version" type="Long" />
  18.                 <info name="result.payload.remark" description="remark" type="String" />
  19.             </info-in>
  20.             <info-out>
  21.                 <info name="result.id" type="Long" description="sales order id" />
  22.             </info-out>
  23.         </informations>
  24.         <mod-dto output="inputDtoForSubmitSalesOrder">
  25.             <key name="id" type="Long" from="${result.payload.id}" />
  26.             <key name="version" type="Long" from="${result.payload.version}" />
  27.             <key name="tenantLoginId" type="Long" from="${result.header.tenantLoginId}" />
  28.             <key name="userLoginId" type="Long" from="${result.header.userLoginId}" />
  29.             <key name="roleLoginId" type="Long" from="${result.header.roleLoginId}" />
  30.             <key name="datetime" type="String" from="${result.header.datetime}" />
  31.         </mod-dto>
  32.         <mod-dto output="inputDtoForFindSalesOrderById">
  33.             <key name="id" type="Long" from="${result.payload.id}" />
  34.         </mod-dto>
  35.         <mod-dto output="inputDtoForFindTotalSummarySalesOrder">
  36.             <key name="tenantId" type="Long" from="${result.header.tenantLoginId}" />
  37.             <key name="soId" type="Long" from="${result.payload.id}" />
  38.         </mod-dto>
  39.        
  40.         <mod-dto output="inputDtoForFindSalesOrderInfoForApproval">
  41.             <key name="sessionId" type="String" from="${result.header.sessionId}" />
  42.             <key name="userId" type="Long" from="${result.header.userLoginId}" />
  43.             <key name="roleId" type="Long" from="${result.header.roleLoginId}" />
  44.             <key name="tenantId" type="Long" from="${result.header.tenantLoginId}" />
  45.             <key name="datetime" type="String" from="${result.header.datetime}" />
  46.             <key name="soId" type="Long" from="${result.payload.id}" />
  47.             <key name="arCurrCode" type="String" from="IDR" />
  48.         </mod-dto>
  49.        
  50.         <call-bf name="findSalesOrderById" input="${inputDtoForFindSalesOrderById}" output="outputDtoForFindSalesOrderById">
  51.             <onsuccess />
  52.             <onerror />
  53.         </call-bf>
  54.        
  55.         <mod-dto output="inputDtoForGetNotYetPaidDueInvoiceAmountForSoApproval">
  56.             <key name="tenantId" type="Long" from="${outputDtoForFindSalesOrderById.tenantId}" />
  57.             <key name="ouId" type="Long" from="${outputDtoForFindSalesOrderById.ouId}" />
  58.             <key name="partnerId" type="Long" from="${outputDtoForFindSalesOrderById.partnerBillToId}" />
  59.         </mod-dto>
  60.        
  61.         <mod-dto output="inputDtoForGetRemainingCreditAmountForSoApproval">
  62.             <key name="tenantId" type="Long" from="${outputDtoForFindSalesOrderById.tenantId}" />
  63.             <key name="ouId" type="Long" from="${outputDtoForFindSalesOrderById.ouId}" />
  64.             <key name="partnerId" type="Long" from="${outputDtoForFindSalesOrderById.partnerBillToId}" />
  65.         </mod-dto>
  66.        
  67.         <approval ref="salesOrder" action="SUBMIT" />
  68.         <call-bt name="submitSalesOrder"
  69.             output="outputDtoForSubmitSalesOrder"
  70.             input="${inputDtoForSubmitSalesOrder}"
  71.             approval-ref="salesOrder">
  72.             <autonumber-ref />
  73.             <onsuccess />
  74.             <onerror />
  75.         </call-bt>
  76.     </service>
  77.    
  78.     <!-- This replace SalesOrderWorkflowAction -->
  79.     <service name="approveSalesOrder" output="outputDtoForApproveSalesOrder">
  80.         <informations>
  81.             <description>Approve sales order document</description>
  82.             <info-in>
  83.                 <info name="result.payload.id" type="Long" description="Sales order id" />
  84.                 <info name="result.payload.version" type="Long" description="Sales order version" />
  85.                 <info name="result.payload.remark" type="String" description="Workflow remark" />
  86.             </info-in>
  87.             <info-out />
  88.         </informations>
  89.         <mod-dto output="inputDtoForUpdateSalesOrderWorkflowStatus">
  90.             <key name="id" type="Long" from="${result.payload.id}" />
  91.             <key name="version" type="Long" from="${result.payload.version}" />
  92.  
  93.             <key name="tenantLoginId" type="Long" from="${result.header.tenantLoginId}" />
  94.             <key name="userLoginId" type="Long" from="${result.header.userLoginId}" />
  95.             <key name="roleLoginId" type="Long" from="${result.header.roleLoginId}" />
  96.             <key name="datetime" type="String" from="${result.header.datetime}" />
  97.         </mod-dto>
  98.         <mod-dto output="inputDtoForFindSalesOrderById">
  99.             <key name="id" type="Long" from="${result.payload.id}" />
  100.         </mod-dto>
  101.         <mod-dto output="inputDtoForFindTotalSummarySalesOrder">
  102.             <key name="tenantId" type="Long" from="${result.header.tenantLoginId}" />
  103.             <key name="soId" type="Long" from="${result.payload.id}" />
  104.         </mod-dto>
  105.        
  106.         <mod-dto output="inputDtoForFindSalesOrderInfoForApproval">
  107.             <key name="sessionId" type="String" from="${result.header.sessionId}" />
  108.             <key name="userId" type="Long" from="${result.header.userLoginId}" />
  109.             <key name="roleId" type="Long" from="${result.header.roleLoginId}" />
  110.             <key name="tenantId" type="Long" from="${result.header.tenantLoginId}" />
  111.             <key name="datetime" type="String" from="${result.header.datetime}" />
  112.             <key name="soId" type="Long" from="${result.payload.id}" />
  113.             <key name="arCurrCode" type="String" from="IDR" />
  114.         </mod-dto>
  115.        
  116.         <call-bf name="findSalesOrderById" input="${inputDtoForFindSalesOrderById}" output="outputDtoForFindSalesOrderById">
  117.             <onsuccess />
  118.             <onerror />
  119.         </call-bf>
  120.        
  121.         <mod-dto output="inputDtoForGetNotYetPaidDueInvoiceAmountForSoApproval">
  122.             <key name="tenantId" type="Long" from="${outputDtoForFindSalesOrderById.tenantId}" />
  123.             <key name="ouId" type="Long" from="${outputDtoForFindSalesOrderById.ouId}" />
  124.             <key name="partnerId" type="Long" from="${outputDtoForFindSalesOrderById.partnerBillToId}" />
  125.         </mod-dto>
  126.        
  127.         <mod-dto output="inputDtoForGetRemainingCreditAmountForSoApproval">
  128.             <key name="tenantId" type="Long" from="${outputDtoForFindSalesOrderById.tenantId}" />
  129.             <key name="ouId" type="Long" from="${outputDtoForFindSalesOrderById.ouId}" />
  130.             <key name="partnerId" type="Long" from="${outputDtoForFindSalesOrderById.partnerBillToId}" />
  131.         </mod-dto>
  132.        
  133.         <approval ref="salesOrder" action="APPROVE" />
  134.         <call-bt name="updateSalesOrderWorkflowStatus" output="outputDtoForApproveSalesOrder"
  135.             input="${inputDtoForUpdateSalesOrderWorkflowStatus}" approval-ref="salesOrder">
  136.             <autonumber-ref />
  137.             <onsuccess />
  138.             <onerror />
  139.         </call-bt>
  140.     </service>
  141.    
  142. </services-flow>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement