Example - Using Generic Input for an Orchestration

This example uses the Generic input format. The orchestration must be configured to accept this input format.

OrchestrationRequest req = new OrchestrationRequest(AIS_SERVER ,USER_NAME, PASSWORD,DEVICE_NAME);
 
orchRequest.setOrchestration("AddCBM");
        
//populate values to send from this instance, simple name value pairs hash map
HashMap<String,String> vals = new HashMap<String,String>();        
vals.setSerialNumber("02a0bd30-d883-11e4-b9d6-1681e6b88ec1");        
Date jDate = new Date();
vals.put("date",String.valueOf(jDate.getTime()));
SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss");
vals.put("time",sdf.format(jDate));
vals.put("temperature","201");
vals.put("description","Temp 201");        
 
try
{
 
    String response = orchRequest.executeOrchestrationRequest(values);
 
//consume response, you can deserialize it to a class generated by the AIS Class Generator  
}
catch(Exception e)
{
   //handle exceptions
}