I will tweet this question out for you but have you gotten any other calls to the API to work using java already?
Bob Aiello, Technical Editor CM Crossroads
I am using the JHSDK jar available in ths installation directory of CA to write a java program for an automation project.
I am using the below Java code to select the packages from ACEDEV13.06.00.00 from SW Development view and promoting it to next stage 'Integration Test(AIT)'.
Java Code:
JCaContext context = harvest.getContext();
boolean approve = context.setApprove("Approve"); //Exception @ this line is E0309000d: ERROR: Could not get Process.
boolean promote = context.setPromote("Promote");
//Setting the Approval
CaApprove jcaApprove = context.getApprove();
jcaApprove.setApprove(true);
jcaApprove.setDescription("Approved Desc");
jcaApprove.execute();
//Setting the Promote
JCaPromote jcaPromoteObj = context.getPromote();
System.out.println(" getToStateName "+jcaPromoteObj.getToStateName());
System.out.println(" getToStateObjId "+jcaPromoteObj.getToStateObjId());
jcaPromoteObj.execute();
Exception I get :
com.ca.harvest.jhsdk.hutils.JCaHarvestException: E03090027: ERROR: Could not get Approve Process from Context.
com.ca.harvest.jhsdk.hutils.JCaHarvestException: E03090010: ERROR: Could not get Promote Process from Context.
Do I need to set any mode to context or harvest object to make the Promote process to work. Kindly help me with this.