This code example consists of a stand-alone application that uses the Media
Interaction Layer (MIL) to submit interactions.
The application parses
a directory specified in the program arguments at startup. Each time the application finds a file
smaller than 50MB, it creates an interaction, attaches
the file, saves it in UCS (Universal Contact Server) and submits it to
Interaction Server.
.jars sdk_exmpl_ixn_java-media archive file containing the code
samples.OpenMediaSdk.properties
file. You can define these properties in the Configuration Layer..jar files in the compile.bat
and compile.sh files. Replace the
<path_to_MIL_Libraries> placeholder text with the appropriate path.go.bat and
go.sh files, set the location of your MIL .jar files.
Replace the <path_to_MIL_Libraries>
placeholder text with the appropriate path.StartMedia in the go.bat and
go.sh files. Or, to start the server in custom mode,
set the arguments for StartCustomMedia in the goCustom.bat and
goCustom.sh files.
Replace the <your_argument_list> placeholder text
with the following information:arg0 the name of the queue to which media interactions
are submitted.
arg1 the media type; possible values are defined in
the Configuration Layer as "Media Type" attribute values.
arg2 interaction_type; possible values are defined in
the Configuration Layer as "Interaction Type" attribute values.
arg3 interaction_subtype; possible values are defined
in the Configuration Layer as "Interaction Subtype" attribute values.
arg4 the source directory containing files to attach
to the new interactions. arg5 the directory to use for saving the files in case
the simple media server fails to manage Open Media interactions. RoutingWorkItem WorkItem Inbound
InboundNew ./source ./save WorkItem interactions of type Inbound, with a
subtype of InboundNew. RoutingWorkItem queue.
./source directory and then
deleted from that directory. In case an error occurs during the processing of
a file, that file is saved in the ./save directory.arg4.
External Service Property text box, specify the custom extension media.sdk.java.examples.SimpleCustomExtension and the method to call doProcessRequest.
go to launch the simple media server.goCustom to launch the simple media server in custom mode.