Similar presentations

2 Session ObjectiveProvide a solid understanding of how BPM interfaces with the business objectDemonstrate and use Pre and Post Processing directivesDemonstrate effective BPM writing and debugging techniquesUsing informational messageUsing Progress comment textDemonstrate extending the wizard with 4GL(ABL) programmingDemonstrate using database tables and fields outside of the method dataset

3 Session AssumptionsYou can effectively use the condition and action wizard in BPMYou have base working knowledge of Personalization and CustomizationThis class extends education and does not use examples in other class materials

4 At Course completion you willEffectively write BPMs beyond the wizard.Receive documentation for all workshops.Receive recordings of all workshops with embedded documentationReceive the .bpm examples

5 Agenda Business Object Basics BPM Overview BPM WorkshopsSet field values outside dataset using UpdateTableBufferUse a method to set fields other than UpdateUse 4GL(ABL)to read records from a table outside datasetCalculate and Roll Up Totals from Detail to HeaderEpicor 9 BPM Data Form DesignerQ & A

6 Business Object BasicsBusiness object controls all input and out from the databaseContains all rules for processing recordsContains a normalized relationship between tables and field in the actual databaseContains methods for interfacing with dataCan be called by web services, smart client, web client or other program

7 Business Objects and Method DirectivesPartSalesOrderMethodPart.UpdateSalesOrder.ChangeMiscCodePart.ChangePartNum

8 Methods in a Business ObjectAn internal procedure or function. These are used to enter, calculate and view data.Delete by IDUsed to delete records (sometimes)Get by IDUsed to retrieve records for specific IDReturns all the dataGet ListUsed in searchesReturns key dataGet NewUsed to create a new recordGet RowsUsed to retrieve specific data for a group of recordsUpdateUsed to add, update and delete recordsMost common method to use in BPM

9 Directives - Contains all rules for processing recordsPre-Processing Directives-used to intercept data before it reaches the database.Temporary Tables-dataset used to compare to the existing dataset, ttPartBase Processing -used in place of base code; difficult to use effectivelyPost-Processing- used to intercept data returning from the database through the Business Object.– action to takes place after the record has been successfully validated and updated.

10 Can be called by web services, smart client, web client or other programsClient Server (Smart Client)A BPM is an application that resides between the Smart Client (Vantage/Epicor installation on local PC) and the Business Objects.Various Forms and Programs

14 Using the Tracing OptionsEnabled from the main menuWrites the information to a file for reviewIdentifies the relevant Business ObjectIdentifies Method-trigger used to invoke BPM.Data -positive proof of what is being called when neededMaps out the flow of data as an user interacts with a form.

21 BPM Review-Setup Directive Name GroupAssign a short but logical description of the purposeExample – Method directives for CustShip.POUdpate called InventoryOverShipped and JobOverShipped or Method directive for CustShip.ValidateShipped called SetPkgClass&Code.GroupUsed to logically group associated BPM directivesTwo or more directives may be required to control a particular process related to the same or even different methodsExample – The former Directives could be put under a group called ‘Shipping’

22 SetupOther FieldsOrder – Sets the order the directive appears in the treeEnabled – The on/off switch for shiny new BPM. Don’t forget this!Prevent Endless LoopsTypically Service ConnectCompany Independent – Multi Company

23 BPM Review Conditions When BPM actions need to take placeExample – An user creates a new part and tries to save the record without entering a Product Group.Not creating a condition is a condition itselfI want my action to take place every time the method is called by an user.4GL(ABL) queries and Advanced Procedures are two of the more flexible and effective conditions.

24 Conditions – Overview Pre-Process Post-Process Advance ProceduresExample – As it appears in the Actions window [custom source code]Post-ProcessThis directive has been enabled from the specified directiveUsed when condition in the Pre-Process to enable an action in the Post-Process.

26 Actions – Overview Pre-ProcessSend synchronously based on the designed templateExecute 4GL(ABL) codeExample – execute 4GL(ABL) update ship viaThe verbage ‘update ship via’ is accomplished by commenting out the first line in 4GL(ABL) code.Show informational message based on the designed templateIssue a warning – can include data from fields related to the transaction to help debug

27 Actions – Overview Post-ProcessCall the specified Epicor Service Connect Workflow specify howAttach hold of the specified typeMust set up holds first in Hold Type Maintenance under Business Process Management/Setup\Hold TypeThis action is also available in Pre-Process

28 Queries Queries are written using the progress or 4GL(ABL) languageResourcesBAQ’sProgress 4GL(ABL) HandbookProgress 4GL(ABL) ReferenceProgress Programming Handbook (available for download from the Progress website).4GL(ABL) format Example –for each ttPartTran where (ttPartTran.RowMod = 'U' or ttPartTran.RowMod = 'A' and ttPartTran.TranType = 'MFG-STK') ,each JobHeadeach JobPartwhere JobHead.JobNum = ttPartTran.JobNum and JobPart.JobNum = ttPartTran.JobNum and(Jobhead.QtyCompleted - JobPart.ReceivedQty) < ttPartTran.TranQtyEnglish translation – Show me when someone attempts to receive more parts into stock from a job than are currently reported complete on that job.

32 Advanced & 4GL(ABL) Code Actions4GL(ABL) ActionsUsed to execute 4GL(ABL) code which can consist of any combination of queries, definition of variables, calculations, updating fields, and or calling other progress functions/programsEx. of a function: Run lib\UpdateTableBuffer.p(input BUFFER<Table>:Handle,’<Field>’,<Value>)When to use Advance Procedure or execute 4GL(ABL) Code?

33 Advanced & 4GL(ABL) Code ActionsRun lib\UpdateTableBuffer.p(input BUFFER <Table>:HANDLE, '<Field>',<Value>)Used to update fields in tables unrelated to the current transactionAssignUsed to update a field in table related to the current transaction

35 THANK YOU! BPM Interactive Workshops#1 & #2 will utilize the Epicor Knowledge Mentorto demo; then attendees will work on each workshop.#3 & #4 will utilize Live Vantage c to demo; then attendees will work on eachworkshop.#5 Live in Epicor 9General Q&A

36 BPM Ex1 Set field values outside dataset using UpdateTableBufferObjective: Default Material Burden % rate at Part based on PartClass.Update. In this example material burden % rate will be used but the concept can be applied to a number of methods.ConceptsUsing a method to set field values outside data set using UpdateTableBuffer.p command.Using calculations within a directive

37 BPM Ex2 Setting Field Before UpdateObjective: Default order misc amount based on total order amount. In this example we will use misc charge but the concept can be applied to a number of methods.ConceptsUsing a method to set fields values before updateUsing calculations within a directive

38 BPM Ex3 Setting Fields from Another TableObjective: Default fields from the part master. In this example we will use the order line but the concept can be applied to a number of methods.ConceptsPopulation of fields before the record is savedUsing Post Processing DirectiveUsing the information message as a debug toolUsing Method directive without a conditionUsing 4GL(ABL) code to read records from a table outside of the dataset

39 BPM Ex4 Calculate and Roll Up TotalsObjective: Calculate and roll up totals from a sub table to the header. In this example we will use the order line but the concept can be applied to a number of methods.ConceptsUsing 4GL(ABL) code to read records from a table outside of the datasetUsing 4GL(ABL) variable to calculate and accumulate totals

40 BPM Ex5 BPM Data Form DesignerObjective: E9 BPM Data Form Designer program creates custom forms that can then launch through BPM method directivesConceptsUse “Call the named BPM Data Form using no customization always” action within a directive.Create simple form which contains text and two buttons; data entry fields that update r database. Conditionally display a form or capture data required against a specific transaction.