Topic
  • 5 replies
  • Latest Post - ‏2013-11-13T13:35:59Z by HanvandenHeuvel-Jibes
PoulomiGupta
PoulomiGupta
102 Posts

Pinned topic CheckOutEntry

‏2013-07-03T11:42:36Z |

Hi,

 

I tried to check out an item using below script but return of the Checkout operation is 'CHECKED_OUT_TO_RECAT_ALLOWING_COLLAB_AREA'

Any idea why I am getting this error?

{code}

var oColArea = getColAreaByName("DEF");

var ctg      = getCtgByName("ABC");

 

var oItem= ctg .getEntryByPrimaryKey("1234");

 

hmResult = oColArea.checkOutEntry(oItem,null,true);

 

out.writeln(hmResult);

{code}

 

Result :

{1234=CHECKED_OUT_TO_RECAT_ALLOWING_COLLAB_AREA}

 

  • PoulomiGupta
    PoulomiGupta
    102 Posts
    ACCEPTED ANSWER

    Re: CheckOutEntry

    ‏2013-07-05T11:48:09Z  
    • KaranBal
    • ‏2013-07-04T14:27:04Z

    Great, that is probably why you're getting the return code. Try just the code snippet on a different item to confirm.

    Anyway, if the item was checked out then there is no cause for concern and all seems fine. If you like, you may still open a PMR and ask for this return value and other possibly undocumented return values to be documented in the information center.

    Thanks Karan. :)

  • KaranBal
    KaranBal
    108 Posts

    Re: CheckOutEntry

    ‏2013-07-03T22:51:29Z  

    What you're getting is unexpected but this is not an error per se. If what you pasted is the code affecting the item checkout cycle, then the expected output for the checkOutEntry should be one of CHECKOUT_SUCCESSFUL, CHECKOUT_FAILED, ALREADY_CHECKED_OUT, ENTRY_LOCKED, and ATTRIBUTE_LOCKED and not CHECKED_OUT_TO_RECAT_ALLOWING_COLLAB_AREA.

    I have not seen this value before but reading it indicates that the operation went through fine and check out completed. You should try running the code snippet bu itself to check whether the item is actually checked out. Now if you can run it by itself, then that means something before this snippet is causing a problem or that you can ignore the hmResult and it is working fine.

    But if the code snippet does not check out the item and returns the same return code, then that's an issue. But what you have provided is not sufficient to diagnose why this is failing. Check the $TOP/logs/appsvr_ServerName/exception.log, default.log and svc.out for errors or helpful information.

    If you don't find any related information in the logs, the checkout code by itself is not working, and you still see the custom output for hmResult, then open a PMR. In such a case, my guess would be there is a script associated with the workflow step or the item which is causing it. But we don't have enough data for a definitive answer.

  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: CheckOutEntry

    ‏2013-07-04T10:04:24Z  
    • KaranBal
    • ‏2013-07-03T22:51:29Z

    What you're getting is unexpected but this is not an error per se. If what you pasted is the code affecting the item checkout cycle, then the expected output for the checkOutEntry should be one of CHECKOUT_SUCCESSFUL, CHECKOUT_FAILED, ALREADY_CHECKED_OUT, ENTRY_LOCKED, and ATTRIBUTE_LOCKED and not CHECKED_OUT_TO_RECAT_ALLOWING_COLLAB_AREA.

    I have not seen this value before but reading it indicates that the operation went through fine and check out completed. You should try running the code snippet bu itself to check whether the item is actually checked out. Now if you can run it by itself, then that means something before this snippet is causing a problem or that you can ignore the hmResult and it is working fine.

    But if the code snippet does not check out the item and returns the same return code, then that's an issue. But what you have provided is not sufficient to diagnose why this is failing. Check the $TOP/logs/appsvr_ServerName/exception.log, default.log and svc.out for errors or helpful information.

    If you don't find any related information in the logs, the checkout code by itself is not working, and you still see the custom output for hmResult, then open a PMR. In such a case, my guess would be there is a script associated with the workflow step or the item which is causing it. But we don't have enough data for a definitive answer.

    Thanks Karan,

     

    Actually the item is already checked out to different workflow.

  • KaranBal
    KaranBal
    108 Posts

    Re: CheckOutEntry

    ‏2013-07-04T14:27:04Z  

    Thanks Karan,

     

    Actually the item is already checked out to different workflow.

    Great, that is probably why you're getting the return code. Try just the code snippet on a different item to confirm.

    Anyway, if the item was checked out then there is no cause for concern and all seems fine. If you like, you may still open a PMR and ask for this return value and other possibly undocumented return values to be documented in the information center.

  • PoulomiGupta
    PoulomiGupta
    102 Posts

    Re: CheckOutEntry

    ‏2013-07-05T11:48:09Z  
    • KaranBal
    • ‏2013-07-04T14:27:04Z

    Great, that is probably why you're getting the return code. Try just the code snippet on a different item to confirm.

    Anyway, if the item was checked out then there is no cause for concern and all seems fine. If you like, you may still open a PMR and ask for this return value and other possibly undocumented return values to be documented in the information center.

    Thanks Karan. :)

  • HanvandenHeuvel-Jibes
    3 Posts

    Re: CheckOutEntry

    ‏2013-11-13T13:35:59Z  

    Hi PoulomiGupta,

     

    Just to get this fully right since I stumbled upon the same problem. 

    When checking out an entry (especially when the item is already checked out in a different workflow) there is one thing you need to think off. An item can only be checked out in 1 workflow that is allowing recategorization. That is why you get that return and not a real exception. The item is checked out in a workflow where you allow recategorization in a step and the workflow that you want to check out the item into has also a step that allows recategorization. 

    I was looking for an exception also, but it does not get thrown. It all sounds logical but is very problematic in our situation.

    regards,

    Han