start_agent_info
AgentName = "AU_PRODUCTION_COORDINATOR"
AgentDescr = "Production Coordinator"
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 "Production Scheduling"
start_bpm_subactivity "Production Order"
rec = __params[1]
form = __params[2]
expr = strcat
(rec
,"=AU_EVENT"
)
call OpenFormTop
("ptEdit"
,form
,"WORK.AU_EVENT"
,1
,expr
)
end_bpm_subactivity
end_bpm_activity
start_bpm_activity "New Production Order"
start_bpm_subactivity "Production Order"
rec = __params[1]
form = __params[2]
expr = strcat
(rec
,"=AU_EVENT"
)
call OpenFormTop
("ptEdit"
,form
,"WORK.AU_EVENT"
,1
,expr
)
end_bpm_subactivity
end_bpm_activity
start_bpm_activity "Materials
for Production"
start_bpm_subactivity "Row Materials Moving"
rec = __params[1]
call OpenFormTop
("ptBrowse"
,"
AU_GOOD_MOVE_B.FM"
,"QRY.DATA"
,"PORDER1_MODE"
,rec
)
end_bpm_subactivity
end_bpm_activity
start_bpm_activity "Products Storage"
start_bpm_subactivity "Products Moving"
rec = __params[1]
call OpenFormTop
("ptBrowse"
,"
AU_GOOD_MOVE_B.FM"
,"QRY.DATA"
,"PORDER2_MODE"
,rec
)
end_bpm_subactivity
end_bpm_activity
start_action
rec_id = __params[1]
form = __params[2]
comm = __params[3]
call bpm_setprocedurecomment
(comm
) {.....set the procedures comment}
call bpm_setprocedureowner
(__activation_user
) {.....set the procedure owner}
call bpm_openatonce
()
callwait bpm_assign_job
( "New Production Order"
, __activation_user
, ""
, 0
, rec_id
, form
)
split_in_branch
callwait bpm_assign_job
( "Production Scheduling"
, ""
, "PRODUCTION DEPARTMENT"
, 0
, rec_id
, form
)
and_branch
callwait bpm_assign_job
( "Materials
for Production"
, ""
, "WAREHOUSE"
, 0
, rec_id
)
join_branches
callwait bpm_assign_job
( "Products Storage"
, ""
, "WAREHOUSE"
, 0
, rec_id
)
end_action