0
how to create a baseline from a workset using java pai
how to download a baseline using baseline name using java pai

Accepted Answer

Monday, July 03 2017, 05:20 AM - #Permalink
0
Srikanth,

I have sample code for you.


static void createBaseline(final DimensionsConnection connection)
{
BaselineDetails bline=new BaselineDetails(null, null);
bline.setAttribute(SystemAttributes.OBJECT_ID, "Esh_Baseline");
bline.setProductName("QLARIUS");
bline.setTypeName("BASELINE");
bline.setTemplateName("ALL_ITEMS_LATEST");
bline.setOwningPartSpecification("QLARIUS:QLARIUS.A;1");

try {
DimensionsResult result = connection.getObjectFactory().createBaseline(bline, 0);
System.out.println(result.getMessage());
getBaselineItem(connection);
}catch(Exception e)
{
e.printStackTrace();
}

}

static void getBaselineItem(final DimensionsConnection connection)
{
String cmd="DOWNLOAD /BASELINE=\"QLARIUS:ESH_BASELINE\" /USER_DIRECTORY=\"C:\\workarea\" /NOEXPAND /NOTOUCH /NOOVERWRITE";
connection.getObjectFactory().runCommand(cmd);
System.out.println("Download completed");

}


Thanks
Esh

Location [ View Larger Map ]

The reply is currently minimized Show
Responses (1)
  • Accepted Answer

    Thursday, July 06 2017, 12:47 PM - #Permalink
    0
    oh. super. i don't know that we can execute commands through java api. I was downloading all baslines then filter in java.
    Thanks
    The reply is currently minimized Show
Your Reply

Recent Tweets