Starting the Tasks at Hand

start: aTask forProcess: aProcess 

"In this routine we mange the startup of the 5 processes. Error handling list is used to handle connect, session failures, and to capture generic processing failures. The response is always to disconnect and reconnect/process. The only way to halt a proce


[| work | 
    work := aTask new. 
    xyzGlobal global perform: aProcess with: work. 
    (HandlerList new) on: Object errorSignal handle: 
        [:ex | 
        xyzGlobal global contextList: ex initialContext. 
        work disconnect. 
        ex restart]; 
    on: work connectError handle: 
        [:ex | 
        work disconnect. 
        ex restart]; 
        on: work sessionError handle: 
            [:ex | 
            work disconnect. 
            ex restart]; 
    handleDo: [ 
        [work initialize. 
        work process] valueNowOrOnUnwindDo: 
            [work disconnect]]] forkAt: XyzGlobal global priority

Previous slide Next slide Back to first slide View graphic version

Notes: