Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6
Procedure : AU_EXTCALLS

AutoScript

start_agent_info
   AgentName = "AU_EXTCALLS"
   AgentDescr = "External Calls"
   AgentLanguage = ""
   __timer_interval = 0 {....define (in seconds) the timer interval for the wake up}
   __delete_on_termination = 0 {....1=the agent frees itself when terminates its task}
end_agent_info

start_bpm_activity "Emergency Call"
start_bpm_subactivity "Form"
                        
    call OnOpenForm_DisableAllFields()
    call OnOpenForm_EnableField("UCOMM")
    
    rec = __params[1]
    expr = strcat(rec,"=AU_STEP")
    call OpenFormTop("ptEdit","AU_MAINT_E.FM","WORK.AU_STEP",1,expr)
    
end_bpm_subactivity
start_bpm_validation
    
    result = 1
    
end_bpm_validation
end_bpm_activity

start_action

     mode = __params[1]

     if (mode = "TELEDIA") then

         __au_process = 0                 {process doen not exist yet}
         user = GetUserName()

         start_sql "*" "KOSMOS"
         SELECT * FROM AU_GOOD
         WHERE (AU_GOOD = :G)
         end_sql                        
         q = QueryByName()
         call TExecute(q)

         __au_process = bpm_createprocess("AU_EXTCALLS","", user,1)
         comm = "External Call"
         call UpdateField("AU_PROCESS",__au_process,"COMM",comm,"ROLE_OWNER","TECHNICIAN","")

         comm = strcat(comm, " / ", crDate, " / ", crTime)
                                                                                        
         start_sql "*" "KOSMOS"
         INSERT INTO AU_STEP
         end_sql
         q1 = QueryByName()
         call TSetFld(q1,"REL_CODE","String","EXTERNAL_CALL")
         call TExecute(q1)
         call FreeEmbSQL(q1)
         step_id = SelectIdentity()

         call bpm_setstepcomment(comm)
{ call bpm_setstepgood(id)}
         call bpm_setstepid(step_id)
         call bpm_assign_job ( "Emergency Call" ,"" ,"TECHNICIAN" , 0, step_id )

         call FreeEmbSQL(q)

     endif

     return {....fsm must never reach end_action }

end_action