Agent Handling

bpm_getrecid ()

bpm_getrecid ( activity_no )

bpm_getrecid ( activity_no, step_no )

bpm_getrecid ( activity_no, step_no, process_id )

 

This function returns the record that is used during activity number activity_no and step number step_no and process id the process_id. Usually there are as default values the current activity, current step and current process.

 

agent_create ( aname )

 

This function creates a running agent using the prototype agent aname and returns the handle of the agent.

 

agent_run ( ahandle, p1,...,p10 )

 

This procedure starts the action plan of the agent with handle ahandle. The parameters p1,...,p10 are optional and can be omitted. The agent first must be created by agent_create. Can be called both as "call" and "callwait"

 

agent_free ( ahandle )

 

This procedure frees the agent with handle ahandle.

 

agent_setvar ( varname )

 

This procedure is called inside the action code of an agent. The varname becomes public for all other agents. If another angent calls the agent_getvar function, can get the value(s) of varname.

 

agent_getvar ( ahandle, varname, varoff )

 

This function returns the variable varname with offset varoff of the agent ahandle. The variable must previously be set by a call to agent_setvar into the corresponding agent's action code.

 

OnOpenForm_DisableAllFields()

 

We use the DisableAllFields when the fields of a form are too many and its is better to disable all fields and then enable only the few fields we want. Have in mind that in this case the fields contents are visible to the user.

 

OnOpenForm_HideAllFields()

 

We use the HideAllFields when the fields of a form are too many and it is better to hide all fields and then show only the few fields we want.

 

OnOpenForm_EnableField ( fieldname )

 

If the DisableAllFields has has been used then the EnableField enables the fieldname field of the form.

 

OnOpenForm_DisableField ( fieldname )

 

Disables the field fieldname.

 

OnOpenForm_HideField ( fieldname )

 

Hides the field fieldname.

 

OnOpenForm_ShowField ( fieldname )

 

If the HideAllFields has has been used then the ShowField becomes visible the fieldname field of the form.

 

OnOpenForm_RequiredField ( fieldname )

 

The RequiredField specifies a field fieldname as a required one. The form does not saves to the database until the field has been filled in with data. The prompting label of the field becomes bold in order to notify the required of the field.

 

OnOpenForm_SetValue ("fieldname,val,displayval")

 

The SetValue presets the value of a form field fieldname to the value val. If the fieldname represents a lookup field (foreign key) then the displayval is required also. (the val in this case kept internally while the displayval is displayed)

 

bpm_startcoordinator ( aname, p1,...,p10 )

bpm_startplanner ( aname, p1,...,p10 )

bpm_startexpert ( aname, p1,...,p10 )

bpm_startagent ( aname, p1,...,p10 )

 

This procedure creates an agent according to the prototype aname and activates the new agent. The parameters p1,..p10 are optional and can be omitted. The variation _debug is for debug purposes from the side of programmer. The variations "coordinator", "exprert", "planner", "agent" are given for clarification into the code context.

 

bpm_assign_job ( step_descr, uname, rname, date0, p1, ..., p10 )

 

This procedure assigns the activity step_descr to user uname or to role rname. If the assignment occurs in later time the date0 is this time as number. The parameters can pass to user as p1,..,p10 and can be omitted. It can be called as "call" or "callwait". This procedure is called inside the action code of a coordinator.

id = bpm_assign_info ( info_descr, uname, rname, p1, ..., p10 )

This function assigns a piece of information named info_descr to user uname or to role rname. The parameters can pass to user as p1,..,p10 and can be omitted. The returned value id is the unique field value of the AU_STEP record.

 

bpm_event ( event_descr, p1, ..., p10 )

This procedure waits for the event 
event_descr to hapen. There is no user interaction at all. The system checks only the validation code section of this event in order to see if a result of value (1) is returned in order to continue execution of the coordinator workflow. The parameters can be passed as p1,..,p10 and can be omitted. It can be called as "callwait". This procedure is called inside the action code of a coordinator.

bpm_setprocedurecomment ( comm )

 

This procedure sets the commend of a coordinator agent to comm. Its called inside the agents action code

 

bpm_setstepcomment ( comm )

 

This procedure sets the commend of a coordinator agent to comm, especially for the activity to follow. Its called inside the agents action code.

 

bpm_setprocedureowner ( uname )

 

This procedure sets the coordinator' owner user as uname. The procedure owner can see from his terminal all the path of the coordinating procedure.

 

agent_view ( ahandle )

 

This procedure opens a form for the agent with handle ahandle and shows the agent's status. For administrative purposes only.

 

bpm_setsteptimelimit ( tlimit )

This procedure sets the time limit of the activity (defined in days) 

bpm_setstepfinaldate ( fin_date )

This procedure sets the final date of the activity (as a date string)

bpm_setstepmonitor ( monitor_flag )

This procedure sets the monitoring of the activity (True or False)

bpm_setstepstay ( stay_flag )

This procedure sets the staying property of the activity (True or False)

bpm_setstepday ( day_off )

This procedure sets the day offset from the starting of the procedure (as a number)

bpm_setstepparent ( parent_id )

This procedure sets the parent activity of the activity

bpm_setsteppriority ( priority )

This procedure sets the priority of an activity (smaller number is (1))

bpm_setstepcomment ( comm )

This procedure sets the comments of the activity

bpm_setsteprgroup ( rgroup )

This procedure sets the resource group of the activity

bpm_setstepid ( step_id )

This procedure sets the id record of the activity that is going to be issued

bpm_setstepactivity ( activity )

This procedure sets the "Activity" field of the activity

bpm_setstepbusiness ( business_id )

This procedure sets the business id of the activity

bpm_setstepgood ( product_id )

This procedure sets the product id of the activity

bpm_setstepcontact ( contact_id )

This procedure sets the contact id of the activity

bpm_setstepinfo ( info1, info2, info3, info4 )

This procedure sets relations between activities and other entities.  For example:

call bpm_setstepinfo("RELATED_BUSINESS", "AU_BUSINESS", "Customer of the sale")