Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Check-in files using Java Web Services
JimD
Hi. Another question
Can we simulate the "check-in" process in Windows/Web client using the Java Web Services API? If yes - how? Thank you for your help.
Find more posts tagged with
Comments
sarahs
Here's my scenario:
Our graphic artists will check-out the files after finding them through searching. They'll put the assets back into MediaBin via a hot folder, but they will not be putting the assets back into the container they originated at. We would like to have a process to "automatically" check in the files for the artists.
I know there is a MediaBin defined meta-data item "CheckIn Time"; is this the only piece of information that should be changed to "CheckIn" an asset? How can we preserve the "CheckIn" author to be the artist and not the user that runs our job (since our job will not be triggered by the hot folder)?
msnider
Jim,
Yes, you can do this via the web service via a call to ReviseAsset.
A "check-in" is basically locking the asset and then revising it. To make life a bit easier, the web service will lock the asset if you don't do it before calling ReviseAsset. Do keep in mind that MediaBin will not allow general users to revise an asset that another user has locked (checked out)....only administrators can do that.
Mark
JimD
Well, thanks for the reply, but that does not solve our problem
reviseAsset_IndexExternal(uncPath,assetDest.getMID(),null, nullArray, 850,"Revised by MA job",true);
Does not work, because we are trying to do, actually, a different action (note: we can't use byte[] because our Java does allow buffers of that size and we don't know the UNC path because of the way it is configured):
PROBLEM: We have asset X in container 1 INSIDE the MediaBin. We have asset's X new version in container 2 ALSO INSIDE the MediaBin. We want make X (in container 2) a revision of X (in container 1) by moving it to a container 1, or doing something else.
ReviseAsset on WebServices does not work because it looks like it is designed for external sources.
How can we accoplish a solution to the PROBLEM?
Thank you.
msnider
For starters, you probably wouldn't want to use reviseAsset_IndexExternal but rather reviseAsset. Assets that are indexed externally come with their own set of restrictions that do not apply to regular assets that are fully inserted into MediaBin.
Unfortunately, the scenario you propose is not natively supported with MediaBin regardless of the API you are using...e.g. C++, COM, or Web Services. To insert or revise an asset, the source must always be a file external to MediaBin; you can't revise assets by simply moving them between containers.
As a simple test using the native Windows client, run your scenario by trying to move or copy an asset from one container to another container that has an asset with the same name. The options you are given are to rename or skip but no revise. Now try to drag a file from your desktop into a container that has an asset with the same name...now you do get a revise option.
To solve your problem, you will need to do multiple steps...you will need to retrieve asset X from container 2 to a UNC staging directory on the filesystem and then you will need to call reviseAsset_UNC using the retrieved file as the source and the id of container 1.
To avoid this type of workaround, you may want to look at your workflow and figure out why the revision of asset X is landing in container 2 instead of container 1 to begin with...i.e. why are you placing asset X in container 2 if you already know that it will be the revision of an asset in container 1?
Regards,
Mark