Question & Answer
Question
How do I delete Custom File Layers from Sterling File Gateway?
Cause
User had created Custom File Layers in SFG for testing. And now wanted clean up the system by deleting test custom file layers.
Answer
This should be done through XAPI service running through Business Process.
****Consumer File Layers *****
API - manageFgConsumerFileLayerType
<process name="IBM_SFG_Consumer_CFL_XAPI">
<sequence name="Sequence Start">
<operation name="XAPI Service">
<participant name="XAPIService"/>
<output message="XAPIServiceTypeInputMessage">
<assign to="." from="*"></assign>
<assign to="api">manageFgConsumerFileLayerType</assign>
<assign to="split">/root/Input</assign>
<assign to="UserId">admin</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</process>
This BP requires an input xml. Prepare this xml by obtaining corresponding FG_C_FLR_TYPE.C_FLR_TYPE_KEY keys from database.
-- Here is SQL to query to obtain keys.
SELECT * FROM FG_C_FLR_TYPE
-- sample Input xml with keys C_CL1_GUID & C_CL2_GUID
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Input Operation="Delete" ConsumerFileLayerTypeKey="C_CL1_GUID"/>
<Input Operation="Delete" ConsumerFileLayerTypeKey="C_CL2_GUID"/>
</root>
****Producer File Layers *****
API - manageFgProducerFileLayerType
<process name="IBM_SFG_Producer_CFL_XAPI">
<sequence name="Sequence Start">
<operation name="XAPI Service">
<participant name="XAPIService"/>
<output message="XAPIServiceTypeInputMessage">
<assign to="." from="*"></assign>
<assign to="api">manageFgProducerFileLayerType</assign>
<assign to="split">/root/Input</assign>
<assign to="UserId">admin</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
</sequence>
</process>
This BP requires an input xml. Prepare this xml by obtaining corresponding FG_P_FLR_TYPE.P_FLR_TYPE_KEY keys from database.
-- Here is SQL to query for keys.
SELECT * FROM FG_P_FLR_TYPE;
-- sample Input xml with keys P_CL1_GUID & P_CL2_GUID
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Input Operation="Delete" ProducerFileLayerTypeKey="P_CL1_GUID"/>
<Input Operation="Delete" ProducerFileLayerTypeKey="P_CL2_GUID"/>
</root>
NOTE - input xml can point to multiple keys/entries.
Was this topic helpful?
Document Information
Modified date:
17 May 2022
UID
swg21697412