Business Processes for the Account Entity


Last Edit: December 1, 2017 the alpha360 team

Basic Business Processes for the Account Entity

The Account Entity has the following basic BPs:

  • Add a Account Object
  • Modify a Account Object
  • Delete a Account Object
  • Retrieve a Account Object

Add an Account Entity

This BP adds an aAccount record to the database.

Name

BP_Account_add

Call

BP_Account_add(LOCAL p_R_aAccount is Record of aAccount, LOCAL p_sUserPK is string, p_sReturnPK is string, p_sErrorMessage is string)

Returns

  • True or
  • False

Flow

  1. Start a transaction
  2. Call BP_Account_add_private, passing to it the SAME variables it received
  3. BP_Account_add_private returns true (if everything was OK) or false (if there was an error)
  4. IF true then COMMIT ELSE ROLLBACK

Other Data Returned

  • p_sReturnPK - see the call - returns the PK of the Account Entity, if the add was successful
  • p_sErrorMessage - see the call - returns the error, if the add was not successful

Modify an Account Entity

This BP modifies an aAccount record.

Name

BP_Account_modify

Call

BP_Account_modify(LOCAL p_R_aAccount is Record of aAccount, LOCAL p_sUserPK is string, p_sErrorMessage is string)

Returns

  • True or
  • False

Flow

  1. Start a transaction
  2. Call BP_Account_modify_private, passing to it the SAME variables it received
  3. BP_Account_modify_private returns true (if everything was OK) or false (if there was an error)
  4. IF true then COMMIT ELSE ROLLBACK

Other Data Returned

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

Delete an Account Entity

This BP deletes an aAccount record from the database.

Name

BP_Account_delete

Call

BP_Account_delete(LOCAL p_s_sAccountPK is string, LOCAL p_sUserPK is string, p_sErrorMessage is string)

Returns

  • True or
  • False

Flow

  1. Start a transaction
  2. Call BP_Account_delete_private, passing to it the SAME variables it received
  3. BP_Account_delete_private returns true (if everything was OK) or false (if there was an error)
  4. IF true then COMMIT ELSE ROLLBACK

Other Data Returned

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

Retrieve an aAccount record

This BP gets an aAccount record by its PK and fills the record buffer.

Name

BP_Account_get

Call

BP_Account_get(LOCAL p_sAccountPK is string, p_sErrorMessage is string)

Returns

  • True or
  • False

Flow

Just a simple HReadSeekFirst()

Other Data Returned

  • p_sErrorMessage - see the call - returns the Error, if there was an Exception or Error

Copyright 2017 - computerplus