Advanced BPM PDF
Advanced BPM PDF
Advanced BPM PDF
ED879905
90521-10-9221-5841001
10.2.300
Revision: August 13, 2018 4:13 p.m.
Total pages: 83
course.ditaval
Advanced Business Process Management Course Contents
Contents
Advanced Business Process Management Course................................................................6
Before You Begin....................................................................................................................7
Audience.........................................................................................................................................................7
Prerequisites....................................................................................................................................................7
Environment Setup..........................................................................................................................................7
Workshop Constraints..............................................................................................................................8
BPM User Rights....................................................................................................................10
BPM and Service Oriented Architecture..............................................................................11
How BPM Works...................................................................................................................12
Standard Execution Flow................................................................................................................................12
Using Business Process Management.............................................................................................................13
Use BPM to Send Email........................................................................................................15
Synchronous vs Asynchronous Execution........................................................................................................15
Design Email Template...................................................................................................................................15
Execution Rule...............................................................................................................................................16
Workshop - Send an Email.............................................................................................................................16
Add a Post-Processing Directive..............................................................................................................16
Use Send Email Action............................................................................................................................17
Test the BPM..........................................................................................................................................18
Change the Action.................................................................................................................................18
Test the BPM..........................................................................................................................................19
Disable Directive.....................................................................................................................................19
Default Data To Updatable BAQ Records...........................................................................21
Workshop - Populate Data in Updatable Dashboard.......................................................................................21
Publish Dashboard Data..........................................................................................................................21
Get the Updatable BAQ Methods...........................................................................................................22
New Post-Processing Directive.................................................................................................................23
Build BPM Workflow...............................................................................................................................24
Test Directive..........................................................................................................................................25
Disable Directive.....................................................................................................................................26
Set Text Properties...............................................................................................................28
Workshop - Set Text Properties......................................................................................................................28
Create New Method Directive.................................................................................................................28
Build BPM Workflow...............................................................................................................................29
Test the Directive....................................................................................................................................30
Disable the Directive...............................................................................................................................30
BPM Data Form Designer.....................................................................................................31
Workshop - Create a Form for User Input.......................................................................................................31
Create a BPM Data Form........................................................................................................................31
Locate the GetNewUserFile Method........................................................................................................32
This course focuses on advanced techniques users can leverage within Business Process Management (BPM).
Epicor BPM identifies and improves processes to make customers business more efficient, more disciplined, and
better able to adapt to change. BPM technology enables organizations to automate and streamline business
processes for continuous improvement.
The BPM functionality is available on nearly every business process in the system and it activates using the Epicor
Server. Whether the transaction originates from the Epicor Client or Epicor Web Services, the BPM results are
the same. For this reason, Business Process Management is often the best toolset for system modifications. For
example, making a field mandatory is easier to set up and maintain through a BPM method than a client
customization.
The course first describes benefits using Business Process Management in a Service Oriented Architecture
environment, followed by the general overview of BPM functionality. The course then follows by step-by-step
case studies. Each case study explores a different aspect of the BPM functionality you can make use of in a real
life environment.
Upon successful completion of this course, you will be able to:
• Understand benefits of a Service-Oriented Architecture.
• Get to know main principles of using BPM.
• Create an email template and use BPM to send notifications.
• Use the directive to default data in a newly added records.
• Control text properties through a BPM directive.
• Create BPM forms invoked by method directives.
• Use Data Directives to initiate actions when updates to specific tables occur.
• Use the Invoke BO Method action to call Business Object (BO) methods from within a directive.
• Retrieve additional information outside the current dataset to populate custom fields.
• Learn how to create and call Custom External Methods.
• Debug execution of custom code directives.
• Manage method directives.
Read this topic for information you should know in order to successfully complete this course.
Audience
Prerequisites
To complete the workshops in this course, the necessary modules must be licensed and operating in your training
environment. For more information on the modules available, contact your Epicor Customer Account Manager.
It is also important you understand the prerequisite knowledge contained in other valuable courses.
• Database Concepts Course - This course reviews the table and field name identification process using Field
Help, Customization Tools, and the Data Dictionary Viewer functionality. It also describes table linking
procedures and requirements as well as join type definitions and specifications.
• Introduction to the Dashboard Course - This course provides an introduction to the dashboard - a
personalized information and a command center.
• Business Process Management Course - This course focuses on the Business Process Management (BPM).
Using the BPM functionality, you can modify the flow of business processes through the Epicor ERP application.
This allows individual companies to tailor the business flow to their specific requirements.
Environment Setup
The environment setup steps and potential workshop constraints must be reviewed in order to successfully
complete the workshops in this course.
Your Epicor training environment, in which the Epicor demonstration database is found, enables you to experience
Epicor functionality in action but does not affect data in your live, production environment.
The following steps must be taken to successfully complete the workshops in this course.
1. Verify the following or ask your system administrator to verify for you:
• Your Epicor training icon (or web address if you are using Epicor Web Access) points to your
Epicor training environment with the Epicor demonstration database installed. Do not complete
the course workshops in your live, production environment.
Note It is recommended that multiple Epicor demonstration databases are installed. Contact
Support or Systems Consulting for billable assistance.
• The Epicor demonstration database is at the same version as the Epicor application. The
demonstration database is installed from the Epicor Administration Console using the "Add Demo
Database" command under Database Server. See Epicor ERP installation guides for details. If you are an
Epicor Cloud ERP customer (and have licensed embedded education), the demonstration database is
installed for you.
• Your system administrator restored (refreshed) the Epicor demonstration database prior to
starting this course. The Epicor demonstration database comes standard with parts, customers, sales
orders, and so on, already defined. If the Epicor demonstration database is shared with multiple users
(that is, the database is located on a server and users access the same data, much like your live, production
environment) and is not periodically refreshed, unexpected results can occur. For example, if a course
workshop requires you to ship a sales order that came standard in the Epicor demonstration database,
but a different user already completed this workshop and the Epicor demonstration database was not
restored (refreshed), then you will not be able to ship the sales order. If you are an Epicor Cloud ERP
customer see section below.
2. Log in to the training environment using the credentials epicor/epicor. If you are logged in to your training
environment as a different user, from the Options menu, select Change User.
3. From the Main menu, select the company Epicor Education (EPIC06).
Note To refresh your Epicor training data, enter a support ticket in EpicCare and include your site ID.
Workshop Constraints
For this course to work the best within this training environment, be sure to accurately follow all the steps included
in each workshop. After you have successfully completed a BPM workshop, be sure you either disable or delete
the BPM method. Disabling or removing BPM methods ensures the default training environment is always available.
Note Restoring (refreshing) the demonstration database does not automatically remove existing BPM
directives. All BPM directives must be manually removed or disabled.
Two levels of Business Process Management (BPM) functionality are available - a base level and an advanced
level.
Any users who have menu access to BPM can use the base level BPM functionality to create Method and Data
Directives. The BPM standard interface uses design elements and their related method parameters, variables and
action items calling the ERP business objects within the context of the tenancy of the user. Most common business
requirements for reading and writing data can be accomplished by using the built in interface.
The base user is restricted to using elements which do not have a freeform C# code editor, and from using
freeform code in the base processing tab (even if called from an updatable BAQ).
Users with Advanced BPM rights can access the additional design elements which enable freeform C# code.
You give specific user rights to the advanced BPM features through User Account Maintenance. These rights
are assigned on the Options sheet. The entire BPM toolset includes the following:
• Callers
• Execute Custom Code
• Invoke External Method
• Call SC workflow (Service Connect)
• Others
• Notify Me (Used with Enterprise Search)
• Setters
• Set By Query
• Base processing for creating completely new business logic which is used instead of the business logic developed
by Epicor. Users are encouraged to work with Epicor CSG (Custom Programming Group) or an authorized
partner organization before replacing a base method.
• Create Programming environment using the Programming Interface Generator form.
• Create any kind of Expression constructions for use with BPM/BAQ sub-systems, including complex ones.
Important Advanced BPM User rights are not available to Epicor Cloud ERP - Multi Tenant Users,
as freeform C# code may introduce a security risk for access of data outside of the tenancy. Use of C# in
BPMs is regulated, and requires advanced approval from Cloud Operations to ensure conformity with our
security and operational standards. Most common business requirements for reading and writing data
within the tenancy restrictions can be accomplished by using the built in interface. To request a feature
requiring BPM Advanced User rights, contact Epicor Professional Services or an authorized Epicor partner.
You can also submit a request to [email protected] for deployment.
A service-oriented approach ensures the reduction of complexities in terms of how business systems are built
and operated. In an SOA, business logic is software processes broken down into a series of loosely coupled
granular "business services" which are then made available and discoverable on a network.
Each service provides functionality you can adapt to the needs of the enterprise, but also hides the underlying
implementation details. By exposing business processes, SOA provides the ability to streamline those same
processes, which in turn promotes agile change management. In a SOA, because business processes are broken
down into smaller functions you can easily access and manipulate, it becomes that much easier to have your
business system represent your business rules.
Epicor True SOA™ considers both server business logic and client business logic as "business services".
Most business processes, no matter how much they lend themselves to automation, need to pause and proceed
after some condition is met or a user intervenes. One of the benefits of BPM is its integration with various
applications to provide a lean, inclusive business process. For example, in conjunction with Epicor Service Connect,
BPM provides real-time, event-driven workflow orchestrations, process automation, and application integration
without the need for programming. BPM delivers a flexible tool in support of continuous performance initiatives
like Lean and Six Sigma, by making software more agile to build custom business rules and then manage those
rules at a business level.
The main reason you should use BPM in a SOA environment is that you can customize your business processes
without modifying source code. Instead of customizing the system to match your business requirements, you
configure the system to match them.
This topic outlines the standard communication model between client and server, without a BPM intervention.
BPM directives work by intercepting calls to the application server logic. They are embedded into server logic and
get invoked by method calls. You can validate, manipulate, or create workflows based on the data passed through
the application. Because BPM methods are server side customizations, you can change business logic without
modifying the source code.
The key elements of using BPM directives within the application include the following:
• A user performs an action in a program.
• The program calls a business object method to carry out the action.
• Before the business object executes its program code, Pre-Processing directives are executed.
Note If at least one non-empty Base Processing directive is in effect, the Base Processing directive will
run instead of the Epicor program code.
Important Epicor strongly recommends you do not create Base Processing directives. If you change a
base method incorrectly, you can harm the normal function of the application. This option is mainly
included for partners, consultants, and power users who need to directly modify the method for major
business modifications. Work with an Epicor consultant before you create a base processing method
directive.
• After the Pre-Processing directive, the Epicor program code performs its function, or Base directives are
executed.
• When data transaction is about to be applied to the database, In-Transaction directives are executed.
• After the Epicor program code or Base directive is run, Post-Processing directives are executed.
• Standard data directives are executed with accumulated transaction database changes passed to them.
• Data is returned to the program according to the actions run by the directives and Epicor program.
You can use Business Process Management to send an email based on a business process.
Example You would like to assign specific values to suppliers. When a user creates or updates a supplier
record but does not assign a supplier group to it, you want the Epicor application to automatically assign
the ISO 9000 Certified supplier group to the record.
Then you can use BPM to generate an email informing the recipient the default supplier group was assigned
to the supplier record.
To create a directive to send an email, use the Send Email BPM workflow action and specify the following
statement:
Send email asynchronously based on the designed template with rule
Note Since the email is sent after the record successfully updates, sending an email is typically a post
process on an Update method.
You can send an email either synchronously or asynchronously. This indicates how the Epicor application handles
email generated by this action.
Available options:
• Synchronously - The email is sent when the action executes.
• Asynchronously - Asynchronous execution means the action is processed automatically by the BPM system
tasks running behind the scenes. The system task runner performs calls to the server every 20 seconds and
processes all asynchronous actions in the queue. Users cannot configure this system task.
When you select the designed item, the Design Email Template program launches to define the email. Use
this program to build an email message that generates when BPM executes this action.
The template looks similar to any type of email with From, To, CC, BCC, Reply to, Subject and Email body. Many
of the fields in the template can contain values from the current directive record.
You can also insert field and table variables into these email messages. You do this by designing a Simple Query
that pulls in these values from fields. You use the Design Simple Query program to leverage this functionality.
Launch this program by right-clicking the Text field and selecting either the Field Query or the Table Query
options.
If Field Query is designated, you can select one field from any table in the current method's parameters. When
the application executes the directive action, a comma separated list of values from the query displays in the
message body.
If Table Query is designated, you can select more than one field from any table in the current method's
parameters. The application inserts table formatted values for each row query returns, including a header row.
Execution Rule
Click the with rule link to launch the Execution Rule program.
If the data transaction supports multiple dirty rows (rows that contain unsaved data), you can use this program
to select how the action performs. This variable is not visible if the method data transaction does not support
multiple dirty row updates.
In this workshop, create a method directive to send an email when customer information changes. For example,
you can send a customer an email to verify changes to their address information or notify a sales representative
a customer has been approved.
Important Before you run this workshop, ensure that the SMTP Server that distributes email throughout
your company is defined in Company Maintenance. Much like a post office receives your mail and then
delivers it to various locations; the SMTP Server also receives your company’s email and then distributes it
through your company’s email application – for example, Microsoft® Outlook®.
If necessary, contact your system administrator for help.
Key concepts:
• Use the Post-Processing BPM workflow action to automatically send email when the master record changes.
• Build an email message.
• Insert a field variable into the email message.
4. In the Where Method Name Starts At field, enter U and press the Search button.
7. In the Directive Name field, enter XXX Send Email (where XXX are your initials).
8. In the Group field, enter XXX (where XXX are your initials).
9. Click Save.
2. In the workflow items tollbar, click the Send Email icon and drag it to the workflow pane of the Designer,
below the Start item.
4. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the Send
Email element entry points.
The connection between the two elements is now established.
5. In the Actions pane found at the lower portion of the screen, view the Action statement:
send email asynchronously based on the designed template
7. Click designed.
The Design Email Template program displays.
17. In the Fields list, search for and select the CustID check box.
22. In Method Directives form, select the Enabled check box to activate the directive.
4. Click Save.
You can now modify the directive to send an automatic email message to a customer to verify their record is
correct.
9. From the Fields list, search for and select the EmailAddress check box.
11. In the line 2 of the email text, add the following additional message to the text: Your customer information
has been updated.
2. On the Customer > Detail sheet, in the Email field, enter your email address.
3. Click Save.
The message is sent by BPM.
Disable Directive
2. In the tree view, select the Post-Processing directive XXX Send Email.
3. In the Post-Processing > Detail sheet, clear the Enabled check box.
Updatable BAQ directives initiate BPM actions based on method calls launched from an updatable BAQ. An
updatable BAQ is a customized query tool that displays on smart client dashboards and mobile device dashboards
through which users can update and add data; like a business object, BAQ methods are required so the database
can be updated. An updatable BAQ directive can be run before, after, or in place of the BAQ method call.
When you create an updatable BAQ, the application writes a base processing directive for the update method.
The directive uses the BPM code to update the database according to the settings defined in the Business Activity
Query Designer. You can edit this code to customize the update process, or you can add pre-processing, base
processing, and post-processing directives to the methods associated with the BAQ.
Each updatable BAQ has the following methods:
• GetList – Retrieves the data specified by the query.
• GetNew – Creates an empty row where a new record can be entered and submitted to the database.
• RunCustomAction – Runs a custom BPM action you define through both the BAQ and BPM functionality.
• Update – Performs database updates, refreshing the data to include changed and added rows.
• FieldUpdate - This method occurs after the user's change to a field is committed. You can use this method
to perform additional processing against the changed row. For example, when you enter a part number, you
want the part description field to populate automatically.
• FieldValidate - This method occurs before the proposed change to a field is committed. You can use this
method to validate proposed changes. For example, you can prevent users from entering an incorrect value
in a certain field such as non-existent state.
In this workshop, use the directive to populate the contact’s address information with the customer’s address
information when the user creates a new contact within the Customer Contact Update dashboard.
Key concepts:
• Publish columns from a custom dashboard BPM directive will monitor.
• Add a directive to the updatable BAQ.
Note In order to complete this workshop, you must be provided with BAQ Advanced User rights granted
in User Account Maintenance. For more information, contact your system administrator.
2. In the Dashboard Tree View, select the zCustomer01:Customer Tracker Query query.
5. In the Publish Columns list, accept the columns that have already been published out of the query and
select the check boxes next to the following column names:
Column Name
Customer_Address1
Customer_City
Customer_State
Customer_Country
3. Click the BPM Directives Configuration to access the Updatable BAQ Method Directives.
In the Tree view, notice the list of methods; each of these methods can be monitored through Business
Process Management (BPM) directives.
2. In the Directive Name field, enter XXX-Auto Populate Contact Address (where XXX are your initials).
1. In the workflow items tollbar, click the Set Field icon and drag it to the workflow pane of the Designer,
below the Start item.
2. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the Set
Field 0 element entry points.
4. In the Actions pane found at the lower portion of the screen, view the Action statement:
set the specified field of the changed row to the specified expression
12. In the Available variables Tree View, expand the Call Context > callContextBpmData node.
14. Click the Check Syntax button to validate the expression. Use this feature to verify the expression is available
for use within the directive.
18. Add another three Set Field actions and connect them in the order they follow.
You may use the image displayed in the previous task for the reference.
19. Use steps 4 - 15 to set up each Set Field Action in order to populate the remaining fields published from
the dashboard.
Use the following table to set the action variables:
20. Once complete, click Save and exit the BPM Workflow Designer.
Return to Updatable BAQ Method Directives.
Test Directive
5. In the Customer Tracker Query grid, select the customer record for Addison.
7. Click New.
A new row is added to the Customer Contacts grid.
8. In the grid, scroll to the right and verify the address information from the customer record is added to the
contact’s address fields.
Disable Directive
2. Click BPM Directives Configuration to access the Updatable BAQ Method Directives.
3. Locate the XXX-Auto Populate Contact Address post-processing directive you created for the
Ice.<CompanyName>/UpdateCustomerContact.GetNew method.
5. Click Save.
6. Exit both Updatable BAQ Method Directives and Business Activity Query Designer.
You can use a BPM to control the properties of text users enter in Epicor forms.
Key concepts:
• Use method directive to build a workflow utilizing the Execute Custom Code action.
• Use Set Field action to modify text properties.
5. Click Search.
7. Click OK.
10. In the Directive Name field, enter XXX - Set Code Case to CAPS (where XXX are your initials).
11. In the Group field, enter XXX (where XXX are your initials).
2. From the Setters pane, select the Set Field action and drag it to the right of the Start element.
3. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the Set
Field element entry points.
The connection between the two elements is now established.
9. From the list of Available variables, select Temp-tables > ttShipVia (ds.ShipVia).
13. In the Editor window, remove the blank space and the BPM function so the expression looks like this:
ttShipViaRow.ShipViaCode.ToUpper()
14. Click the Check Syntax button and verify the expression reports no errors.
16. Click the Validate button and verify BPM reports no errors.
18. In Method Directives form, select the Enabled check box to activate the directive.
1. Click New.
2. In the Code field, enter xxx in lowercase letters (where xxx are your initials).
4. Click Save.
The BPM is fired and changes the ShipVia Code to upper case.
2. Verify the record in focus is XXX - Set Code Case to CAPS (where XXX are your initials) defined for the
business method ShipVia.Update.
4. Click Save.
Use BPM Data Form Designer to create forms invoked by BPM method directives.
The range of forms created using the BPM Data Form Designer can vary from a simple dialog with two buttons
(for example, Abort and Continue) to a dynamically generated form. The form can include a set of data entry
fields and allow entry of auxiliary data BPM uses to assign to data fields in the main dataset.
BPM data forms are intended to capture data or button actions to control a flow of BPM processing. You can
use this function to conditionally present a form (for example, only for a specific customer) to capture the specific
data required against a transaction for that customer.
Example You can design a form, which is invoked when some user action results in a negative inventory
balance. In this case, when the user tries to save the changes, the BPM data form displays and states "This
action will result in negative inventory balance". The user has two buttons either to continue or abort the
action.
You can call the BPM data form from a BPM method through the specified BPM directive. To call the BPM data
form from a specified method, use the workflow item Call BPM Data Form.
In this task, create a BPM data input form to demonstrate how to enter consistent User IDs when setting up a
new user. This concept can be applied to a number of master table entry programs. To do this, you need to plan
what information is required to create a consistent ID, create the input form, create the BPM to call this input
form, and pull the user entered data to automatically create the new ID.
Key concepts:
• Create a BPM Data Input Form to prompt the user for information.
• Use BPM data in formulas within a directive.
• Understand how the GetNew method operates.
Field Data
FormID XXXUserPrompt (where XXX are your initials)
Form Title User Prompt
Form Text Enter User Information
Field Data
Field BPMData.Character01
Field Label First Name (delete "Field1:")
Field Format x(20)
Mandatory Select this check box.
6. Click Save.
Field Data
Field BPMData.Character02
Field Label Last Name (delete "Field2:")
Field Format x(25)
Mandatory Select this check box.
9. Click Save.
10. From the Actions menu, select Test BPM Data Form.
11. Enter your first and last name and click OK.
The testing form disappears.
4. In the Where Method Name Starts At search box, enter GetNew and click Search.
2. In the Directive Name field, enter XXX-Load BPM Form (where XXX are your initials).
3. In the Group field, enter XXX (where XXX are your initials).
4. Click Save.
6. In the workflow items tollbar, click the Call BPM Data Form icon and drag it to the workflow pane of the
Designer, below the Start item.
7. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the Call
BPM Data Form element entry points.
The connection between the two elements is now established.
9. In the Actions pane found at the lower portion of the screen, view the Action statement:
Call the named BPM Data Form using no customization always
13. In the workflow items tollbar, click the Enable Post Directive icon and drag it to the workflow pane of
the Designer, below the Call BPM Data Form item.
14. Click your mouse, select any of the Call BPM Data Form outbound connector symbols, drag the line and
point it to any of the Enable Post Directive element entry points.
17. In Method Directives form, select the Enabled check box to activate the directive.
2. In the Directive Name field, enter XXX-Set User Data (where XXX are your initials).
3. In the Group field, enter XXX (where XXX are your initials).
4. Click Save.
6. In the workflow items tollbar, click the Condition icon and drag it to the workflow pane of the Designer,
below the Start item.
12. Verify the Pre: radio button (Pre processing directive) is selected.
13. In the Directive field, select XXX-Load BPM Form (where XXX are your initials).
2. Select the Condition element; click and drag a connection line from the True arrow to the Show Message
element.
6. Now in the text field, enter Your post-processing directive works! (or something similar).
7. Click OK.
2. Click Save.
3. Click OK.
The PostMsg1 displays.
Your new BPM Form is working.
4. Click OK.
3. From the Setters panel, drag the Set Field action and place it below the Show Message. Connect both
actions.
4. In the action pane found in the lower portion of the screen, view the Action statement:
Set the specified field of the changed row to the specified expression
6. From the list of fields, select UserID and click OK. Verify the statement now reads:
Set the ttUserFile.UserID fields of the changed row to the specified expression
7. Now construct a UserID using the first letter of the first name and the last name. Click the specified link at
the end of the statement.
8. In the Specify C# expression window, from the list of Available variables, expand CallContextBpmData
and double-click Character01.
13. Click Check Syntax and verify the expression reports no errors.
1. Drag the Set Field action and place it below the first Set Field action.
4. From the list of fields, select Name and click OK. Verify the statement now reads:
Set the ttUserFile.Name field of the changed row to the specified expression
5. Now construct a Name using the values entered in both Character01 and Character02 fields. Click the
specified link at the end of the statement.
6. In the Specify C# expression window, from the list of Available variables, expand CallContextBpmData
and double-click Character01.
8. Now add a space between the first and last name. After the + sign, enter " ". Make sure you leave space
between the brackets.
11. Click Check Syntax and verify the expression reports no errors.
13. At this stage, you can add two more Set Field actions into the workflow and build the following expressions:
The above two expressions assign personalization privileges to the user and allow usage of the Epicor
Enterprise Search application.
2. Click Save.
2. Enter your First Name and Last Name and click OK.
5. Click the Options tab. Verify the Allow Personalization and Allow Enterprise Seach privileges are
enabled for the user.
6. To complete creation of a new record, a user must be assigned to at least one company and site. Click New
> New Company. Assign the user to any existing company and site and click Save.
Disable Directives
Maximize Method Directives.
3. Click Save.
Data Directives
Data directives initiate BPM actions based on updates to a specified table. A data directive can be run during the
data transaction, which can affect the information entered within the database, or it can be run after the data
transaction is placed within the table.
Two types of data directives include:
• In-Transaction - Affects data while it is being saved to the database. This directive type can only process one
row at a time; it cannot process multiple dirty rows. In-Transaction data directive executes within a transaction,
in the body of the trigger procedure.
• Standard - Does not affect data in the database. A Standard directive executes after a data transaction is
saved to the database. This directive type processes multiple dirty rows modified in the database. It runs after
base methods and method directives. Standard data directives are intended for audit purposes, for example
they can write some information to the application log.
In this workshop, prevent users from using the same PO number more than once per customer in Sales Order
Entry. Apply the in-transaction data directive on the OrderHed table and use an C# code to enforce that a PO
number is used only once per customer.
Key concepts:
• Use a data directive to monitor a field value.
• Throw an exception using the C# code.
Important This workshop requires a user is provided with Advanced BPM User rights. Due to security
restrictions, these rights are not available to Epicor Cloud ERP - Multi Tenant users. If you are using an
Epicor Cloud ERP - Multi Tenant environment, skip this workshop.
4. Click Search.
2. In the Directive Name field, enter XXX-PO used once per customer (where XXX are your initials).
3. In the Group field, enter XXX (where XXX are your initials).
5. In the workflow items tollbar, click the Execute Custom Code icon and drag it to the workflow pane of
the Designer, below the Start item.
6. Click your mouse, select any of the Start connector symbols, drag the line and point it to any of the Execute
Custom Code element entry points.
The connection between the two elements is now established.
8. In the Actions pane found at the lower portion of the screen, view the Action statement:
Synchronously execute custom code ...
DuplicatedPOForCustomer.OrderNum));
}
Important When you copy and paste the above code from the pdf version of this course, you may
need to adjust it to make sure logical statements are kept together on their respective line.
Tip You may refer to the below image to view how the above C# code should be properly placed
within the complier.
13. In the Actions pane, verify the Action field displays the following:
synchronously execute custom /*Prevent Using Same POs per Customer*/... rec
ord nothing
14. Click the Validate button and verify BPM reports no errors.
16. In Method Directives form, select the Enabled check box to activate the directive.
1. Click New.
5. Click Save.
Disable Directive
2. Verify the record in focus is XXX-PO used once per customer (where XXX are your initials.
4. Click Save.
You can use the Invoke BO Method action to call Business Object (BO) methods from within a directive.
This action eliminates the need to perform call to different BO methods using custom code, as this approach
requires knowledge of C# programming language.
In order to prepare or receive data from the BO method call, you typically use directive level variables and table
actions - Fill Table By Query and Update Table by Query. You can use directive level variables to supply data into
external method parameters, reference them across available conditions and actions, pass and receive data from
BO call actions or to hold intermediate results during directive execution. Note that usage of directive level variables
is limited to the directive where they were defined. Intermediate data they hold can not be passed between
multiple directives.
The table actions introduced in this course section are used to add (Fill table by Query) or update data (Update
Table by Query) within an in-memory table. In-memory table can be either a temporary table (ttTable) passed as
an argument to the Business Object method, or, it can be a directive-level variable of Tableset type.
In this workshop, assume that on a customer record, a value in the City field has been modified. You want to
alert the sales department within your company that any open orders for that customer should be updated to
reflect this change. To log the information, use one of the delivered user-defined tables UD01.
Key concepts:
• Create a directive level variable
• Create a BPM Query referencing both in-memory (records being updated) and standard database tables
(existing records)
• Prepare data for the Business Object method call
5. Click Search.
6. In the Search Results grid, select the Update method and click OK.
9. In the Directive Name field, enter XXX - CustomerAlert (where XXX are your initials).
10. In the Group field, enter XXX (where XXX are your initials).
1. On the Pre-Processing > Detail sheet, click Design to launch the BPM Workflow Designer.
b. Connect the Condition's True outbound exit to the Fill Table By Query action.
c. Connect the Fill Table By Query action to the Invoke BO Method action.
Configure Condition
Configure the condition to fire the directive when a city is changed on a customer master record.
2. In the Condition pane at the bottom, click the Add Line icon.
4. Click specified.
1. In the designer canvas, click the Invoke BO Method action to select it.
2. In the Actions pane found at the lower portion of the screen, view the Action statement:
Invoke specified BO method with specified parameters
4. Since user-defined tables belong to framework part of the application, on the Choose BO Method window,
select System.
7. Click the second specified link to configure what data will be passed as parameters to this method.
8. Notice the first parameter of this method named ds (dataset). This parameter uses the INPUT-OUTPUT
direction, which indicates the method receives data from this parameter and potentially returns the updated
data into the variable of the same type.
Note If you know the type of required variable in advance, you can use the Variables tab within the
Designer to create it. In this example, use another way of creating a directive level variable directly
from within the action where it will be used.
9. For the ds parameter, click the Binding drop-down list and select create new variable.
10. In the Create new variable window, notice the required variable Type defaults in.
In this case, the required type is Ice.Tablesets.UpdExtUD01Tableset.
12. Now specify the two INPUT parameters which pass data into the method. These are required parameters
that must be supplied.
13. For the continueProcessingOnError parameter, invoke the Binding drop-down list. Notice the two available
options:
• create new variable - as discussed in previous steps, you would use this option to create a new variable.
In this case, the simple (scalar) variable of the boolean type would be created.
• expr: specified expression - use this option to launch the Specify C# expression window to compose
an expression assigned to this parameter.
d. Click OK.
This expression ensures the processing will not continue if an error occurs.
d. Click OK.
16. Now specify the two OUTPUT parameters which return data from the method call.
Note The Business Object method does not require any data from the parameters of this direction.
You can either assign these method parameters to variables of the same type, or, you can select the
[ignore] binding if you do not need to assign any value.
17. In this example, for both the errorsOccured and <return value> parameters, select [ignore].
19. In BPM Workflow Designer, click the Variables tab at the bottom. Verify the newly created variable is
present.
Note You can use this tab to create new variables, view existing ones, rename them, change their
types and to delete them.
1. In the designer canvas, click the Fill Table By Query action to select it.
2. In the Actions pane found at the lower portion of the screen, view the Action statement:
Use the designed query to insert data into the specified table with specified
mapping
6. Notice ERP.Customer and ERP.OrderHed tables automatically link. Select this link.
The Table Relations sheet displays.
9. Now apply criteria on the OrderHed table to only retrieve open orders.
2. From the Table drop-down list, scroll down and select UD01LogRecords.UD01.
This indicates you are inserting records into the UD01 table of the UD01LogRecords directive level variable.
3. Click OK.
2. For the Company column, from the Binding drop-down list, select field: ttCustomer_Company.
3. For the Key1 column, from the Binding drop-down list, select field: ttCustomer_CustID.
4. For the Key2 column, build an expression that stamps the current time.
b. Click the specified expression link to launch the Specify C# expression window.
c. From the Functions list, expand the Date branch and double-click Now.
This adds the following function to the Editor:
BpmFunc.Now()
d. Since the Key2 column expects the string type of data, you must convert the datetime format to string.
To do so, place the cursor right after the brackets.
e. From the Functions list, expand the Conversion branch and double-click x.ToString().
Verify the expression now reads:
BpmFunc.Now().ToString()
f. Click OK.
5. For the Key3 column, build an expression to ensure a unique key is created for each sales order that needs
to be updated. To accomplish this task, create a unique GUID for each row.
b. Click the specified expression link to launch the Specify C# expression window.
d. Click OK.
6. For the Key4 column, build the expression that marks all records created by this directive in the UD01 table.
This approach helps you to identify the source of data updates, if needed.
b. Click the specified expression link to launch the Specify C# expression window.
d. Click OK.
7. For the Character01 column, build an expression that alerts the users to update the affected sales orders.
b. Click the specified expression link to launch the Specify C# expression window.
d. Click OK.
8. For the RowMod column found at the bottom of the Columns list, build an expression that marks all records
as added to the table.
b. Click the specified expression link to launch the Specify C# expression window.
d. Click OK.
12. In Method Directives form, select the Enabled check box to activate the directive.
2. In the City field, delete the existing record and enter Green Bay.
1. Verify the records were updated into the UD01 table. Construct a Business Activity Query against the
Ice.UD01 table.
The data written in the user-defined table using the BPM directive would now be ready for further processing.
Disable Directives
2. Clear the Enabled check box for both XXX - CustomerAlert and XXX - UD01Update directives you
recently created.
BPM directives can interact with customizations, so you can leverage these tools together to address a business
need. BPM directives can both monitor and populate unique fields you have added to a customization.
Use this action to update data within an in-memory table. In-memory table can be either a temporary table
(ttTable) passed as an argument to the Business Object method, or, it can be a directive-level variable of Tableset
type.
Configure this action through the following process:
• First, design a BPM query. When you construct the query, you can reference both in-memory tables, such as
ttCustomer and standard database tables such as ERP.Customer. To complete the query, you must explicitly
set which columns you want to display in the result set. You can then use the query rows to update the
information within a target table.
• Specify which row set within an in-memory table is affected, when this action activates. You can select added
rows, deleted rows, updated rows, added and updated rows, changed rows, unchanged rows and all rows.
• Select a single in-memory table serving as the target for the data update.
Important If you need to update more than one table within a Tableset, for example, OrderHed and
OrderDtl, you must use two Update Table By Query actions within the workflow.
• Specify the relation between the target table and the BPM Query. This relation defines how rows returned
by the query are associated with existing table rows.
• Specify how data is assigned to the target table columns.
Note When this action executes, the data is first retrieved from a BPM Query. This data is then matched
with selected set of rows from a target in-memory table, for example, with added rows. This matching is
based on rows returned by the query and the relation specified between the query and the target table
defined on the Setup Table Mapping window.
In this workshop, create a BPM method directive that pulls additional fields from the part master into the sales
order line, when the part number is changed. This concept can be applied to a number of forms where changing
a key field should pull additional information from a master table specific to that change. For example, industry
specific fields like specification class along with numeric fields for grade can be pulled into the order line to match
customer requirements or custom pricing rules.
Key concepts:
• Understand how the ChangePartNumMaster method works.
• Use the Update Table by Query action to retrieve additional information outside the current dataset.
• Use conditions to handle new as well as changing rows.
1. Click the arrow at the bottom of the Epicor ERP window to display a toolbar. On the left side of this toolbar,
select the Developer Mode (the wrench) button. A line now appears through this wrench icon to indicate
Developer Mode is active.
Tip If you use the Classic Style menu, you activate Developer Mode from the Main Menu. Either click
the Developer Mode button on the top toolbar or click Options > Developer Mode.
3. In the Select Customization window, review the Default Customization Programming Language
section. Verify the C# option is selected.
4. If you are using an on-premise environment, you can select Base Only and click OK. If you are using an
Epicor Cloud ERP environment, review the Available Layers tree view. Select the SalesOrderForm icon
and click OK.
Sales Order Entry displays. You can now create a customization using the base form.
5. Add a GroupBox:
c. In the Customization Tools Dialog window, from the Tools menu, select ToolBox.
This displays the ToolBox you use to add controls to the sheet.
e. Click in the space below the Adv Bill Bal field. If the Select Layer Type window appears, select
Customization and click OK.
f. Draw the epiGroupBoxC1 group box so it fits two fields inside it.
You can use the handles (the white squares) on the control to adjust the size of the group box.
g. In the Customization Tools Dialog, locate the Text property and change the group box caption to
display BPM.
a. If the Toolbox is not displayed, return to the Customization Tools Dialog window. From the Tools
menu, select the ToolBox.
e. Position the text box into the top-right portion of the group box.
b. Click inside the Adv BPM group box, below the TextBox.
8. Add Labels:
f. Return to the Properties sheet. In the EpiControl section, locate the EpiLabel property.
g. Click the down arrow next to this property. Under the Suggested node, select epiLabelC1.
h. Repeat substeps a. - g. to create another label for EpiNumericEditor. For the Text property, use NUM
10. For EpiLabel property, select epiLabelC2.
10. For Name, enter XXX_AdvBPM (where XXX are your initials) and click Save.
14. Select the XXX_AdvBPM customization (where XXX are your initials) and click OK.
15. Deactivate the Developer Mode and minimize Sales Order Entry.
2. On the General, view the Query Phrase. Notice the fields being returned from the query include PartNum
and two User fields. The query is configured to only return records for specific parts, such as MP-1018,
MP-1019 and MP-1020.
4. Click the Get List button to return rows from the Part table.
6. In the Directive Name field, enter XXX-Change PN Enable Post (where XXX are your initials).
7. In the Group field, enter XXX (where XXX are your initials).
8. Click Save.
10. In the workflow items tollbar, click the Enable Post Directive icon and drag it to the workflow pane of
the Designer, below the Start item.
14. In Method Directives form, select the Enabled check box to activate the directive.
6. In the Directive Name field, enter XXX - Set PN User Data (where XXX are your initials).
7. In the Group field, enter XXX (where XXX are your initials).
8. Click Save.
10. In the workflow items toolbar under the FlowChart category, click the Condition icon and drag it to the
workflow pane of the designer, below the Start element.
12. Click the Condition workflow element and click the New icon.
2. Select the Condition element; click and drag a connection line from the True arrow to the Show Message
element.
6. Now in the text field, enter AdvBPM Post Msg 1 - Directive fired (or any other descriptive text).
7. Click OK.
9. In Method Directives form, select the Enabled check box to activate the directive.
Add an Action
Add an action that takes the field values from the Part Master table and populates the fields on the Order Line
based on the selected Part Number.
1. In the workflow items toolbar under the Setters category, click the Update Table by Query element and
drag it to the workflow pane of the designer.
2. Connect the True side of the Condition to Update Table by Query element.
3. Click the Update Table by Query workflow element and view the statement:
Use the designed query to update all rows of the specified table with specified
mapping
4. Click designed.
7. Click and drag the Erp.Part table onto the design canvas.
8. Now click the Display Fields tab and add the following columns to the list of Display Column(s):
• Company
• PartNum
• UserChar1
• UserDecimal1
10. Click the all rows drop-down icon and from the list, select added and updated rows.
1. With the Updateble Table by Query action in focus, click the specified (mapping) link.
The Setup Table Mapping window displays.
2. First, create relations between the table and the query as per the below table. To create a new row, click
the Add Relation icon.
3. In the columns filter, enter ShortChar and locate the ShortChar10 field.
4. From the Binding drop down list, select the specified expression option.
5. You will use the If-Then-Else condition for this field. From the list of Operators, expand Condition.
6. Double-click on x ? y : z condition.
7. Verify the cursor is placed inside parenthesis. Now from the list of Available variables, double click on
Query row > Part_UserChar1.
8. Now add not equal empty string formula by modifying the expression as per below:
(queryRow.Part_UserChar1 !="")
9. Place your cursor after ? and from the list of Available variables, double click on Query row >
Part_UserChar1 again.
13. In the columns filter, enter Number and locate the Number10 field.
15. You have finished the table mapping. Click OK to close the Setup Table Mapping window.
1. From the Setters pane, select Set Field and drag is to the right of the Condition element.
2. Drag and arrow from the False side of the Condition element to the Set Field element.
10. Now add another Set Field element and place it to the right of the Set Field 0 item.
20. Select the Enabled check box and Save the directive.
5. On the Lines > Detail sheet, for Part Number, enter either MP-1018, MP-1019, or MP-1020. These parts
have the UD fields populated in the test database.
6. Note the Fields in the AdvBPM group box display the values from the Part table.
These values are taken from Part_UserChar1 and Part_UserDecimal1 fields. You can use an existing
updatable BAQ to modify the existing values and verify the changes are reflected on the sales order form.
7. Change the Part Number to a Part Master part that does not have User fields populated. For example, enter
DSS-1010.
14. Navigate back to Method Directives and disable the XXX-Change PN Enable Post directive.
You can create custom external methods using the C# or Visual Basic .NET programming languages. Through
this feature, you can implement complex external methods that extend or replace the functionality on server-side
application business logic.
You can create external methods for method, data, and updatable BAQ directives. These custom BPM external
methods are public, typically static methods that accept the same parameters as the method you are extending.
Because of this, custom external methods are directly integrated with the Epicor application.
Important This functionality is only available if your user account has BPM Advanced User permissions.
Advanced BPM User rights are not available to Epicor Cloud ERP - Multi Tenant Users, as freeform
C# code may introduce a security risk for access of data outside of the tenancy. Use of C# in BPMs is
regulated, and requires advanced approval from Cloud Operations to ensure conformity with our security
and operational standards. Most common business requirements for reading and writing data within the
tenancy restrictions can be accomplished by using the built in interface. To request a feature requiring BPM
Advanced User rights, contact Epicor Professional Services or an authorized Epicor partner. You can also
submit a request to [email protected] for deployment.
You begin by creating a custom action within the BPM module. You do this by generating a class within a method
that has a suitable signature. You then open the generated class within a .NET environment where you enter the
code for the custom external method. Lastly, you deploy the custom external method to the application. You
can then use the custom external method with either a method directive or an updatable BAQ directive.
Through this feature set, you can also create Service Connect workflows for method, data, and updatable BAQ
directives. By creating these workflows, you can set up directives that move data out of the Epicor application.
This integrates the data generated by this directive with the Service Connect application. Once this data is available
in Service Connect, you can then link it to another Epicor application or a third-party application for display and
use.
This part of the course describes how you use the BPM tools to create and enter custom code. However, specific
details about the C# or Visual Basic .NET languages are beyond the scope of this course. For more information,
refer to the various reference guides and training manuals available for the programming languages or contact
your Epicor Account Manager.
In this workshop, learn how to build an external method, deploy it to the server and call it from within the BPM
workflow.
To successfully complete this workshop, Microsoft® Visual Studio® 2010 or later must be installed and operational
in your environment.
Important This workshop requires a user is provided with Advanced BPM User rights. Due to security
restrictions, these rights are not available to Epicor Cloud ERP - Multi Tenant users. If you are using an
Epicor Cloud ERP - Multi Tenant environment, skip this workshop.
within a method that has a signature which matches the signature of the business object for which you are
creating the external method. You launch the Method Arguments window from either Method Directives
Maintenance or Updatable BAQ Directives Maintenance.
Navigate to Method Directives.
Menu Path: System Management > Business Process Management > Method Directives Maintenance
Important This program is not available in Epicor Web Access.
1. Click the Method Code button to find and select the method that you need.
Example The example used in this workshop uses the Erp.ABCCode.Get List method.
1. Click the Create Programming Interfaces... button to launch the Programming Interface Generator
Form.
2. In this example, verify the .Net Assembly [C#] radio button is selected.
Notice the C# code shell for the custom action is generated on the .NET Action Template - C# sheet.
3. Click Save.
5. Navigate to the folder where you create your external assemblies. Typically this is application server directory
path location Server\Customization\Externals.
8. Exit the Programming Interface Generator Form and minimize Method Directives window.
In this example, enter the programming logic for a custom AbcCode.GetList() external method written in C# .NET
to filter out all records where AbcCode starts with an "A".
® ®
1. Launch Microsoft Visual Studio .
3. Select the code in the Class1.cs and replace it with your copied code.
4. Right-click the References node in the Solution Explorer and add the following references:
• Epicor.ServiceModel - C:\inetpub\wwwroot\ERP10\Server\Bin\Epicor.ServiceModel.dll
• Epicor.System - C:\inetpub\wwwroot\ERP10\Server\Bin\Epicor.System.dll
• Erp.Contracts.BO.ABCCode -
C:\inetpub\wwwroot\ERP10\Server\Assemblies\Erp.Contracts.BO.ABCCode.dll
• Erp.Data.910100 - C:\inetpub\wwwroot\ERP10\Server\Assemblies\Erp.Data.910100.dll
• Ice.Data.Model - C:\inetpub\wwwroot\ERP10\Server\Assemblies\Ice.Data.Model.dll
• System.Data.Entity -
C:\ProgramFiles(x86)\ReferenceAssemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.Data.Entity.dll
5. Click each Epicor reference and in the Properties pane, set Copy Local property to False.
6. At the top of the Class1.cs code, change using System.ServiceModel to using Epicor.ServiceModel.
7. Write the custom business logic in the body of the method. In this example, you are creating a post-processing
directive for AbcCode.GetList() to filter out all records where AbcCode starts with an "A" value. Edit the
GetList method to look like this:
a. On the Application tab, for Target network, select .NET Framework 4.6.1 (or the latest .NET framework
currently supported by Epicor).
c. Click the Reference Paths tab and add paths to the Epicor Assemblies and Bin folders.
10. Save your solution and click Build > Build Solution.
3. In the Directive Name field, enter XXX-CustomGetList (where XXX are your initials).
4. In the Group field, enter XXX (where XXX are your initials).
6. From the Callers group, click and drag the Invoke External Method item to the workflow design area.
7. Click and drag a connection from the Start item to the Invoke External Method item.
9. Next select the external method you have created. Click the external link.
The Add Reference window displays, showing the custom external methods you have created and deployed
to the External Storage folder. Typically its directory path is the Server\Customization\Externals location.
Select the custom external method from the list.
10. Select your custom external method from the list and click OK.
11. Now click the specified method link and select method you want to invoke. In this example, the GetList
method is selected.
12. Notice the two additional columns displayed for your information. The Is Static column displays Yes when
the assembly method is static. Otherwise, No is displayed.
13. The Requires BPM Context column displays Yes if a BPM Context is passed over to the selected external
method. If the method does not utilize a BPM Context data, the column displays No.
Tip Within an external method accessing the BPM context, the BPM context parameter must be
declared as its last parameter. For example:
14. At this stage, your workflow should look similar to the following.
16. On the Detail sheet, select the Enabled check box to activate the directive.
3. The Cycle Count/Physical Inv > ABC Codes > ABC Code Detail sheet activates.
7. Notice in the Search Results, the "A" ABC code does not display as an option. Through your external method,
users can no longer select this filtered ABC code.
Your result should look similar to the following:
Disable Directive
2. Verify the record in focus is XXX-CustomGetList (where XXX are your initials).
4. Click Save.
To complete the Business Process Management (BPM) functionality, the module includes programs that help
manage your method directives. You can export your directives to another location where they can then be
imported into another system. You can also update the directives.
Groups
This functionality requires you use groups. Each group contains related method directives. By placing related
method directives together, you can easily export, import, and update the directives.
You create and select groups within the Method Directives, Data Directives, or Updatable BAQ Method Directives
programs. The Detail sheets in these programs all have a Group field. Use this field to create new groups or to
select existing groups. In either case, you define the group which the directive is placed inside for use in later
processes.
Recall within the previous workshops, you assigned each directive to a group represented by your initials. This
way, all directives you created belong to the same group, allowing you to import, export or update them all at
once.
Directive Export
Use Directive Export to export all method directives that belong to a selected group. These directives are then
exported to a single file at a location you define, so you can move your method directives to another installation
of the application.
Menu Path: System Management > Business Process Management > Directive Export
Important This program is not available in Epicor Web Access.
Directive Import
Use Directive Import to import a group of exported method directives into your application.
Menu Path: System Management > Business Process Management > Directive Import
Important This program is not available in Epicor Web Access.
Directive Update
Use Directive Update to perform the following actions:
• Using the Directive Update Setup sheet, you can update the properties and recompile the directives within
a selected group. You can run this program to apply some primary options to all the group directives; for
example, you can use this program to enable all the directives in the group.
• On the Directive Recompile Setup sheet, you can recompile the group of directives, optionally refreshing
signatures of the methods or tables they are attached to, in order to make them compatible with the current
version of the application.
• Using the SC Credentials Setup sheet, you can perform mass update of ESC server credentials stored in
directives. Typically, you need to update ESC credentials when running cross-company directives utilizing ESC
Workflow actions in a non-owning company.
Menu Path: System Management > Business Process Management > Directive Update
2. In the Directive Group field, select XXX (where XXX are your initials).
4. Select Desktop.
6. Click Save.
4. Click Open.
5. For the Destination Group, select XXX (where XXX are your initials).
If you have Microsoft® Visual Studio™ 2010 or higher, you can debug execution of custom code directives.
Important This process requires access to a server file system or an application database and therefore,
debugging of BPM directives is only available if you are using an on-premise environment (hosted within
your organization). Due to security restrictions, this option is not available to Epicor ERP Cloud users.
Prerequisites
This topic discusses steps you need take to before you start debugging.
The Epicor Customization Framework (ECF) supports two ways of storing generated assemblies. The preferred
method, which is either SQL BLOB (Binary Large Object) or File System Storage is defined in the Epicor ERP 10
web.config file within the customizationStorage provider property.
Before you start debugging, do the following:
• On the server your Epicor Application Server is running from, locate the folder for the application server you
want to debug from. If you don't know how to find this folder, you can use IIS Manager to locate it. Search
Windows programs to find the Internet Information Services (IIS) Manager program.
• Navigate to the application server web site which is located under Sites > Default Web Site node. Right-click
the application server name and select Explore.
• This will open a Windows Explorer file browser window in that location. The path may look as follows: C:\
inetpub\wwwroot\ERP102100\Server
• In order to load the program database (pdb) file that holds debugging symbols, verify the loadPdb property
found in the web.config is set to true and the intermediateFolder path is set to the Server BPM folder.
Example The addition to web.config settings may look as follows:
<customizationSettings disabled="false" intermediateFolder="C:\inetpub\w
wwroot\ERP102100\Server\BPM" loadPdb="true">
• To reload customization assembly and debug symbols, restart IIS. Alternatively, only restart the Epicor ERP
application pool.
This topic explains how you can debug customization assembly compiled by the Epicor Customization Framework.
1. By default, sources are found in the BPM folder of the Server directory.
Note A different sources folder can be specified using the intermediateFolder attribute in the server
web.config file.
Make sure that the folder specified in the intermediateFolder attribute exists at the time IIS AppPool
used by the Epicor 10 application starts. Also, verify the account used by that AppPool has read and
write access to that folder. Otherwise, the setting is ignored and sources are saved in the system's
TEMP folder.
3. Open Visual Studio and do not open a solution. It must be a blank session so we can drag and drop files
on to a blank solution form.
4. From the most recent folder under the BO folder containing your BPM versions, select all of the .cs files,
then drag and drop on to the blank Visual Studio solution form.
5. All of the files will load into Visual Studio and can now be attached to a process.
6. From the Visual Studio tool bar menus, select Debug and then Options… For Debugging Options, make
sure the Enable Just My Code and Require source files to exactly match the original version options
are clear.
a. You may use the Performance and Diagnostics tool and find it under Live Memory Inspection.
b. Alternatively, in IIS manager, select the level server node and double-click the Worker Process icon.
8. From the Visual Studio tool bar, select Debug > Attach to Process. Attach the debugger to the w3wp.exe
process the application pool is running under.
9. Notice the Stop and Pause Icons are active on the top button bar. This means you are actively debugging.
Navigate to the program tab that has the name of your BPM included in it and set a break point.
10. Run the routine in the Epicor client. When the BPM customization is fired, the breakpoint is activated and
you can step through the c# code for the BMP in the in the Visual Studio debugger.
c. Launch the Epicor client again and regenerate the directive to update directive sources.
Tip By default, IIS7 app pool can only use 90 seconds span for a non-responsive application. During
IIS web application or website debugging time, you may want to change its corresponding application
Pool advanced setting's "Ping Maximum Response Time" to a time much longer, or turn off "Ping
Enabled" setting.
Conclusion
Congratulations! You have completed the Advanced Business Process Management course.