cancel
Showing results for 
Search instead for 
Did you mean: 

How to use DataCollectionService API

Former Member
0 Kudos

Hi Experts,

I am trying to do DataCollection using DataCollectionService API. I am using the following code snippet for doing it. However I am not able to do it. I did not find method to set operationRef,SfcRef,ResourceRef.etc. Please suggest me the direction.

   CreateParametricMeasure createParametricMeasure = new CreateParametricMeasure();

   createParametricMeasure.setActual("");

   createParametricMeasure.setMeasureGroup("");

   createParametricMeasure.setMeasureName("");

   createParametricMeasure.setDcParameterRef("");

   createParametricMeasure.setEditedUserRef("");

   List<CreateParametricMeasure> createParametricMeasureList = new ArrayList();

   createParametricMeasureList.add(createParametricMeasure);

  

   CreateParametricRequest createParametricRequest = new CreateParametricRequest();

   createParametricRequest.setParametricMeasureList(createParametricMeasureList);

   dataCollectionService.createParametricData(createParametricRequest);

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

tim_drury
Active Participant
0 Kudos

Refs are like GUIDs, you can't build them* - you must look them up with finder APIs or use Refs returned from other API calls.

What error are you getting?  Are there errors in the NW logs?

-tim

*if you're a long-time ME/VM user and see the resemblance between a Ref and the UNSUPPORTED Handle class, keep that to yourself. 

Former Member
0 Kudos

Hi Tim,

Thanks for reply,

I am doing it in an Activity Hook at POST_START hook point. From dto object I am getting the Ref using unspported handles , like OperationBOHandle etc.

now my concern is that how can I use the above API. sample code snippet would be helpful.

Thanks