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_TASK_ONE_COORDINATOR

AutoScript

start_agent_info
   AgentName = "AU_TASK_ONE_COORDINATOR"
   AgentDescr = "Assign Task to one Associate"
   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 "Define Task Assignment"
start_bpm_subactivity "Task"
 
    rec = __params[1]
    expr = strcat(rec,"=AU_TASK")
    call OnOpenForm_HideField("FINISHED_FLAG")
    call OpenFormTop("ptEdit","AU_TASK_E04.FM","WORK.AU_TASK",1,expr)
    
end_bpm_subactivity
end_bpm_activity

start_bpm_activity "Task Assignment"
start_bpm_subactivity "Task"
 
    rec = __params[1]
    expr = strcat(rec,"=AU_TASK")
    call OnOpenForm_HideField("FINISHED_FLAG")
    call OnOpenForm_DisableField("F_AU_USER_UNAME")
    call OnOpenForm_DisableField("F_AU_BUSINESS_TITLE")
    call OnOpenForm_DisableField("DESCR")
    call OnOpenForm_DisableField("EENDDATE")
    call OpenFormTop("ptEdit","AU_TASK_E04.FM","WORK.AU_TASK",1,expr)
    
end_bpm_subactivity
end_bpm_activity

start_bpm_activity "Examine Task"
start_bpm_subactivity "Task"
 
    rec = __params[1]
    expr = strcat(rec,"=AU_TASK")
    call OpenFormTop("ptEdit","AU_TASK_E04.FM","WORK.AU_TASK",1,expr)
    
end_bpm_subactivity
end_bpm_activity

start_action

     rec_id = __params[1]                         {....get input parameter (usualy the record id of starting form)}
     comm = LookUpId("AU_TASK",rec_id,"DESCR")
     bus_id = LookUpId("AU_TASK",rec_id,"AU_BUSINESS")     

     call bpm_setprocedureowner(__activation_user)                     {.....set the procedure owner}
     call bpm_setprocedurecomment(comm)                          {.....set the procedures comment}
     call bpm_setprocessbusiness(bus_id)

     call bpm_openatonce()                              
     callwait bpm_assign_job ( "Define Task Assignment" , __activation_user , "" , 0 , rec_id )
     uname = LookUpId("AU_TASK",rec_id,"AU_USER")
     uname = LookUpId("AU_USER",uname,"UNAME")
                                                
     for i = 1 to 100      {_b}
         callwait bpm_assign_job ( "Task Assignment" , uname , "" , 0 , rec_id )

         callwait bpm_assign_job ( "Examine Task" , __activation_user, "" , 0 , rec_id )
         uname = LookUpId("AU_TASK",rec_id,"AU_USER")
         uname = LookUpId("AU_USER",uname,"UNAME")
         flag = LookUpId("AU_TASK",rec_id,"FINISHED_FLAG")
         flag = val(flag)
         if (flag = 1) then {_b}
         i = 100
         endif                 {_b}                        
     next                    {_b}

end_action