Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Is there a way to reliably determine WTDocument's check out status from within a Info*Engine task? I see a couple of examples in this forum that are possibly pointing in the right direction. One uses CheckInOutTaskLogic.isCheckedOut:
if(CheckInOutTaskLogic.isCheckedOut(someobject)) {...
In a task I have the object reference but do not know how to get the object from the refernce to provide to the method.
There is also an examplewt.vc.wip.WorkInProgressHelper.isCheckedOut(parentPart) but also requires a (Workable) object.
Thanks in advance,
Chris
Issue was resolved using checkoutInfo.state attribute. If the item is checked out a query task returns two instances, one with checkoutInfo.state of "wrk" and another with a state of "c/o." If the object is not checked out its state is "c/i."
<%
String checkoutState = (String) getGroup("docResults").getAttributeValue(0, "checkoutInfo.state");
if (checkoutState.equals("c/i")) {
%>
<checkout objects=" webject=" here=">
<%}%>