Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6064169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:15:03+00:00 2026-05-23T09:15:03+00:00

Delphi XE , Win32 Application , SQL Server 2005 Database. I am implementing a

  • 0

Delphi XE , Win32 Application , SQL Server 2005 Database.

I am implementing a Quality Management System.
I have some predefined Process Maps to apply them inside my application/system. I am requested to have all the transactions (I am not sure if it is correct word for it) dynamic so whenever they modify the process maps it affects the application (Without recompilation or any patches of course)

Here is an example to explain more clear:

Assume a Document controlling module, We have a process map as :

  1. [Document Controller] Receives the document from Contractor
  2. [Document Controller] Checks the document with the checklist
  3. [Document Controller] Sends the document to the [Project Manager]
  4. [Project Manager] applies and Action in the document
  5. [project Manager] Sends the document to [Document Controller]
  6. [Document Controller] Archives the document.

Now application should read the parameters from a database for its functions.
Let’s say Received and Checked the document (1 and 2) and now sends it. As soon as the “Save” Button is pressed the system should check who should be the receiver of this document and send the document to him/her.
In our example, the receiver is the [project Manager]. however, sometime later they might decide to change the process map as
– “3- [Document Controller] sends the document to the [Project Architect]”.
Therefore, the system should act as defined in the process map.

I am wondering what Is the proper way to implement such system (Delphi XE , win32)?

I have some idea but not sure if it is proper :
For each Process in the process map I can define a Service with a kind of unique Id and I read the service from the database and call it in the application layer (with relevant Parameters). In this case I am not sure if each service should be a dll or package file and I believe it is wrong to have that number of library files, since the services are going to not very few!

I hope I could explain my problem well and sorry if it is too long.
Please let me know if it is not clear.

Thanks,
Mahya

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:15:04+00:00Added an answer on May 23, 2026 at 9:15 am

    It sounds to me like you want to apply some common rules for every “business function” performed by your application, thereby implementing some form of quality management. I’m going to use “business function” to denote a logical operation that may span several technical functions and procedures in the source code.

    There is no defined “proper way”, but some ideas are better than others.

    The use of a database to store dynamic data is obviously a good idea. For example you can model each business function as a separate entity (with one database record per business function). Whatever variables you’ll need to manage the processing of each business function will determine the necessary fields. You’ll definitely need a unique id for each one.

    There’s no reason to code the business functions into separate dlls, but I’d put them in separate units in the source code or maybe group the functions according to their type of operation or some other logical grouping that makes sense to your business. You’ll need to change the way you call your business functions. You’ll need to call them indirectly, in other words you would call a generic PerformFunction routine, perhaps passing a function identifier and some other parameters in whatever data structure suits you. As the parameters are changed in the database (according to your example, who to send the Document to, Project Manager or Project Architect?) the operation of the business function will be modified accordingly as long as you’ve implemented all the possible permutations that could arise given the number of variables for each business function. I’m sure the Document Recipient’s email address isn’t all you have in mind. Here’s some code that might help. I’m not saying it’s good code, it’s only to convey the idea.

    type
      TFunctionRuntimeParameter = record
        FunctionID: integer; // this better be unique
        FunctionName: string;  // something intelligible for display purposes
        ReportToEmail: string; // who to send the end report document
        AuditLevel: integer;  // for example vary the degree of auditing/logging
        variableABC: TDateTime;  // could be a date that influences something
      end;
    
    function TMyForm.GetRuntimeParametersFromDB(aFunctionID: integer): TFunctionRuntimeParameters;
    var
      tempResult: TFunctionRuntimeParameters;
    begin
      // For brevity I'm going to assume an existing query object connected to your db.
      qry.SQL.Add('Select * From BusinessFunctions Where Function_ID = :FunctionID');
      qry.ParamByName('FunctionID').AsInteger := aFunctionID;
      qry.Open;
      tempResult.FunctionID := qry.FieldByName('Function_ID').AsInteger; // don't ask me Y!
      tempResult.FunctionName := qry.FieldByName('Function_Name').AsString;
      tempResult.ReportToEmail := qry.FieldByName('Report_To_Email').AsString;
      tempResult.AuditLevel := qry.FieldByName('Audit_Level').AsInteger;
      tempResult.variableABC := qry.FieldByName('ABC').AsDateTime;
      result := tempResult;
      qry.Close;
    end;
    
    procedure TMyForm.PerformFunction(aFunctionID: integer; FRP: TFunctionRuntimeParameters);
    var
      MyReportDocument: TMyReportDocument;
    begin
      if (FRP.AuditLevel > 0) then
        // do something special before starting the function
    
      case aFunctionID of
        101: MyReportDocument := DoBusinessFunctionABC;
        102: MyReportDocument := DoBusinessFunctionDEF;
        103: MyReportDocument := DoBusinessFunctionXYZ;
      end;
    
      SendReportDocumentByEmailTo(MyReportDocument, FRP.ReportToEmail);
    
      if ((Now - FRP.variableABC) > 28) then
        // perhaps do something special every 4 weeks!
    
      if (FRP.AuditLevel > 0) then
        // do something special after the function has finished
    end;
    
    procedure TMyForm.btnBusinessFunctionXYZClick(Sender: TObject);
    var
      FunctionID: integer;
      FunctionRuntimeParameters: TFunctionRuntimeParameters; // record that mimics db entry
    begin
      FunctionID := 1234; // or you might prefer an enum
      FunctionRuntimeParameters := GetFunctionRuntimeParametersFromDB(FunctionID);
      PerformFunction(FunctionID, FunctionRuntimeParameters);
    end;
    

    This way as the Runtime Parameters change in the database, the application will behave differently without the need for recompilation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Delphi/WIN32 application that uses an SQL Server database as back-end,
I am responsible for a Delphi/Win32 project management application. I have just completed a
I have a delphi (Win32) web application that can run either as a CGI
My team is maintaining a huge Client Server win32 Delphi application. It is a
I'm writing a client-server win32 application in Delphi 7 and in a section i
I am looking for some starting points integrating a Win32 Delphi application's data with
What is the best way to make a Delphi application (Delphi 2007 for Win32)
I have developed a few Delphi Win32 (currently using D2007) applications, which revolve around
Trying to use GnuPG with Delphi (Win32). I need to sign some file with
Is possible to use ADO .Net from an Win32 Application build with Delphi 7.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.