Enricherを使用するユースケースに取り組んでいます。エンリッチャへの入力ペイロードは、従業員リストを含む部門オブジェクトです。 エンリッチャは、格納されたprocを呼び出して部門名を取得します。これでEmployeeの各行をこの部門名で更新する必要があります。Enricherを使用して更新するレコードのリスト
これは、xml構成を使用して各従業員に部門名を割り当てることは可能ですか?
public class Department {
private String deptId;
private List<Employee> emp = new ArrayList<Employee>();
}
public class Employee {
private String EmpId;
private String EmpName;
private String EmpDeptName;
}
<int:enricher id="DeptEnricher"
input-channel="findDeptChannel"
output-channel="empChannel"
request-channel="deptEnrichChannel"
request-payload-expression="payload.deptId">
</int:enricher>
<int-jdbc:stored-proc-outbound-gateway
id="sp-get-dept"
data-source="dataSource"
request-channel="deptEnrichChannel"
is-function="false"
stored-procedure-name="PROC.XXX_GET_DEPT"
ignore-column-meta-data="true"
expect-single-result="true">
<int-jdbc:sql-parameter-definition name="V_DEPT_ID" direction="IN" />
<int-jdbc:sql-parameter-definition name="V_DEPT_NAME" direction="OUT"/>
<int-jdbc:parameter name="V_DEPT_ID" expression="payload" />
</int-jdbc:stored-proc-outbound-gateway>