Please reload

 

alpha360 Business Processes [v2]

BPs or Business Processes are alpha360s' procedures that handle adds, modifies, deletes, posts etc for the various data entities.

  • They can handle complex or simple entities

  • When they affect complex entities, they are always inside a "transaction" and come as "pairs"

  • They use variables - simple variables, record structures or arrays - as parameters

  • They return an error message, through o NON local parameter string, usually named p_sErrorMessage

  • They may return the PK of a record that was added, through o NON local parameter string, usually named p_sReturnPK

  • They return a TRUE or FALSE

all BPs are heavily documented inside the projects, but to get a better understanding, we are going to give a detail explanation of one of them.

 

BP_Product_add()

 

This BP adds Product Entities to the database.

Product Entity is a complex entity - it includes both a gProduct_Class record and a gProduct record - so everything must be done in a transaction, with 2 BPs ...

Call

BP_Product_add(

LOCAL p_R_gProduct is Record of gProduct,

LOCAL p_R_gProduct_Class is Record of gProduct_Class,

LOCAL p_sImageFile is string,

LOCAL p_sUserPK is string,

p_sReturnPK is string,

p_sErrorMessage is string)

Flow

Run BP_Product_add()

- This starts a transaction and calls BP_Product_add_private(), passing to it, the same parameters it received.

- BP_Product_add_private() returns TRUE or FALSE, and triggers the COMMIT or ROLLBACK of the transcation, inside BP_Product_add().

Note that the 2 "paired" procedures have the same parameter list and their names are distinguished by a _private at the end.

Return

TRUE or FALSE

 

Other Data Returned

  • p_sReturnPK - see the call - returns the PK of the Product Entity, if the add was successful

  • p_sErrorMessage - see the call - returns the error, if the add was not successful

CODE Bricks [new in v2]

 

Code Bricks are special WX procedures, used to make WX coding more simple and easier to follow.

They have NO CRUDE functionality AND they just assign values to record variables.

You can find them at BP_CodeBricks

alpha360 CRUDE functions

 

Instead of using the classic WX HAdd(), HModify(), HDelete() functions, alpha360 projects use the following functions: alpha360_Add, alpha360_Modify and alpha360_Delete.

They include error reporting and trigger functionality.

See the code for more information

 
 

computerplus

Leoforos Dodonis 43,  45221

IOANNINA - GREECE

Registered VAT ID: EL084190121

sales@computerplus.gr