Hi derrickat ,
I will suggest you to use Gel and XOG read of that object by passing a temporary document location as shown below:
<NikuDataBus>
<Header action="read" externalSource="NIKU" objectType="customObjectInstance"
version="${ClarityVersion}">
<args name="documentLocation" value="${xogDocumentDir}"/>
</Header>
<CustomObjectInstanceQuery>
<Filter criteria="EQUALS" name="objectCode">z_fin_file_load</Filter>
<Filter criteria="EQUALS" name="instanceCode">${FinLoadDtlRow.code}</Filter>
</CustomObjectInstanceQuery>
</NikuDataBus>
By this you can xog out file to a teamporary location, however xog file and folder will be in raw form and you need to use sql to get folder 1 & 2 along with file name.
select
tpm.name
,tpm.code
,tpm.id
,tpm.z_aib_act_file
,cast(flv.id as char) file_version_id
,substring(cast(flv.id as char),2,3) path_one
,'00'+substring(cast(flv.id as char),1,1) path_two
,fl.name file_name
,fl.mime_type
from
odf_ca_z_fin_file_load tpm
left outer join CLB_DMS_FILES FL on FL.PARENT_FOLDER_ID = tpm.z_aib_act_file
left outer join CLB_DMS_VERSIONS FLV on FLV.FILE_ID = FL.ID
where
tpm.id = ${gel_objectInstanceId}
So file can be access by location as below:
${xogDocumentDir}/Files/${path1}/${path2}/${thisDocumentId}
Once you are able to access this file then you can rename and use that as you want.
Regards,
Prashank Singh