Projects‎ > ‎

Zurich Applications 2.0


After Terraglyph went under, I went back to my old consulting client and got a full time job there. This time I concentrated on system architecture and java solutions. My two main projects were designing and implementing a distributed work brokering system for document printing and telephony workflow. The broker system used a producter/consumer model. The agents and printers would set themselves up as data handlers and work requests would be generated by the telephony system and/or database requesters. The broker would attempt to match up requests with handers based on capabilities and requirements. So the two systems coexisted in the broker. There's not much to look at it since it's all backend server stuff. The applications did provide web sites for configuration and control. The system was very complex and used hundreds of threads for two hundred plus users connected to the server at a time.

I also wrote several other systems. One was a scripting system used for communicating and screen scrapping old TN3270 terminals to access the mainframe.

    /**
     * Processes events from Genesys.
     *
     * @param   event   event to process
     */
    public void teleDispatchHandler(TeleEvent event)
    {
        try
        {
            PhoneEvent phone_event = new PhoneEvent(m_DN,event,m_User.getAgentID(),null); 
            
            if ( phone_event.m_Call_ID.equals("-1") == false )
            {
                String old_conn_id = m_Conn_ID;
                
                m_Call_ID = phone_event.m_Call_ID;
                m_Conn_ID = phone_event.m_Conn_ID;
                    
                if ( old_conn_id != null && old_conn_id.equals(m_Conn_ID) == false )
                {
                    if ( m_Conn_ID_History.contains(m_Conn_ID) == false )
                        m_Conn_ID_History.addElement(m_Conn_ID);
                    
                    // change to the original session only if we're active
                    if ( m_Active )
                    {
                        long existing_session_id = SessionManager.findSession(m_Conn_ID);
                        
                        if ( existing_session_id != -1 && m_Session_ID != existing_session_id )
                        {
                            SessionManager.removeCall(old_conn_id);
                            m_Session_ID = existing_session_id;
                            SessionManager.addCall(m_Session_ID,m_Conn_ID);
                        }
                        else
                        {
                            SessionManager.addCall(m_Session_ID,m_Conn_ID);
                            SessionManager.removeCall(old_conn_id);
                        }
                    }
                }
                if ( phone_event.m_Previous_Conn_ID != null &&
                     m_Conn_ID_History.contains(phone_event.m_Previous_Conn_ID) == false )
                    m_Conn_ID_History.addElement(phone_event.m_Previous_Conn_ID);
                    
                if ( m_Active == false )
                    activate(phone_event);
            }
            else if ( m_Active == false )
            {
                return;
            }
            else
            {
                phone_event.m_Call_ID = m_Call_ID;
                phone_event.m_Conn_ID = m_Conn_ID;    
            }
            
            m_Event_History.addElement(phone_event);
                
            if ( m_Dialer_Mode )
                processDialerEvent(phone_event);
                
            // activation events
            if ( phone_event.m_Event == TServer.EventDialing )
                onDialing(phone_event);
            else if ( phone_event.m_Event == TServer.EventRinging )
                onRinging(phone_event);
            else if ( phone_event.m_Event == TServer.EventEstablished )
                onEstablished(phone_event);
            
            // conference/transfer events
            else if ( phone_event.m_Event == TServer.EventRetrieved )
                onRetrieved(phone_event);
            else if ( phone_event.m_Event == TServer.EventPartyChanged )
                onPartyChanged(phone_event);      
            else if ( phone_event.m_Event == TServer.EventPartyAdded )
                onPartyAdded(phone_event);       
            else if ( phone_event.m_Event == TServer.EventPartyDeleted )
                onPartyDeleted(phone_event);
                
            // error events
            else if ( phone_event.m_Event == TServer.EventError )
                onError(phone_event);
            
            // deactivation events
            else if ( phone_event.m_Event == TServer.EventReleased )
                onReleased(phone_event);               
            else if ( phone_event.m_Event == TServer.EventAbandoned )
                onAbandoned(phone_event);           
            else if ( phone_event.m_Event == TServer.EventOnHook )
                onOnHook(phone_event);
            else
                sendEvent(phone_event);
        }
        catch (Exception e)
        {
            Diagnostics.processException(e);
        }
    }