Custom code to approve an asset
My client uses REST API to create asset and would like to automatically approve newly created asset/updated asset programatically.
I created a CSElemetn [OpenMarket/Xcelerate/Actions/ApproveAssets] and try to call this element on an Image_C asset. In the sites.log, it seems the CSElement has been invoked and did some task but it ends up with an exception:
[2021-07-20T15:23:53.908+08:00] [wcsites_server1] [ERROR] [] [oracle.wcsites.xcelerate] [tid: 24] [userId: <anonymous>] [ecid: c220bfd2-9e9a-4eae-b97d-9bfe55f80ba7-00028a40,0] [APP: sites] [partition-name: DOMAIN] [tenant-name: GLOBAL] [pagename=myscc/service/tools/C_approveAssets] Error: com.openmarket.xcelerate.commands.ApprovedAssetsDispatcher: ApproveAssets: com.openmarket.basic.interfaces.AssetException: Flush catalog failed; error: -3