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_SALES_SCENARIO

AutoScript

start_agent_info
   AgentName = "AU_SALES_SCENARIO"
   AgentDescr = "Sale Scenarios"
   PR_FNAME = "AU_SALES_PREDICT_SCENARIO_E.FM"
   PR_TNAME = "AU_SALES_PREDICT_SCENARIO"
   AgentLanguage = ""
   __timer_interval =   {....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 "New Sales Scenario"
start_bpm_subactivity "Process Form"
    
    rec = __params[1]
    expr = strcat(rec,"=AU_SALES_PREDICT_SCENARIO")
    call OpenFormTop("ptEdit","AU_SALES_PREDICT_SCENARIO_E.FM","WORK.AU_SALES_PREDICT_SCENARIO",1,expr)
    
end_bpm_subactivity
end_bpm_activity

start_bpm_activity "Define Sales Quatities"
start_bpm_subactivity "Process Form"
    
    rec = __params[1]
    expr = strcat(rec,"=AU_SALES_PREDICT_SCENARIO")
    call OpenFormTop("ptEdit","AU_SALES_PREDICT_SCENARIO_E.FM","WORK.AU_SALES_PREDICT_SCENARIO",1,expr)
    
end_bpm_subactivity
end_bpm_activity

start_bpm_activity "Define Sales Quantities"
start_bpm_subactivity "Process Form"
    
    rec = __params[1]
    expr = strcat(rec,"=AU_SALES_PREDICT_SCENARIO")
    call OpenFormTop("ptEdit","AU_SALES_PREDICT_SCENARIO_E.FM","WORK.AU_SALES_PREDICT_SCENARIO",1,expr)
    
end_bpm_subactivity
end_bpm_activity

start_bpm_activity "Material Requirements"
start_bpm_subactivity "Process Form"
    
    rec = __params[1]
    expr = strcat(rec,"=AU_SALES_PREDICT_SCENARIO")
    call OpenFormTop("ptEdit","AU_SALES_PREDICT_SCENARIO_E.FM","WORK.AU_SALES_PREDICT_SCENARIO",1,expr)
    
end_bpm_subactivity
start_bpm_subactivity "Materials Requirements"
                                                
    rec = __params[1]
    call OpenFormTop("ptBrowse","AU_GOOD_REQ_B.FM","QRY.DATA","SCEN_MODE",rec)
    
end_bpm_subactivity
start_bpm_subactivity "Materials Costing"
                                                
    rec = __params[1]
    call OpenFormTop("ptBrowse","AU_GOOD_REQ_B.FM","QRY.DATA","SCEN_MODE",rec)
    
end_bpm_subactivity
end_bpm_activity

start_bpm_activity "Production Costing"
start_bpm_subactivity "Process Form"
    
    rec = __params[1]
    expr = strcat(rec,"=AU_SALES_PREDICT_SCENARIO")
    call OpenFormTop("ptEdit","AU_SALES_PREDICT_SCENARIO_E.FM","WORK.AU_SALES_PREDICT_SCENARIO",1,expr)
    
end_bpm_subactivity
start_bpm_subactivity "Machinery, Labor and Material Costing"
    
    rec = __params[1]
    expr = strcat(rec,"=AU_SALES_PREDICT_SCENARIO")
    call OpenFormTop("ptEdit","AU_SALES_PREDICT_SCENARIO_E.FM","WORK.AU_SALES_PREDICT_SCENARIO",1,expr)
    
end_bpm_subactivity
end_bpm_activity

start_bpm_activity "Labor Requirements"
start_bpm_subactivity "Process Form"
    
    rec = __params[1]
    expr = strcat(rec,"=AU_SALES_PREDICT_SCENARIO")
    call OpenFormTop("ptEdit","AU_SALES_PREDICT_SCENARIO_E.FM","WORK.AU_SALES_PREDICT_SCENARIO",1,expr)
    
end_bpm_subactivity
start_bpm_subactivity "Labor Requirements"
                                                
    rec = __params[1]
    call OpenFormTop("ptBrowse","AU_JOB_TYPE_REQ_B.FM","QRY.DATA","SCEN_MODE",rec)    
    
end_bpm_subactivity
start_bpm_subactivity "Labor Costing"
                                                
    rec = __params[1]
    call OpenFormTop("ptBrowse","AU_GOOD_REQ_B.FM","QRY.DATA","SCEN_MODE",rec)
    
end_bpm_subactivity
end_bpm_activity

start_bpm_activity "Final Results"
start_bpm_subactivity "Process Form"
    
    rec = __params[1]
    expr = strcat(rec,"=AU_SALES_PREDICT_SCENARIO")
    call OpenFormTop("ptEdit","AU_SALES_PREDICT_SCENARIO_E.FM","WORK.AU_SALES_PREDICT_SCENARIO",1,expr)
    
end_bpm_subactivity
end_bpm_activity

start_action

     rec_id = __params[1]
     comm = LookUpId("AU_SALES_PREDICT_SCENARIO",rec_id,"DESCR")

     call bpm_setprocedurecomment(comm)
     call bpm_setprocedureowner(__activation_user)     

     call bpm_openatonce()
     callwait bpm_assign_job ( "New Sales Scenario" , __activation_user , "" , 0 , rec_id )

     callwait bpm_assign_job ( "Define Sales Quantities" , __activation_user , "" , 0 , rec_id )

     callwait bpm_assign_job ( "Material Requirements" , __activation_user , "" , 0 , rec_id )

     callwait bpm_assign_job ( "Labor Requirements" , __activation_user , "" , 0 , rec_id )

     callwait bpm_assign_job ( "Production Costing" , __activation_user , "" , 0 , rec_id )

     callwait bpm_assign_job ( "Final Results" , __activation_user , "" , 0 , rec_id )

end_action