cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Info*Engine Task to Determine Items Checked Out Status?

CJL
4-Participant
4-Participant

Info*Engine Task to Determine Items Checked Out Status?

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

1 REPLY 1
CJL
4-Participant
4-Participant
(To:CJL)

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=">


<%}%>

Top Tags