|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Creates and manages MILInteraction objects submitted to Interaction Server.
This interface includes asynchronous methods to perform requests on interactions submitted to Interaction Server.
To get a MILInteractionManager instance, call the MILFactory.getInteractionManager()
method, as shown in the following code snippet.
MILInteractionManager isManager =
milFactory.getInteractionManager();
Use this interface to create a new interaction, by calling
createInteraction().
Then, set interaction properties using a MILISInteractionParameters instance as shown here:
// Creating a new inbound interaction
MILInteraction milInteraction =
isManager.createInteraction("Inbound", "InboundNew","thirdPartyMedia");
MILISInteractionParameters milISParam =
milInteraction.getISParameters();
//Setting a property
milISParam.setProperty("data_name", "data_value");
If you wish to save interaction properties in UCS, get and fill in
a MILUCSInteractionParameters object, as shown in the following code snippet:
MILUCSInteractionParameters milUCSParam =
milInteraction.getUCSParameters();
//Setting a property
milUCSParam.setProperty("data_name", "data_value");
When calling the MILUCSManager.saveInteraction()
method, only UCS interaction parameters are stored in UCS.
Submit the interaction to Interaction Server by calling the
asyncSubmit()
or submit() method.
Note: Only Interaction Server interaction parameters are submitted
with the interaction to Interaction Server.
After a successful submission, use the changeProperties()
method to change the Interaction Server interaction properties.
isManager.submit(milInteraction);
//Adding a new property "new_data_name"
HashMap added = new HashMap();
added.put("new_data_name", "new_data_value");
//Removing "data_name"
HashMap removed = new HashMap();
removed.put("data_name", "data_value");
//Submitting the changes
isManager.changeProperties(milInteraction.getID(),added,null,removed);
To stop processing the interaction, call the stopProcessing() method, as shown here.
//Creating a reason for stopping
//REASON_CODE = 0
MILStopProcessingReason stopReason = MILStopProcessingReason.createAbandoned(REASON_CODE);
isManager.stopProcessing(milInteraction.getID(),stopReason);
| Method Summary | |
MILSynchronizer |
asyncChangeProperties(java.lang.String interactionId,
java.util.Map changedProperties,
java.util.Map removedProperties)
Changes interaction properties without waiting for the operation result. |
MILSynchronizer |
asyncChangeProperties(java.lang.String interactionId,
java.util.Map addedProperties,
java.util.Map changedProperties,
java.util.Map removedProperties)
Deprecated. use asyncChangeProperties(String,java.util.Map,java.util.Map) instead |
MILSynchronizer |
asyncStopProcessing(java.lang.String id,
MILStopProcessingReason reason)
Stops the specified MILInteraction and returns without waiting for the operation result. |
MILSynchronizer |
asyncSubmit(MILInteraction interaction)
Submits the specified MILInteraction and returns without waiting until the operation is done. |
void |
changeProperties(java.lang.String interactionId,
java.util.Map changedProperties,
java.util.Map removedProperties)
Changes the Interaction Server interaction properties of a submitted interaction and waits for the operation result. |
void |
changeProperties(java.lang.String interactionId,
java.util.Map addedProperties,
java.util.Map changedProperties,
java.util.Map removedProperties)
Deprecated. use changeProperties(String,java.util.Map,java.util.Map) instead |
MILInteraction |
createInteraction(java.lang.String type,
java.lang.String subtype,
java.lang.String mediatype)
Creates a new MILInteraction and initializes it with the values specified as arguments. |
void |
stopProcessing(java.lang.String id,
MILStopProcessingReason reason)
Stops processing the interaction and waits for the operation result. |
void |
submit(MILInteraction interaction)
Submits the specified MILInteraction and waits for the operation result. |
| Method Detail |
public MILInteraction createInteraction(java.lang.String type,
java.lang.String subtype,
java.lang.String mediatype)
MILInteraction and initializes it with the values specified as arguments.
These parameters are mandatory for submitting the interaction to Interaction Server.
If any parameter is null, submitting this interaction fails.
type - interaction type.subtype - interaction subtype.mediatype - media type.
submit(com.genesyslab.omsdk.mil.MILInteraction)
public void submit(MILInteraction interaction)
throws MILRequestFailedException
MILInteraction and waits for the operation result.
interaction - interaction to submit.
MILRequestFailedException - Exception thrown
if mandatory interaction parameters are null or invalid,
or if the interaction’s ID already exits.
public void stopProcessing(java.lang.String id,
MILStopProcessingReason reason)
throws MILRequestFailedException
id - ID of the interaction to be stopped.reason - reason for stopping processing.
MILRequestFailedException - Exception thrown if the request fails.
public void changeProperties(java.lang.String interactionId,
java.util.Map addedProperties,
java.util.Map changedProperties,
java.util.Map removedProperties)
throws MILRequestFailedException
changeProperties(String,java.util.Map,java.util.Map) instead
interactionId - ID of the interaction whose properties should be changed.addedProperties - properties to be added.changedProperties - properties to be changed.removedProperties - properties to be deleted (values are ignored).
MILRequestFailedException - exception thrown if the request fails prior to sending
due to invalid parameters, or if Interaction Server rejects modifications to read-only
properties such as TenantId or SubmittedBy.
Note: For an error in read-only properties, the entire request is rejected and no properties are changed.
public void changeProperties(java.lang.String interactionId,
java.util.Map changedProperties,
java.util.Map removedProperties)
throws MILRequestFailedException
interactionId - ID of the interaction whose properties should be changed.changedProperties - properties to be changed.removedProperties - properties to be deleted (values are ignored).
MILRequestFailedException - exception thrown if the request fails prior to sending
due to invalid parameters, or if Interaction Server rejects modifications to read-only
properties such as TenantId or SubmittedBy.
Note: For an error in read-only properties, the entire request is rejected and no properties are changed.
public MILSynchronizer asyncSubmit(MILInteraction interaction)
throws MILRequestFailedException
MILInteraction and returns without waiting until the operation is done.
Use the returned MILSynchronizer to wait for the operation result.
interaction - interaction to submit.
MILRequestFailedException - exception thrown if the request fails.
public MILSynchronizer asyncStopProcessing(java.lang.String id,
MILStopProcessingReason reason)
throws MILRequestFailedException
MILInteraction and returns without waiting for the operation result.
Note: Use the returned MILSynchronizer to wait for the operation result.
id - ID of the interaction to be stopped.reason - reason for stopping processing.
MILRequestFailedException - exception thrown if the request fails.
public MILSynchronizer asyncChangeProperties(java.lang.String interactionId,
java.util.Map addedProperties,
java.util.Map changedProperties,
java.util.Map removedProperties)
throws MILRequestFailedException
asyncChangeProperties(String,java.util.Map,java.util.Map) instead
Use the returned MILSynchronizer to wait for the operation result.
interactionId - ID of the interaction whose properties should be changed.addedProperties - properties to be added.changedProperties - properties to be changed.removedProperties - properties to be deleted (values are ignored).
MILRequestFailedException - exception thrown if the request fails.
public MILSynchronizer asyncChangeProperties(java.lang.String interactionId,
java.util.Map changedProperties,
java.util.Map removedProperties)
throws MILRequestFailedException
Use the returned MILSynchronizer to wait for the operation result.
interactionId - ID of the interaction whose properties should be changed.changedProperties - properties to be changed.removedProperties - properties to be deleted (values are ignored).
MILRequestFailedException - exception thrown if the request fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||