0
Hello,

Am trying to get the current state of ItemRevision. In the api list i see only getAllStates.
I have retrieved the Item by providing the required filters as below

Filter filter = new Filter();
Project project = connection.getObjectFactory().getProject("EDS_BARS:_WORK_MAIN");
filter.criteria().add(
new Filter.Criterion(SystemAttributes.OBJECT_ID, "0A574", Filter.Criterion.EQUALS));
filter.criteria().add(
new Filter.Criterion(SystemAttributes.VARIANT, "A", Filter.Criterion.EQUALS));
filter.criteria().add(
new Filter.Criterion(SystemAttributes.TYPE_NAME, "TST_ITEM", Filter.Criterion.EQUALS));
filter.criteria().add(
new Filter.Criterion(SystemAttributes.REVISION, "1", Filter.Criterion.EQUALS));
List relObjs = project.getChildItems(filter);
DimensionsRelatedObject relObj = (DimensionsRelatedObject) relObjs.get(0);
ItemRevision ir = (ItemRevision) relObj.getObject();
Responses (1)
  • Accepted Answer

    Wednesday, September 28 2016, 02:43 AM - #Permalink
    0
    Hello,

    I queried for the attribute Status and now am able to get the status of the ItemRevision.
    int attrNums = SystemAttributes.STATUS;
    ir.queryAttribute(attrNums);
    System.out.println("STATUS : "+ ir.getAttribute(SystemAttributes.STATUS));
    The reply is currently minimized Show
Your Reply

Recent Tweets