1 / 34

Extending Business Rules

Extending Business Rules. FocusMaster Utilities. David Blankenship and Dixon Epperson Date Picker/Calendar HelpTips File Dialog (Open/Save as) Location Select (Select Folder) RadioChk (Radio Buttons, Check Boxes, Buttons) Text Editor/Viewer with SpellCheck.

aden
Download Presentation

Extending Business Rules

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Extending Business Rules FocusMaster Utilities • David Blankenship and Dixon Epperson • Date Picker/Calendar • HelpTips • File Dialog (Open/Save as) • Location Select (Select Folder) • RadioChk (Radio Buttons, Check Boxes, Buttons) • Text Editor/Viewer with SpellCheck theBRGroup.org Susan Smith April 29, 2006

  2. Extending Business Rules • Works in any version of Business Rules • No installer needed – just copy the files to any folder you like (with the “DICT” sub-folder placed in that same folder) • Hard-code the path to the .exe in your calling function - or - • use George’s FNBRLOC$ function to find the BR location and then use that as a relative path • Only two parameters are REQUIRED in most of the utilities. • - All other parameters have defaults or are optional • All communication to/from the utilities are done through text files theBRGroup.org Susan Smith April 29, 2006

  3. Extending Business Rules Parameters TO .exe Results FROM .exe Commandfile.txt dbde[wsid].txt HelpTip, RadioChk Delphi Utility ALL Utilities Other arguments from BR All Utilities The calling function of your BR program will need to read dbde[wsid].txt to get the results from the utility. The demo programs supplied on the CD already do this, so refer to them for more information. Also, one of the last slides shows this. Yourfilename.txt reSpellChk theBRGroup.org Susan Smith April 29, 2006

  4. Extending Business Rules Calendar.exe (Date Picker) • The default highlighted date is today’s date (or use –D parameter for alternative date) • 4 ways to exit program: • Click OK - returns selected date in mm/dd/ccyy format • Click “X” - returns blank • Press Esc - returns “Escape” • Timeout - returns “Timeout” if –G >0 and time is exceeded. theBRGroup.org Susan Smith April 29, 2006

  5. Extending Business Rules Calendar.exe (Date Picker) Using the keyboard: Change by Month PgUp, PgDn Change by Year Ctrl-PgUp, Ctrl-PgDn Orig Starting Date Home Day 1 of currently Ctrl-Home selected month Maneuver by Day Left/Right/Up/Down theBRGroup.org Susan Smith April 29, 2006

  6. Extending Business Rules Calendar.exe (Date Picker) Using the mouse: Change by Month Arrow keys OR click on Month for drop down list Change by Year Click on Year Maneuver by Day Click on date theBRGroup.org Susan Smith April 29, 2006

  7. Extending Business Rules Helptip.exe • Windows are scrollable • The source for the window includes a title & text (w/opt color specs for title) • Windows error codes are included in errors.txt, or use your own text file theBRGroup.org Susan Smith April 29, 2006

  8. Extending Business Rules Helptip.exe • 4 ways to exit program: • Click OK • Press Enter (no mouse req’d) • Click “X” • Timeout Note the red title. Titles may be colored by inserting ^RRGGBB value in the text file directly preceding the title text (i.e.^ee1100Error 0726…) theBRGroup.org Susan Smith April 29, 2006

  9. Extending Business Rules Helptip.exe This routine can be used for much more than BR error routines. You can use it to easily display any informational message in your programs: “This account is past due” “You have pending messages” “Place forms in printer” “This batch has not been posted” “File in use by another workstation” theBRGroup.org Susan Smith April 29, 2006

  10. Extending Business Rules FileDialog.exe File Selection Windows interface to select a filename for either a “File Open” or “File Save” operation. Option to use old-style 8.3 compliant filenames for BR versions prior to 4.0 Specify file extension or use the default of “*.*” If file already exists on “Save As”, you’ll be prompted to overwrite. theBRGroup.org Susan Smith April 29, 2006

  11. Extending Business Rules FileDialog.exe File Selection To select the starting path: Default same folder as .exe prgm Full path drive:\path Partial path starting with “\” will use path from the root of the prgm drive Relative path no “\” – begins with path to prgm folder Please refer to documentation for further details theBRGroup.org Susan Smith April 29, 2006

  12. Extending Business Rules FileDialog.exe File Selection Long Filename (default) Long Filename OFF (-L) theBRGroup.org Susan Smith April 29, 2006

  13. Extending Business Rules LocSelect.exe Location Select • Ability to specify starting folder for navigation • Returns selected path • Allows new folder creation: theBRGroup.org Susan Smith April 29, 2006

  14. Extending Business Rules RadioChk.exe • GOAL 1 • True Windows control to replace fnDialog$ features: • Define location of child window (row/column) • Define window width • Specify text to be displayed in the window • Up to three choices – mutually exclusive (similar to radio buttons) • If no choice selected, display “Press any key to continue…” • Direct replacement for fnDialog$ - no other changes required theBRGroup.org Susan Smith April 29, 2006

  15. Extending Business Rules RadioChk.exe • GOAL 2 • Expand upon Business Rules MSGBOX capabilities: • Automatic line breaks (word wrap) • Position box anywhere you want on the screen • Provide customizable responses (button captions) theBRGroup.org Susan Smith April 29, 2006

  16. Extending Business Rules RadioChk.exe • Additional Features: • Text of each component may be independently colored ^RRGGBB • Choice of fixed width columns or automatically sized • Choice of fixed width buttons or automatically sized • “No Choice” option for informational messages (OK button only) • Buttons or checkboxes can be displayed but disabled (grey’d out) theBRGroup.org Susan Smith April 29, 2006

  17. Extending Business Rules RadioChk.exe Possible Returned Values: A string with one character per choice: 0=False 1=True 2=Disabled If window contains 6 checkboxes, and returned value is 201101, then boxes # 3, 4 and 6 were checked and box 1 was grey’d out. For radio buttons, only one byte can be true 000100 - OR - “Cancel” if Cancel button was clicked “OK” if no choices were selected “Timeout” if –G >0 and time exceeded. theBRGroup.org Susan Smith April 29, 2006

  18. Extending Business Rules RadioChk.exe Priming the Choices: You can “preset” the return value defaults before calling the function. The appropriate checkboxes will be checked and the radio button choice will be set when the window opens. If you use “2”s in your character string, choices with a “2” will be grayed out. You may insert line feeds in the message text where desired by using “\n” in the same way as we do in BR input fields help text. No limit to # of Radio Buttons or Check Boxes on the screen, other than screen space. Max 4 buttons per window. If you specify “B” for buttons, but provide more than 4 choices, the program will switch to “R” for Radio Buttons. theBRGroup.org Susan Smith April 29, 2006

  19. Extending Business Rules RadioChk.exe No option choices (i.e. radio buttons, checkboxes, or additional buttons) Same window, with a different window width specified theBRGroup.org Susan Smith April 29, 2006

  20. Extending Business Rules RadioChk.exe Checkboxes with 4 columns. Presets: 3 boxes disabled, 3 boxes pre-selected. Columns auto-sized based on max text length in each column, colored button text. Radio buttons with 4 options, 1 column, colored button text theBRGroup.org Susan Smith April 29, 2006

  21. Extending Business Rules RadioChk.exe Button option, buttons are auto-sized, set button 2 “on” Same window with a specified window width, colored message text, colored button text, fixed-width buttons, set button 2 “on” theBRGroup.org Susan Smith April 29, 2006

  22. Extending Business Rules RadioChk.exe Radio button version with 2 choices, choice 1 set to “on” Same window, button version, choice 2 set to “on” theBRGroup.org Susan Smith April 29, 2006

  23. Extending Business Rules reSpellChk.exe • The Speller Utility is two programs in one: • text EDITOR • text VIEWER (read-only) • The viewer option can handle standard text or .rtf format. • This ability to display RTF files offers an incredible opportunity to display your BR information – even entire documents or reports – fully-formatted, with fonts, colors, lines, bold, highlighting, columns and more. theBRGroup.org Susan Smith April 29, 2006

  24. Extending Business Rules reSpellChk.exe • File Viewer (Read Only Option) • display standard Text or RTF files • Word Wrap • Scroll Bars • Font Selection – Name & Size • Resizable Windows: specify starting position & size • Optional Find/Search Button • Timeout option • Two optional dual-purpose buttons: • Print/Continue Button (both optional) • Exit/Abort Button (one must be active) theBRGroup.org Susan Smith April 29, 2006

  25. Extending Business Rules reSpellChk.exe • Text Editor • Spellcheck • Word Wrap • Optional Character Limit • Scroll Bars • Font Selection – Name & Size • Resizable Windows: specify starting position & size • Optional Find/Search Button • Timeout Option • Alternate Buttons (same as Read Only) theBRGroup.org Susan Smith April 29, 2006

  26. Extending Business Rules reSpellChk.exe Spell Check Routine Find/Search Routine theBRGroup.org Susan Smith April 29, 2006

  27. Extending Business Rules 3 ways to display a message HelpTip Utility theBRGroup.org Susan Smith April 29, 2006

  28. Extending Business Rules 3 ways to display a message RadioChk Utility As a no-choice message box theBRGroup.org Susan Smith April 29, 2006

  29. Extending Business Rules 3 ways to display a message SpellChk Utility In “read only” mode theBRGroup.org Susan Smith April 29, 2006

  30. Extending Business Rules How do they Work? HelpTip, RadioChk & SpellChk HelpTip & RadioChk– get text and choices from one record in a text file SpellChk – reads/writes an entire text file. Both utilitiesdepend upon additional arguments sent by the BR program. The utility parses & displays the text, accepts user input, and results are written to dbde[wsid].txt, which will be read by your BR function. Text File * Text File ** Start Here Delphi Utility BR prgm Parameters Function results User Response dbde.txt * For HelpTip, RadioChk ** for reSpellChk theBRGroup.org Susan Smith April 29, 2006

  31. Extending Business Rules HelpTip, RadioChk Sample 5-record commandfile.txt 1^6D24AAThis report will print all members who currently owe back dues. For those who have already gone to collections, please see the Collections Report in the Direct Pay System. \n\nIf you need detail from archived history, please refer to the Jaz Cartridges archives. |Active Members|Retired Members|Direct Pay (Billed) Members (RadioChk) 2 This is a test of the ability to display a series of check boxes and allow multiple selections |choice A|choice B|choice C|choice D|choice E|choice F|choice G|choice H|choice I 3 ^336699This is a no choice option designed to provide a dialog box with only an OK button (Cancel is not visible). \n\nI can be long and windy about the kinds of things I say here because no one will mind reading a few lines. 4 ^FF0000This is a simple choice but uses three buttons and this simple text. |^22494DYes|^00FF00No|^0000FFMaybe 5 ^ee1100ATTENTION|You do not have permission to access this feature. Please contact the system administrator for further information. theBRGroup.org Susan Smith April 29, 2006

  32. Extending Business Rules Function to call RADIOCHK.EXE 80050 DEF FNRADIOCHK$*100(CAPTION$*40,WORKID$,INFILE$*40,XTIMER,LEFT,TOP,ALLOW,DEFAULT$,COLWIDTH,TYPE$,LOCATE,NOCOLS) 80060 !where is Business Rules located? 80070 LIBRARY "GEORGE.LIB/LIBS": FNBRLOC$ 80080 ! 80090 DIM BRPATH$*70, COMMANDLINE$*1000,RESPONSE$*100 80100 LET BRPATH$=FNBRLOC$ 80110 !Build command string to send to Delphi .exe based on parameters sent to this function >>> 80140 LET COMMANDLINE$="-F"&TRIM$(INFILE$)&" -B"&WORKID$&" " 80150 IF XTIMER>0 THEN LET COMMANDLINE$=COMMANDLINE$&" -G"&STR$(XTIMER) 80160 IF LEFT>0 THEN LET COMMANDLINE$=COMMANDLINE$&" -L"&STR$(LEFT) 80170 IF TOP>0 THEN LET COMMANDLINE$=COMMANDLINE$&" -T"&STR$(TOP) 80180 IF CAPTION$>"" THEN LET COMMANDLINE$=COMMANDLINE$&" -C"""&CAPTION$&"""" 80190 IF ALLOW>0 THEN LET COMMANDLINE$=COMMANDLINE$&" -U1" 80200 IF DEFAULT$>"" THEN LET COMMANDLINE$=COMMANDLINE$&" -V"&DEFAULT$ 80210 IF COLWIDTH>0 THEN LET COMMANDLINE$=COMMANDLINE$&" -W"&STR$(COLWIDTH) 80220 IF TYPE$>"" THEN LET COMMANDLINE$=COMMANDLINE$&" -X"&TYPE$ 80230 IF LOCATE>0 THEN LET COMMANDLINE$=COMMANDLINE$&" -Y"&STR$(LOCATE) 80240 IF NOCOLS>1 THEN LET COMMANDLINE$=COMMANDLINE$&" -Z"&STR$(NOCOLS) 80250 EXECUTE "sys -w "&TRIM$(BRPATH$)&"radiochk.exe "&COMMANDLINE$ 80260 FOR I=1 TO 10000: LET X+=1: NEXT I 80270 IF EXISTS("dbde"&WSID$&".txt") THEN GOTO 80280 ELSE GOTO 80320 80280 OPEN #100: "name=dbde"&WSID$&".txt",DISPLAY,INPUT get results from .exe and set the function return value 80290 LINPUT #100: RESPONSE$ 80300 CLOSE #100,FREE: 80310 LET FNRADIOCHK$=RESPONSE$ 80320 FNEND theBRGroup.org Susan Smith April 29, 2006

  33. Extending Business Rules * All routines * For demo purposes: • Create C:\WBTESTING folder and place all programs there • Make sure that the “Dict” folder is in C:\WBTESTING as well • Change to C:\WBTESTING before running demo WB prgms • The path is hard-coded in the calling functions on your CD. Feel free to change that. theBRGroup.org Susan Smith April 29, 2006

  34. Extending Business Rules On the CD… • Utility file executables • Several demo WB programs that illustrate the calling syntax and features of the various utilities • Documentation files for each utility • Combine.wb – a program that demonstrates all of the programs in succession • Parameter list of all possible settings and flags • Comparison chart of the various “text display” programs • This Powerpoint project theBRGroup.org Susan Smith April 29, 2006

More Related