Professional Documents
Culture Documents
Chapter 10
Business Activity Manager
The Business Activity Manager (BAM) is a communication tool you can use to track data changes by monitoring
fields from selected tables within the database. As users enter and update data, an event is triggered. The Business
Activity Manager can then communicate this data event through change logs, global alerts, and automatically
printed reports.
Use the Change Log to view changes made to records throughout the database. Run these logs to track a list of data
updates made to pre-selected areas of sales orders, purchase orders, jobs, parts, and so on. You define which fields from
these records you want to monitor, so only changes important to your business processes are tracked.
Global Alerts are email messages automatically sent to a specific user or a defined group of users when certain events occur
within your company’s database. For example, you can set up a global alert that sends an email out to your sales staff when
a sales order is placed on hold. Global Alerts can also create system memos when these events occur. Several default global
alerts are provided by the application, but you can use the Business Activity Manager to create your own custom alerts.
You can extend BAM alert functionality by creating procedure programs. Use these programs to automatically generate tasks,
create .xml files from the changed data, and update data within multiple records.
Use the Auto-Printing functionality to automatically print out reports and labels when changes you define occur within a
table. This data is automatically sent to a printer – giving users either a preview display or a hard copy printout of the labels
or reports.
Lastly, you can define when these BAM events are triggered by setting up a series of rules. These rules define conditions
that limit how often change logs update, global alerts run, and auto-printed reports activate.
BUSINESS ACTIVITY MANAGER | CHAPTER 7
To do this, you first must create an Event. This event record defines the table and the fields monitored by the Business Activity
Manager. You then assign an Action, or Actions, that run when the event is triggered by a change in the data. If you need, you can
also add Rules to the event. These rules regulate when the event is launched, limiting it to specific changes within the database.
This section of the chapter explains the main features of this program. Later sections of this chapter explore change logs, global alerts,
and auto-printing through specific examples.
Main Menu Path: Executive Analysis > Business Activity Management > Setup > Business Activity Manager
Create an Event
You create an event on the Detail > Event sheet. Here’s how:
7. The field displays within the Selected Fields list. Any data within this field is now monitored by the event.
You can both add and remove multiple fields from the Selected Fields list. To add all the fields from the table, click the Double-
Right Arrow button. To remove a single field, highlight it from the Selected Fields list and click the Left Arrow button. To
remove all the fields from the event, click the Double-Left Arrow button.
Depending on the action(s) you select, you enter other items on this sheet – such as selecting the global alert’s recipients or defining
which automatic report prints out.
Create an Action
3. Select the Auto-Print check box if you want the data change to cause a report to automatically print. Selecting this check box
activates the Auto-Print fields.
4. The Email Address field defines from whom the custom global alert is sent. Enter an email address in this field.
5. Enter a Label for the custom global alert. This value is the title that appears in the Subject line for the email alert message,
for example, Job Change or Update.
6. Now enter the Alert Text for this custom global alert. This text appears within the alert message. Enter text that best
communicates the reason why this custom global alert was sent.
9. Click the Related button to find and select roles for the custom global
Use roles to define groups of people that perform
alert. All users assigned to the selected role receives the email alert. In
similar functions within your company. You create
this example, the ProductionPlanner and AlertGroup-ShpSupervisor roles
roles within Role Code Maintenance and then assign
are selected.
these codes to specific people within Workforce
Maintenance. For more information, review these
10. Use the To: field to define specific users that receive this custom global
program topics within application help.
alert. You directly enter user email addresses in this field.
11. Use the CC: field if you want additional users to receive a courtesy copy of this custom global alert. You directly enter user email
addresses in this field.
12. Click the Alert Program… button to find and select a custom procedure (.p) program that automatically runs when an alert is
sent. These optional programs extend the functionality of the global alert. For more information about this feature, read the
Global Alerts section later in this chapter.
13. After you find and select the Alert Program you want, its path and filename display in this field.
14. If you are setting up an auto-print action, the Report ID drop-down list becomes active. Select the identifier for the report that is
used to automatically print a report from this data. For more information, read the Auto-Printing section later in this chapter.
15. Select the Data Definition ID assigned to the generated report. This defines the customized report that automatically displays or
prints through this BAM event. The data definition indicates the tables and fields that populate a Crystal report or BarTender
label. For more information, read the Report Data Maintenance section later in this chapter.
16. When you finish defining the action, click Save on the Standard toolbar.
Create a Rule
• Blank – This option must be selected for the first rule. It causes all the other “And/Or” rules to run after it.
4. If you wish to nest two or more rules together, enter the Open Parenthesis “(“ character values you need here. You can enter
as many open parenthesis characters as you need. Use this functionality to define the beginning of a group of nested rules.
5. The Field Name (Evaluate, the first Field Name field on the row) displays the name of the field evaluated by the rule. The only
fields that display on this drop-down list are the fields selected on the Event > Detail sheet.
6. Use the Operator drop-down list to define how the evaluated field is compared with either a Constant field or the Field Name
(Comparison) field. The operator list that displays depends on the type of field that will be compared:
8. Use the Field Name (Comparison, the second Field Name field on the row) to define the value this rule uses to compare
against the Field Name (Evaluate) value. This field is available only if the Constant check box is clear and the evaluated field is not
a date field.
If this field is available, all the fields from the event’s selected table display on this drop-down list. Select the field you need.
9. The Value field defines the constant value used to compare against the table field. This field is available only if the Constant
check box is selected and the Field Name (Evaluate) being compared against is a value other than a date value. You can
enter the value you need for the condition in this field.
10. The Date field displays the specific date used to compare against the Field Name (Evaluate). This field is only available if
the Constant check box is selected and the Field Name that will be evaluated is a date value.
11. Select the From Today check box if the rule criterion is based on a number days from the current date (Today). This check box is
available only if the Constant check box is selected. Selecting this check box activates the Days From Today field.
12. The Days From Today field displays how many days, from the current system date (Today), are used to satisfy the condition for
this rule. This field is available if the From Today check box is selected. Enter a numeric value in this field.
13. If you wish to nest two or more rules together, enter the Close Parenthesis “)“ values you need here. You can enter as many
close parenthesis values as you need in this field; you can then end a series of nested rules.
14. To make sure your rules are valid, click the Test button. If the rules are
You must validate your rules after you add them.
correct, a green icon displays.
If the rules are not validated, the actions they
regulate do not run.
15. You can add as many rules as you need. When you finish, click Save on
the Standard toolbar.
This completes the overview of the Business Activity Manager program. The next sections show you specific examples about how to
create and use change logs, global alerts, and auto-printing.
11 12 13 14
Change Logs
You use a change log to track changes made to a specific record. Change logs are available for several areas throughout
the database.
During the example in this section, you use the Requested Due Date BAM created earlier in the chapter. You activate
a change log that monitors updates made to the Requested Due Date field on a job record.
You are ready to see if the change log is working correctly. To do this, launch Job Entry and change the Requested Due Date on a job.
Here is how:
5. Click Search.
5
6. All the open jobs display in the Search
Results grid. Select a job on this grid.
4
7. Click OK.
8. You return to 8
Job Entry.
10
13
15
You can now see the change you made to the job. Here’s how:
To do this, launch the Data Dictionary Viewer. Use this program to find out where For more information about the Data Dictionary
the information from the obsolete field is now currently stored. When you know Viewer, review Chapter 6: Customization Utilities
what changes were made, launch the Business Activity Manager to update the within the Epicor ICE User Experience and
fields monitored by the event. Customization Guide.
Global Alerts
Two kinds of global alerts are available within the application. One kind is a series of standard alerts activated through Global Alert
Maintenance. You cannot modify these standard alerts; you can only activate or inactivate them. Several standard alerts are
available, so review this list first to see if an alert you want already exists.
If an alert is not among the standard alerts, you can also create custom global alerts through the Business Activity Manager.
You define the fields that trigger the custom alert, the message that displays, the users who receive the alert, and so on.
The basics of how you create custom global alerts were described in the previous Business Activity Manager section. This section now
explores all aspects of global alerts – setup, default alerts, custom alerts, and alert (.p) programs.
You first need to define the email settings within Company Configuration.
Main Menu Path: System Management > Company Maintenance > Company
You use the System > General Settings sheet to define the SMTP Server that distributes email throughout your company. 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®.
The SMTP Server must be defined for each company within your Epicor
While the SMTP Server is required to send email,
application. Before you can send email within the current company, set up the
an Exchange Server is not required.
server on this sheet.
4. The Email Label field defines the default From label for all global email. This label automatically displays on standard and
custom global alerts. For this example, you enter Epicor Auto Mail.
5. The SMTP Server field displays the name of the SMTP Server. Enter the The application cannot authenticate or authorize
server that processes your company’s email. (using passwords and logins) email sent to the SMTP
Server. If your server does not permit Anonymous
6. The SMTP Port field displays the port number that handles your connections, you can set up a relay connection that
company’s email. This value is the port number on the SMTP Server. authenticates its connection before it is sent to the
For example, 25. SMTP Server.
7. When you finish, click Save on the Standard toolbar. This relay connection acts as a virtual server that
provides security for your actual SMTP Server. When
the mail is received by this virtual server, it is sent to
the SMTP Server. The global alerts email is then
distributed throughout your company. Be sure to
work with your Epicor consultant before you set up a
virtual server.
1
Activate Global Alerts/Email Server Process
To run global alerts, the Global Alerts/Email Server Process must be assigned to a schedule within the system agent. You create
schedules within System Agent Maintenance. You do not need to have email running when the global alert is sent. The global alert is
instead sent out when the process is run through the schedule.
The Global Alert/Email Server Process must run each time you start the
To learn how to create a new schedule, review the
application, so you must create a Start Up Schedule within System Agent
System Agent Maintenance section within
Maintenance that automatically runs this process.
Chapter 1: Automatic Data Processing.
Main Menu Path: System Management > Utilities > Global Alerts/Email Server Process
3. The Log Filename defines the path and the filename used to track the activity of this process. You can enter this path and
filename directly, or click the Log Filename… button to find and select it. Later in this chapter, the Global Alerts Log section
details how you can locate and display this log file.
4. From the Schedule drop-down list, select the Startup Task Schedule. The Global Alerts/Email Server Process must be scheduled
as a startup task.
5. When you select a schedule other than Now, the Recurring check box becomes available. Select this check box to indicate this
process is run on a regular basis.
The process is now added to the schedule. This causes the global alerts process to run when the Process Server and the Task Agent
are active.
BUSINESS ACTIVITY MANAGER | CHAPTER 74
Stop/Restart Process Server and Task Agent
To complete the global alerts setup, you next must stop and then restart both
Stopping the Process Server and the Task Agent does
the Process Server and the Task Agent for your database.
not push users out of the application. If you shut
down the main AppServer, however, users are forced
You use the Progress Explorer Tool to stop and restart these items.
to exit the application.
Here’s how:
3. Select Connect.
6. Click OK.
4
5
8 10
11
12
14
All the activity generated by the Global Alerts/Email Server Process is automatically recorded by the Global Alerts Log. You can use this
file to review this activity and troubleshoot issues that may occur during the global alert process.
You locate and open this file through Microsoft Windows® Explorer®. Here’s how:
2. Open the
GlobalAlertsEmail.log file.
17
For example, many virus applications block traffic on port 25 because this software assumes it is spam. You may need
to modify your virus protection so that traffic can travel through this port.
To check your SMTP Server, launch a DOS shell. At the command prompt, enter this command: telnet smtpservername 25
(or the port number you use). This should connect you to the SMTP Server. You can now enter “Hello” and press <Enter> to
see if you get a response.
• 550 Relaying Not Allowed – A common issue, this occurs because the application sends out the alerts and email without
any authentication. Most mail servers do not permit this mail to be sent.
You need to update your mail server so it can use relaying, or global alerts will not work. Most mail servers permit
relaying from a specific host. For example, you could identify that your system server needs to permit relaying. Global alerts
then work as expected.
You can launch Global Alerts Maintenance from several locations within the Main Menu. This program is available within the Setup
folders for these modules:
• Quote Management
• Order Management
• Accounts Receivable
• Accounts Payable
• Job Management
• Quality Assurance
In this example, Global Alerts Maintenance is launched from Production Management > Job Management > Setup >
Global Alert.
10. Use the CC: field to enter the email addresses of any people you want to receive a courtesy copy of this alert message. You can
enter as many email addresses as you need.
11. Enter any additional Text you want displayed with the alert message.
This global alert is now active within your application. Some global alerts require additional setup before
they can be used. These are the CheckOff Box alerts
available for both Opportunity/Quote Entry and Job
Entry; the user-defined alerts activate for quoting
and production tasks. To leverage these alerts, you
first need to customize the Job Entry and
Opportunity/Quote Entry programs to display these
special checkoff boxes; you can then activate their
corresponding global alerts. To learn how to add
check boxes and labels to a user interface, review
the Basic Customization chapter within the Epicor
ICE User Experience and Customization Guide. For
more information on these specific alerts, review the
Global Alert Maintenance topics within
application help.
You are ready to test the standard global alert. To create a global alert using this example, you need to change the release status
of a current job. Here’s how:
6. Notice an Alert.mfgsys 6
configuration file is also sent
as an attachment. You can 7
use this file to launch the
application and immediately 8
display the changed record.
For more information about
this feature, read the Alert
Attachments Maintenance
section later in this chapter.
Now each time a job’s release status changes, the users assigned to this global alert receive these email messages.
BUSINESS ACTIVITY MANAGER | CHAPTER 7
Custom Global Alerts
You might have a business requirement where you need to create your own global alerts or automatically update data. You can do
both functions by creating custom alerts within the Business Activity Manager.
You create a custom alert by first selecting the fields you want the BAM event to monitor. You then create the alert by using fields that
are similar to those found within Global Alert Maintenance.
11. To have this custom alert text also display within the change log, select the Append Log Text check box.
12. Select the Include Link check box to have an Alert.mfgsys configuration file sent with the alert as an attachment. You can use
this file to launch the application and immediately display the changed record. For more information about this feature, read the
Alert Attachments Maintenance section later in this chapter.
You now can see your custom global alert in action. Here’s how:
8. The Text you entered for the action displays in the main field of the email.
• Generate Tasks – These tasks relate to the updated data; the tasks are distributed to the specific users linked to the task.
You can generate several task types through this feature.
• Create .XML Files – These .xml files use data from the updated fields within the event’s selected table. These .xml files can then
be viewed and managed through any .xml tool that you want to use.
• Update Data – You can update data by using a global alert as a trigger. To do this, you run another process related to
the custom global alert. This process updates the data and displays it within the appropriate programs.
The procedure programs run these features by referencing functions contained within the Global Alert Include (GlbAlert.i) file.
This .i file is located within the user-defined (ud/GlbAlert.i) directory.
You first reference the functions you need within the .p file, and then define which record to pass to the procedure.
Here is an example of the syntax you use for each function:
The following list displays all the parameter variables available within the GlbAlert.i file. Use this list to help you define which tables,
users, and actions are affected by the procedure program. The parameter variables:
• Include Parameters:
• Record Parameters:
• OLD<tablename> – Defines the original values of the database record that will change.
• <tablename> – Defines the new values of the database record that will change.
• ChgLogGA – Defines the record of the Change Log that will process.
• Email Parameters:
• Email-To – A semi-colon delimited list of email addresses to which the email is sent.
• Email-CC – A semi-colon delimited list of email addresses to which the email is courtesy copied.
• Email-Mime-Header – Defines the type of email that will be sent. The preprocessors {&TEXT-Mime} and {&HTML-Mime} can
be used to switch between text and HTML email.
• SendEmail – The default value is TRUE. Setting this to FALSE cancels sending out the email.
• Return Values:
The GlbAlert.i file contains functions you use with these parameter variables. The functions and what they do:
• GetFileName.i – A temp-table to hold tasks that will be created. It is very important that the RelatedToFile and Key fields
populate before you save them to the database.
• CreateECOTask – This function automatically creates an Engineering Change Order (ECO) task for the
Engineering Workbench.
• SaveTasks – This function automatically records the tasks generated through the procedure program.
• DumpRecordAsXMLFile – This function automatically creates .xml files that contain the data generated through the
procedure program.
The following sections provides examples on how you can use each of these functions.
Through a .p program, you can define which tasks generate when specific data is updated within a table. Any tasks defined within
this procedure program distribute throughout the application. If the BAM event is optionally set up to send email, a global alert email
is sent out to the users defined on the action and the linked .p program is also run.
This sample code shows you how to create all the tasks available within the GlbAlert.i file:
The GlbAlert.i file contains the DumpRecordAsXMLFile function; this defines the function you use to generate .xml files from the
selected data. It pulls a new or updated record from a table into a separate .xml file. To call this function within the procedure
program, you need to define which ABL program runs when a specific table is updated.
The following code example shows you how to call the DumpRecordAsXMLFile from a .p program:
You can write similar code for the specific table referenced by the event. Be sure this ABL code is accessible at your system server. You
want the server to quickly access the directory location where the .xml files are created; you should point the server to dump the .xml
files directly onto the server drive.
Update Data
A procedure program also has the ability to change records within the database. Use this functionality to create a custom alert that
causes other uniform data changes to occur when the BAM event triggers.
Normally you can only update tables within the current transaction. If you need to update tables outside of the transaction, you either
need to purchase a provision for this additional functionality or create a special routine to handle this function. To review an example
of a special routine, read the Update Data Procedure – Other Tables Example section later in this chapter.
To update data, you first need to create an UpdateTableBuffer.p program. Here is an example:
hQuery:SET-BUFFERS(hBuffer).
hQuery:QUERY-PREPARE(tblQuery) NO-ERROR.
IF ERROR-STATUS:ERROR then return.
hQuery:QUERY-OPEN().
/* IMPORTANT: Directly updating the database through the use of this documented program
(updateBufferTable.p) may, if used improperly, cause data integrity and/or corruption issues.
Care must be taken by the user to ensure that all possible side-effects and consequences
are foreseen and handled properly. It is strongly urged that a test environment be used
to
initially test any use of this program (or any other method of directly changing the data by
bypassing the business logic) and EXTENSIVE testing is performed to fully satisfy the user that
no undesired side-effects result from this action PRIOR to attempting to do this in any sort of
live environment.
If in doubt, assistance may be obtained on a billable basis. Research, diagnosis, and/or repair
by Epicor of any data integrity issues that result from the user directly modifying the data in
the database by any method may not be covered by the support agreement and may be handled on a
billable basis. */
This UpdateTableBuffer.p program can then be referenced by other procedure programs. The next code example,
SetTravelerReadyToPrint.p, causes all Engineered jobs to automatically select their Mass Print check boxes.
BUSINESS ACTIVITY MANAGER | CHAPTER 7
In this example, you add a procedure program that causes all Engineered jobs to automatically select their Mass Print check boxes.
Here’s how you add this procedure program to a custom global alert:
2 3
Typically you can only write Progress code that updates tables within the current transaction. You can, however, create a routine that
updates data from one table and then populates this data change in another table.
For example, you can set up an UpdateTableBuffer.p program to update sales orders with data from the Configurator. During this
example, you enter an Input Quantity for the configured part which then automatically updates on a sales order created for the
configured part.
1. Within the 1
Configurator Designer,
display the configuration for a
selected part. In this example,
you display the
NewConfiguredPart
configuration.
2
2. For the Input Name, you
define the Quantity value.
3
3. Enter a Format that has zero
(0) decimal places.
Run lib\UpdateTable
Buffer.p(input BUFFER
OrderDtl:HANDLE,
’OrderQty’,Quantity),
You can set up client installations to do this in two ways. Right-click the mfgsys.exe file you want to use and select the Open With
(or Open) command. Within the Open With window, click the Browse button to find and select the mfgsys.exe file. Click OK to return
to the Open With window. Select the Always use the selected program to open this kind of file check box. Now the application always
launches using this configuration file.
If you do not want to permanently associate those files, however, you can For more information about runtime arguments
also do this by saving this configuration file within their client installation’s and configuration files, review the Startup
config folder (for example, C:\epicor\905\client\config). By using the CONFIG Configurations chapter within the Epicor ICE User
Run Time Argument for a desktop icon’s properties, the application then Experience and Customization Guide.
launches and automatically displays the program and the record that caused
the global alert.
All standard global alerts activated through Global Alerts Maintenance automatically have the Alert.mfgsys attachment. You can also
attach this file to a custom global alert by selecting its Include Link check box. For more information about these two global alert
types, read the previous Global Alert Maintenance and Custom Global Alerts sections in this chapter.
Use Alert Attachment Maintenance to define which tables can be launched through the Alert.mfgsys file. When data is entered
or changed within one of these tables, the Alert.mfgsys file is then set up to launch the program used to enter data into this table.
Main Menu Path: Executive Analysis > Business Activity Management > Setup > Alert Attachments
BUSINESS ACTIVITY MANAGER
You first need to indicate which tables can be launched using the Alert.mfgsys file. Here’s how:
5. The DataSource Type field defines the type of data that displays through this configuration file. A type appears by default,
but if you need, you can change this value; for example, JobHeadListDataSet.
6. If the selected table is a child table, the Parent Table identifier displays as well. The parent table is required to display the data
through this configuration file. In this example, JobHead is a parent table, so this field is blank.
7. You can also modify the Alert.mfgsys file that is automatically sent. To
do this, click the Template tab. Use this sheet to modify the
The settings you can change through this file are
Alert.mfgsys file to match your system. You can change many settings in
documented in the Startup Configurations chapter
this file; modify it to fit the needs of your organization.
within the Epicor ICE User Experience and
Customization Guide. Read this chapter for an
8. When you finish modifying the Alert.mfgsys file, click Save on the
explanation of each setting – and the different
Standard toolbar.
values you can enter. You can also review the
Configuration Settings File topic within
Now when a standard global alert is sent that was triggered by the JobHead
application help.
table, this Alert.mfgsys file can be used as a shortcut to the record with the
new or updated data. Likewise, any custom global alert triggered by the
JobHead table that has its Include Link check box selected can also receive this
Alerts.mfgsys configuration file.
MANAGER | CHAPTER 7
To do this, launch the Data Dictionary Viewer. Use this program to find out For more information about this program, review the
where the information from the obsolete field is now currently stored. When Customization Utilities chapters within the Epicor ICE
you know what changes were made, launch the Business Activity Manager to User Experience and Customization Guide.
update the fields that are monitored by the event.
Auto-Printing
You can set up an event within Business Activity Manager to automatically preview or print out a report that displays the data which
triggered it. You can use this feature to auto-print standard reports, custom reports, and barcode labels.
This functionality requires you to first add a network printer to Windows and This section builds on the information described in
then create a printer record within the application. Once this is done, you can Chapter 3: Reporting Tools. Review this chapter to
set up the report, workstation, and/or company to automatically default to this learn about the overall reporting tools available
printer. After the default printer is set up, you next define the report you want within the Epicor application.
to auto-print. You can then select this report on a BAM action.
If you want to auto-print BarTender labels, the network printer must be accessible by the server where the BarTender is installed.
Printer Maintenance
You next create printer records within the application that identifies these printers. Use Printer Maintenance to define how the
application interacts with printers. You can create as many printer records as you need. For more information on entering printer
records, review Chapter 3: Reporting Tools.
Location Levels
The Auto-Print functionality searches for the added network printers through a location level hierarchy. If Auto-Print does not find
a printer at one level, it then moves on to the next level to locate the printer record. This hierarchy is:
1. The Auto-Print functionality first looks for a printer selected on a Report Rule defined for a Report Data Definition record.
The Auto-Print Rules section found later in this chapter describes how to set up a default printer for a report rule on the report
data definition.
2. If a printer is not defined on a report rule, it next looks for a printer selected on the current workstation. Later in this chapter,
the Work Station Maintenance section describes how to set up a default printer for this location.
3. If a printer is not defined on a workstation record, it next looks for a printer selected for the company currently logged on. Later
in this chapter, the Company Configuration – Forms and Label Printers section describes how to set up a default printer for
this location.
If the application cannot find the default printer at any of these levels, an error message displays within the System Monitor. This error
message displays on the History Tasks tab, indicating that a default printer was not found.
The next sections describe how you select the default printer for each of these location levels.
Once your network printers are defined for your application, you can indicate the default printer the company uses for printing Forms
and Labels. You do this through Company Configuration.
Main Menu Path: System Management > Company Maintenance > Company
You can also define a default printer at the workstation level. When a user logs into this workstation, this default printer is
automatically used for auto-printing. You do this through Work Station Maintenance.
Main Menu Path: Material Management > Shipping / Receiving > Setup > Work Station
8. Now select a Printer Usage option. This defines how this default printer is
Do not select the Reports option; currently this
used. Select either Forms or Labels from the drop-down list.
workstation option is not supported by the
Auto-Print functionality.
9. Click Save on the Standard toolbar.
This workstation is now set up with a default printer. If a report does not have a rule that defines a network printer path, this default
workstation printer is used instead.
Auto-Print Rules
Use Report Data Maintenance to create and edit data definitions for both custom
Report data definitions set up the information
reports and existing reports. When you create a new report, you define its main
that displays on each report. Report styles define
attributes and then select the tables and fields that appear on the report. You
the modified reports available at each company.
also create report rules and conditions that define when this report auto-prints.
To learn more about report data definitions and
Use this functionality to limit the conditions through which this report definition
report styles, review the Report Data
is automatically sent to the printer.
Maintenance and Report Style Maintenance
sections within Chapter 3: Reporting Tools.
In this example, you set up auto-printing for the new version of the Job Traveler
report you created in Chapter 3: Reporting Tools. Because this is a Crystal report,
you must create rules and specify values for both the printer and report
templates (You follow similar steps to create auto-print rules for BarTender labels). These rules define when the custom Job Traveler
should automatically print. When a BAM event triggers an auto-print action, the process first checks the rules defined for the report
data definition to locate the printer used for the report.
You can have an unlimited number of rules for auto-printing each report. These rules can monitor nearly any condition within the
data. If you want a report to always print, you must create at least one rule that does not have any conditions. Even if the rest of the
auto-print functionality is set up correctly, a data definition that does not have any rules does not auto-print.
Main Menu Path: System Management > Company Maintenance > Report Data Definition
Here is how you create rules for your Job Traveler data definition:
You can leave this field blank. If you do, the automatic printing is run from the default printer defined at the Work Station level.
If a printer is not defined at this location level, however, the process uses the Auto Printer selected within Company
Configuration Maintenance. This functionality was described in the previous Work Station Maintenance and Company
Configuration – Forms and Label Printers sections.
7. If you want to see a preview of your Crystal Report, click the Print These options only apply to Crystal reports. For
Action drop-down list and select the AutoPreview option. This causes BarTender labels, the data file automatically outputs
the Crystal Reports preview to display before the report prints. You can
to the BarTender Commander™ for review. For more
also the select AutoPrint option; this causes the Crystal Report to be
information, review the Business Activity Manager -
immediately sent to the printer without a preview.
BarTender Setup topic within application help.
8. For the Print Quantity section, you can either define a Constant value, or a Dynamic value. To use a dynamic value, select the
By Field radio button. The drop-down lists activate; select a Table and its accompanying Field. This value determines how many
copies of the report auto-print, so only numeric fields can be selected from the Field drop-down list.
This defines the data definition and report style you use with your Business Activity Manager (BAM) event.
You can further indicate when the report auto-prints through the Condition List grid. Use this grid to create expressions, or conditions,
which must be met before the report automatically prints.
For this example, you only want this Job Traveler to print when a job’s Requested Due Date is equal to or greater than tomorrow
(the next day after the current date). Here’s what you do:
5. The condition evaluates a constant value (the current date plus one day). Because of this, you select the Constant check box.
6. Now click and drag the bottom scroll bar to view the rest of the row.
7
7. Select the From Today check box. This
indicates the condition is based on a
number of days either now or in the
future from the current date.
7 8
Auto-Print Action
You have finished setting up the print options and you have defined the report definition and style you need for auto-printing.
You can now define the auto-print action. To do this, you return to the Business Activity Manager.
5
4
You are now ready to test this auto-printing action. During this example, changing the Requested By Date on a job record to a future
date causes the Job Traveler to appear within the Print Preview window.
1. Navigate to Job 1
Entry: Production
Management > Job
Management > General
Operations > Job Entry
2
2. Click the Job… button
to find and select an open job.
3
3. Clear the Engineered and
Released check boxes.
4
4. Change the Req By date
to a future date.
9. Click Ok.
All conditions that integrate a single report rule are evaluated in descending order based on the number of conditions contained
within a rule. When a rule evaluates to TRUE, any remaining rules that have the same number of conditions are evaluated. Any rules
that have less conditions are not evaluated.
For example, the following table displays a series of report rules displayed in descending order by their number of conditions. Notice
RuleB has four conditions. When this rule runs and evaluates as TRUE, only rules with four conditions are evaluated. Because of this,
RuleE is evaluated while RuleA and RuleC are not.
Also note that report rules evaluate differently between Crystal and BarTender reports. Because report rules can have conditions that
make up criteria, these conditions are then logically grouped together by table inside a rule. These reports behave differently, based on
the criteria results:
• Crystal Reports – A report rule evaluates to TRUE only if the criteria for all its tables evaluate to TRUE. In this case, the .xml data
populates the Crystal Reports template defined by the Report Style selected on the rule. The .xml file then contains all of the
data that is expected on the report.
• BarTender Reports – The data that populates the file is filtered by the criteria defined on the rule. In this case, the criteria filter
out data instead of determining whether the data should print. If no data populates into the file because the criteria completely
removes the data, the rule evaluates to FALSE. If any data displays, however, it evaluates to TRUE.
BAM Rules
The Business Activity Manager contains a Rules sheet you can use to restrict when an action triggers. You create conditions on this
sheet that must be met before a change log, global alert, or auto-print report is run.
To do this, you first indicate what action is linked to the specific rule. You can
If an action does not have any rules associated with
then assign rules to one, two, or all actions associated with the event. The
it, the action runs every time the event is triggered
actions you link to rules are only launched when the rule’s condition criteria
by a data change.
are met.
To create BAM rules, you return to the Business Activity Manager. For this example, you use the Requested Due Date BAM event
again. Three actions are launched when this event triggers.
To reduce how often these actions occur, you decide you need a BAM rule that causes these actions to run only when the selected
Requested Due Date is a future date. This value is identical to the rule condition you created previously for the Traveler report
definition. In this case, however, you apply this rule to all the actions set up on this BAM event.
6. Define the Field Name (Evaluate) this rule uses for its condition. This defines the field evaluated by the rule. In this
example, you select the ReqDueDate field.
7. The Operator value defines how this condition evaluates. For this example, it compares the evaluated field to a constant Date,
so you select the >= (greater than or equal to) operator.
8. Select the Constant check box. This indicates the evaluated field is compared against a constant value or a date. It causes
either the Value field or the Date field to become available. In this example, a date field can only be compared to another date
field, so the Date field becomes active.
9. Notice the red Rules Not Validated icon displays. This indicates the rule needs to be tested to see if it can be run
successfully against the BAM event. You do this step when you finish creating the rule.
13. You now must validate the rule. Click the Test button.
14. If the rule is valid, the green Rules Validated icon displays.
Now all the actions on this BAM event only launch when this rule is met. If a user changes the Requested Due Date on a job record
to a future date, all the actions defined through this event automatically run.
Chapter 11
Business Process
Management
The Business Process Management (BPM) module is a set of tools you use to modify and extend application functionality
without touching the source code. At the core of BPM is the directive. A directive is a set of conditions and actions that can
be applied to a transaction. Three types of directives are available:
• Updatable BAQ Directives - applied to business activity query methods that can update the database.
Use the BPM tools to add or change application processes when a business object method executes, when a transaction is
applied to a table, or when information is retrieved or posted by a business activity query. You do this by creating directives
that first evaluate the data being processed and then, if the directives’ conditions are met, perform one or more actions
based on this data.
This chapter first explores the base elements of BPM and then explains how you set up the BPM module. The chapter next
describes all the tools in detail – including the conditions and actions available for directives. The chapter concludes with
a series of case studies you can use as a guide for your own BPM directives. Subsequent chapters explain custom BPM
processing and BPM utilities.
• Method Directives - Method directives initiate BPM actions based on specified application method calls within a business
object. A business object contains the code that runs a business process. BPM actions may be conditionally triggered before,
after, or, in place of a regular method that runs within a business object.
• 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.
• Updatable BAQ Directives - 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.
• Holds - Use BPM holds to define an external hold event linked to a business object which in turn may be set through a BPM
action. BPM directives may then be created on other business objects and methods to evaluate whether a hold exists and then
modify the business process as you need. BPM holds extend the regular status holds built into the application. You can then
define and evaluate your own hold conditions based on your business workflows.
• Data Form Designer - Use the BPM Data Form Designer to create forms launched by BPM method directives. BPM data forms
capture data or present button actions that you can use to control the BPM processing flow. This feature can be used to launch
a form - for example, only for a specific customer - to capture the specific data required for a transaction.
BPM Setup
This section explains what you need to install and set up so that you can run BPM.
BPM Server is compatible with Windows Server 2008™ and Windows Server 2008 R2™.
User Maintenance
Two levels of BPM functionality are available – a base level and an advanced level. All users who have menu access to BPM can use
the base level of BPM functionality to create holds and directives containing pre-built actions. Users with access to the advanced BPM
functions can create custom actions. These users can also create method directives that run in place of the base methods; however
users should work with Epicor or a partner organization before replacing a base method.
You give specific user rights to the advanced BPM features through User Maintenance. These rights are assigned on the Security sheet.
Main Menu Path: System Management > Company Maintenance > User
4. Click Save on
the Standard toolbar.
3
This user can now use the advanced
BPM functions.
Holds
A Hold is a flag you place on a record; it indicates the record should not be processed until it is reviewed and approved. A hold by
itself does not perform any actions. You define the actions by creating directives which define how the application handles a record
that has a hold placed on it. A hold can be attached to a record in two ways:
• Manually – You can manually attach a hold onto a field by using the BPM Holds program. You do this by launching the BPM
Holds program from the field’s context menu. This adds the hold to the record. To use this functionality, holds must be first
defined within Hold Type Maintenance; this program is explored in the next section.
• Programmatically – A hold can also be applied to a record using a directive action. This hold can then activate before, during,
or after the business process is run. Typically you use holds to interrupt the processing of the business object. This hold can then
cause custom actions you define for the directive to run. You use Method Directive Maintenance or Data Directive Maintenance
to create these directives. These programs are explained later in this chapter.
Main Menu Path: System Management > Business Process Management > Setup > Hold Type
7. The Hold Usage sheet displays where the current hold has been selected on specific records; use this sheet to manage
the records currently on hold. If you need, you can select an item on this grid and click the Delete button to remove a hold on
a record.
8. The Hold Usage History sheet displays a record for each time the selected hold was used – when it was attached to a record,
who attached the hold, when it was removed, and so on. If you need, you can select a record on this grid and click the Delete
button; this removes the history record. The maximum number of records that can appear on the Hold Usage History sheet is
defined by the hold type’s History Length value.
BPM Holds
Use the BPM Holds program to attach a hold directly to a record. You can also delete a previously attached hold.
8. The Description field displays the optional explanation that may have been entered for the hold type.
9. The Creation date field displays the date on which this BPM hold was attached to the record.
10. The Creation time field displays the time on which this BPM hold was attached to the record.
11. The Created by field displays the identifier of the user who attached the hold.
12. Use the Comment field to enter any additional information you want about the hold. The only field within the BPM Holds
program you can edit, this field contains the reason you placed the hold on the record.
You can review all the records for which this hold is assigned. Placing a hold
To use hold types to actually prevent specific records
on a record does not prevent the record from being processed. Instead, the
from being processed, you need to create a method
hold is really a note you add to the record. You can then track these selected
directive for it. The Case Studies section at the end
records within Hold Type Maintenance. You must then launch the record’s
of this chapter explains how to leverage
entry or maintenance program to make the changes you need.
this functionality.
To review your BPM holds:
1
1. Navigate to Hold
Type Maintenance. Main
Menu Path: System
Management > Business
Process Management > 2
Setup > Hold Type
3 4
2. Use the Detail sheet to find
and select a specific hold type.
In this example, you select
the Sales Order hold type.
Directives
A directive defines a set of conditions and actions associated with a data transaction. Directives are triggered by a business object
method, a method used by an updatable BAQ, or by changes to data in a database table.
Method Directives
All data transactions in the application are controlled by business objects. A business object represents a type of data managed by the
application, such as a customer, part, or a sales order. The objects contain methods that perform a specific task. For example, the
Customer.Update method validates and posts customer records to the database.
BPM tools can manipulate how these methods perform before, during, or after database transactions. You do this by creating method
directives that first evaluate the data being processed, and then, if the directives’ conditions are met, perform one or more actions
based on this data – like displaying messages, preventing data entry, launching other business processes, and so on.
BPM method directives work by intercepting communications between the Client or Web Services and the application server logic. You
can then validate, manipulate, or create workflows based on the data passed through the application. Because they are server side
customization, you can change business logic without modifying the source code. For this reason, most future upgrades to the source
code will not affect existing BPM directives.
When a business object method is called, all directives associated with the method activate. If the conditions within a directive are
met, the actions it contains are run.
While the method is active, these directives run at three different processing points:
• Pre-Processing – These directives execute before the base method runs. After these actions finish, the business object then runs
the base method.
• Base Processing – These directives run in place of the base method. The base method does not execute.
• Post-Processing – These directives run after the base method Only advanced BPM users can create base processing
finishes its process. directives, so your user account must be defined as
a BPM Advanced User. However, Epicor strongly
For example, you can create a method directive for the Customer.Update recommends you do not create base processing
method that sends an e-mail to a Sales Manager when a customer’s credit directives. If you change a base method incorrectly,
limit is changed. This same directive can also attach a hold to the customer you can harm the normal function of the
record and display a message indicating the customer record has been placed application. Work with a Epicor consultant before
on hold. Both of these actions are run during post-processing, after you create a base processing method directive.
the base method finishes its process.
This graphic shows how method directives work within the application.
5. After the ABL Program code is run, a Post-Processing directive can run.
6. Data is returned to the program according to the actions run by the directives and ABL program.
Main Menu Path: System Management > Business Process Management > Setup > Method Directives
Data Directives
A data directive is similar to a method directive, but instead of launched by a business object method, a data directive is linked to
a database table and is triggered by a database event, such as add, delete, or update. By applying the directive to a specific table, data
directives are used to control data that may be affected by several business objects.
You can apply most of the conditions and actions for method directives to data directives as well, except in cases where the condition
or action depends on information available in the business object that is not available in the data itself. Two types of data directives are
available:
• In-Transaction - Affects data while it is saved to the database. This directive type can only process one row at a time; it cannot
process multiple dirty rows - rows that contain data not yet saved to the database. Multiple dirty rows are explained later in
this chapter.
• 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.
Main Menu Path: System Management > Business Process Management > Setup > Data Directives
• 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. You first define the ID
of the custom action in the Business Activity Query Designer program and then define the action using one or more directives
within the Updatable BAQ Directives program.
• Update – Performs database updates, refreshing the data to include changed and added rows.
When you create an updatable BAQ, the application writes a base processing
The same security settings for method directives
directive for the update method. The directive uses ABL code to update the
apply to updatable BAQ directives. You must be
database according to the settings defined in the Business Activity Query Designer.
a BPM Advanced User to create or modify base
You can edit this code to customize the update process, or you can add
processing directives.
pre-processing, base processing, and post-processing directives to the methods
associated with the BAQ. For more information, review the Create an Updatable
Business Activity Query section within Chapter 4: Business Activity Queries.
You launch the Updatable BAQ Method Directives program in two ways - click the Define Custom Actions button on the Update >
General Properties sheet within the Business Activity Query Designer program, or select it from the Main Menu.
Main Menu Path: System Management > Business Process Management > Setup > Updatable BAQ Directives
Custom Actions
You may create custom actions for updatable BAQs in the Business Activity Designer program by defining the action ID and label.
The custom actions can then be added to the Actions menu of a dashboard that uses the query.
In the Updatable BAQ Method Directives program, you create a pre-processing, base processing, or post-processing directive for
the RunCustomAction method. Use the “the specified argument is equal to the specified expression” condition statement to identify
which action to run. The first “specified” variable can be set to “actionID.” The second “specified” variable can be set to the ID of
the action called by the user as it was specified in the BAQ. Then create directive actions to perform custom operations. You will find
more information about conditions and actions later in this chapter.
Since directives are created for business object methods, tables, or updatable BAQ methods, the first step is to locate the object on
which the directive will act. To locate the object:
8. You can also Search outdated Directives. Select the Search outdated Directives option to locate any method directives that
have become incompatible with the current application version. To learn more about this, review the Directive Compatibility
section later in this chapter.
9. Click Search.
10. The Search Results grid displays all the methods for the CurrExRate business object that start with “U”. In this example, you
highlight the Update option.
15. The Transaction Scope list defines how the application handles errors. Available options:
• Business Method and Directives – The application reverses, or rolls back, all changes made by actions run before the error
exception occurred.
• Business Method – The application does not roll back any changes made by the directive’s actions.
16. The Supports multiple dirty rows check box indicates whether the selected method sends multiple updated rows to the
database for processing. When a method can gather data from multiple rows at the same time before they are saved to the
database, the method is referred as being able to support multiple “dirty” rows. You then can perform additional actions against
the selected method. These additional actions are described in the Support for Multiple Dirty Rows section later in this chapter.
17. Click the Advanced button to create custom actions for this method
To use this functionality, your user account must be
directive; this launches the Method Advanced Options program. This
defined as a BPM Advanced User. Read the previous
program displays the signature for the current method, so you can
BPM Setup section to learn how to give users these
create the custom action. You can also create a .NET assembly, Epicor
advanced rights.
Service Connect Workflow, or a Progress procedure with this
functionality. To learn how to use these tools, read the Custom Actions
section later in this chapter.
18. When you finish defining the primary items on the method directive, click Save on the Standard toolbar.
You are now ready to add directives to this object. You can create as many directives as you need for each method, table, or updatable
BAQ method.
This example shows you how to create a directive that runs before the CurrExRate.Update method processes; this type is called
a Pre-Processing Directive. To create the directive:
6. The Owner Company field displays the company for which this directive is created.
7. The Enabled check box indicates this directive is active and the application automatically compiles the code to run the directive.
You must select this check box to use the current directive.
8. The Company Independent check box indicates this directive is active for all companies within your application. However, if this
check box is clear, it only runs against records within the current company.
9. The Compatible check box indicates whether this directive works with the current version of the business method. If the
application validates the method and discovers this directive is no longer compatible with the business method, this check box is
clear. To learn more about how the application checks your method directives for compatibility, read the Directive Compatibility
section later in this chapter.
10. When you select the Prevent Endless Loops check box, you restrict how many concurrent directive instances run, protecting
the directives from getting caught in repeated, or endless, loops. Typically you select this check box.
11. The Reenter Max field activates if you select the Prevent Endless Loops check box. Use this field to define the maximum number
of loops the application runs before an exception error message displays.
For example, you could create a directive that calls an Epicor Service Connect workflow, which in turn, activates the directive.
This introduces an endless loop into the system. As these directives run, however, the application checks these loops against
the Reenter Max value. When the loops total this value, an exception error message displays and the directive stops.
12. Click the Conditions button to find and select a condition used for this method directive. This launches the Conditions window,
which you use to select the condition you use with the directive. When the parameters defined on the condition are matched, its
related actions run. To learn more about conditions, read the Conditions section later in this chapter.
13. Click the Actions button to find and select the actions that run when the condition activates. This launches the Actions window,
which you use to select the action or actions to run with the current condition. To learn more about actions, read the Actions
section later in this chapter.
14. When you finish creating your pre-processing directive, click Save on the Standard toolbar.
Conditions
Conditions are statements which define the specific parameters that must be met to activate a directive. If a data change matches
the condition statement, the actions linked to these conditions run. Each directive can have as many conditions as you need.
If you enter multiple conditions, you use a logical Operator (and, or) to define the relationship between the current statement and
the previous statement. You can also use parentheses to group condition statements logically.
The application evaluates the condition statements in the order they appear and according to how they are grouped. For this example,
you want the condition to activate when the user leaves the Phone Number field blank on a new customer record.
Main Menu Path: System Management > Business Process Management > Setup > Data Directives
2. The Conditions 2
window displays. 3
5. Notice some words in the user text are hyperlinks. You click these links to define the specific values used for the condition
statement. For this example, you click the first “specified” condition link.
8. The Fields grid displays the fields contained within this table. In this
example, you want the condition statement to monitor the PhoneNum
field; you select the check box next to this field.
9. Click OK.
14
21 20
15. You return again to the Conditions
window. Notice the User Text now
displays: The
Customer.PhoneNum field of the
changed row is equal to the “”
expression. This means that when 16 17 18 15 22 19
users attempt to save a customer
record without entering a phone
number within this field, the
condition activates.
16. The other fields on this window can further help you manage condition statements. The Error Text field validates the statement.
If this field is blank, the statement is correct. Otherwise, a message displays in the field to indicate what is wrong with the
condition statement.
17. If you have two or more condition statements, use the Operator list to select the logical operator that is used between
the current statement and the previous statement. Available options:
• And – The conditions on both the current statement and the previous statement must be met before the directive activates.
18. If you need to group together condition statements, use the Prefix field to enter the opening parentheses required for
your grouping.
19. The Postfix field is also used to define the parentheses pairings; this field
You can enter more than one parenthesis in the
defines the ending parentheses required for your condition statement
Prefix and Postfix fields. You can then create nested
grouping. To group two statements, enter an open parenthesis in the
condition statements.
Prefix field before the first statement, and a closing parenthesis in the
Postfix field.
20. To change the order in which your condition statements run, select the condition and click the Up button or the Down button.
The top condition statement runs first, followed by the second, and so on.
21. If you want to remove a condition statement, highlight it on the list and click the Delete button.
22. Click the Advanced button to view the source code for the BPM Progress procedure; this item is the code that runs the current
condition statement. If you have BPM Advanced User rights, you can use this function to manually extend or even replace
this code.
24
25
26
27
Actions
Actions are operations run by the directive when its condition statements are met by a change within your data. You create and define
action statements in a similar way as condition statements - you select and define the User Text that runs when the action executes.
For this example, you want the action to display an error message when the user leaves the Phone Number field blank on a customer
record. To create and define actions:
2. The Actions 2
window displays. 3
5. Notice some words in the user text are hyperlinks. You click these
links to define the specific values that are used for the action statement.
For this example, you click the “designed” action link.
14 12
10. You return to the Actions window.
Notice the User Text displays: raise
exception based on the
RequiredPhoneNum template.
This means when the directive's
condition statement activates, this
11 10 13 15
action displays the error message
you entered within the
RequiredPhoneNum template.
11. The other fields on this window can further help you manage your actions. The Error Text field validates the statement. If this
field is blank, the statement is correct. Otherwise, a message displays in the field to indicate what is wrong with the action.
12. To change the order in which your actions are run, select an action and click the Up button or the Down button. The top action
in the list is run first, followed by the second, and so on.
13. The Terminate On Error field indicates whether the method directive quits if the action statement results in an error.
The method stops processing. To activate this function, click this field and select the (exit on error) option.
14. If you want to remove an action, highlight it on the list and click the Delete button.
15. Click the Advanced button to view the source code for the BPM Progress procedure; this item is the procedure that runs the
selected action statement. If you have BPM Advanced User rights, you can use this feature to manually edit the code.
17
18
19
20
As you create BPM conditions and actions, you will notice that most tables begin with a “tt” prefix in their names. The “tt” prefix is
an abbreviation for Temporary Tables; this value is used within ABL code. When you see a “tt” table name, you are working with
temporary tables that relate to the .NET dataset being passed between the server and the client - instead of the same physical table
within the database.
When you modify a column in a “tt” table through a pre-process or in-transaction directive, you modify the data before it is
committed to the database tables.
When you modify a column in a “tt” table through a post-process or standard data directive, you modify the data returned from the
server to the client. You must be careful that integrity is maintained between the database tables and client dataset. Changing data
only in the client dataset that is subsequently written back to the database can cause a ‘Record has been modified by Another User’
error. This happens because the original client dataset record may not match the database tables.
Conditions
This section contains the list of pre-built condition statements you can select. Note that some condition statements are available only
for certain types of directives. For example, the condition statement “the Specified field has been changed from Any to Any” is not
available for a post-process method directive because BPM needs both the original record and the changed record to be available
before this comparison can execute. Available condition statements:
• The specified argument is equal to the specified expression - Use this condition to evaluate a BPM parameter, temp-table,
or call content. For an updatable BAQ method directive, the condition can test which BAQ custom action is being run so that
BPM directive actions can execute.
Directive Types
Method Data Updatable BAQ
None None All
Variables
Click this link to launch the Select an Argument program. Use this program to choose
specified (argument) which parameter you would like to evaluate against the other variables in the
condition statement.
Click this link to launch the Select a Comparison program. Use this program to select a
is equal to comparison option that evaluates the value of the selected argument against the expression.
If this comparison evaluates to TRUE, the directive’s actions are run.
Click this link to launch the Specify an Expression program. Use this program to compose
an expression that evaluates against the comparison. The expression can contain literal
values, data from the current transaction, and functions that can perform calculations and
specified (expression)
data type conversions. If you are evaluating whether a certain BAQ custom action was run,
enter the action ID in double quotes. Click the Check Syntax button to verify the syntax of
your expression.
• Number of rows in the designed query is not less than 1 - Use this
The query statement must be a complete string, so
condition to create a query that activates when the data meets a specific
do not add any hard or soft returns between the
comparison (is more than, not less than, and so on) option. If this
various parts of the phrase. Also, do not place a
comparison evaluates to TRUE, the directive’s actions are run.
period at the end of the statement.
Directive Types
Method Data Updatable BAQ
All All All
Variables
Click this link to launch the Compose Query program. Use this program to write an ABL and
Business Activity Query (BAQ) compliant query. This query evaluates the number of rows returned
designed by the query against the comparison value you select later in this statement. In addition to
standard tables, the query phrases can run against temporary tables (tt tables) to analyze values
passed between datasets.
Click this link to launch the Select a Comparison program. Use this program to select a
is not less than comparison option used against the number of rows returned by the selected query. If this
comparison evaluates to TRUE, the directive’s actions are run.
Click this link to launch the Specify a Value program. Use this program to enter a numeric value
1
that evaluates against the number of rows returned by the query.
• The specified field has been changed from any to any - Use this
All tables contain a column called RowMod at the
condition to monitor a specific field contained within the current
bottom of the record. The application sets the
transaction. If the field’s value changes to another value that you define,
RowMod value to Add (A), Update (U), or Delete (D)
the condition activates the directive’s actions.
to define the action performed against the row.
Typically the RowMod value is set for Update (U)
For this condition statement, you specify two field values. The first field
methods. If you see a Changed reference, this refers
value is compared against the second field value. If the comparison
to a RowMod value set to either A or U. Some
returns TRUE, the application executes the directive’s actions.
methods do not set a RowMod value, so conditions
that require the RowMod contain a value that
cannot be used. For some conditions, however, the
designator Some or All rows is allowed so you can
possibly leave the RowMod value empty.
Directive Types
Method Data Updatable BAQ
Pre-Processing Pre-Processing
All
Base Processing Base Processing
Variables
Click this link to launch the Select Table Field(s) program. Use this program to specify a field that
is part of the BPM condition statement. You can choose a standard or user-defined field from any
specified
temporary table (tt table) included in the current method parameters. The application compares
the field value to a value (any to any) you specify.
Click this link to launch the Specify a Value program. Use this program to enter a value that
any
is evaluated.
Click this link to launch the Specify a Value program. Use this program to enter a value that
any
is evaluated.
• The method is called by specified user - Use this condition to determine whether a specific user did or did not launch the
current transaction. Depending on what you define for this condition (Yes or No), the directive’s actions are run. This condition
statement can be useful for testing directives so that they are activated only by a specific user account.
Directive Types
Method Data Updatable BAQ
All All All
Variables
Click this link to launch the Select Option program. This program displays the is called or is not
is called called options. Select the option you need; these options determine whether the user did or did not
initiate the data transaction.
Click this link to launch the Select User program. All the user records in the current database
specified user
display. Use this program to select a user that is used for this condition statement.
• The user called the method belongs to specified group - Use this condition to determine if the current user is or is not a
member of a specific security group. The application compares the user who initiated the transaction with the security group you
specify in the condition. The directive’s actions run depending on how you set up this condition (Yes or No).
Directive Types
Variables
Click this link to launch the Select Option program. This program displays the belongs or does
belongs not belong options. Select the option you need; these options determine whether the user is or is
not a member of the security group you specify later in this condition statement.
Click this link to launch the Select Group program. Use this program to specify a security group
specified group
evaluated against the selected user.
• The hold of the specified type is attached to the business object - Use this condition to indicate the system should verify
whether a hold type is attached to the current or related business object. If the hold type is present on the selected business
object when the method runs, the application executes the directive’s actions.
Directive Types
Variables
specified type is Click this link to launch the Select Business Object program. You can browse all the business
attached to the objects related to the current method using a Tree View. This interface displays all the objects that
business object link to, or are linked from, the current object.
You also specify the hold type this condition needs to verify with this business object. Hold Types must be created specifically for
the selected business object before you can select one through this program. For more information, read the Hold Types section
earlier in this chapter.
• Time is in the specified time frame - Use this condition to indicate a specific time frame is monitored by this condition.
If the data transaction is executed during this time frame, the application executes the directive’s actions.
Directive Types
Method Data Updatable BAQ
All All All
Variables
Click this link to launch the Specify a Time Frame program. Use this program to define
a time frame that is part of this condition statement. You can specify these time
frame options:
• An occurrence interval
• The specified field of the changed row is equal to the specified expression - This condition statement monitors a specific
field within the data transaction. BPM then compares this field value to the comparison option and a final value that you specify.
If the comparison returns TRUE, the application executes the directive’s actions.
Directive Types
Variables
Click this link to launch the Select Table program. Use this program to specify a standard or
user-defined field that is part of the statement. For method directives, you can then select a
specified (field) field from any temporary table (tt table) included in the current method’s parameters. For
data directives, you can select a standard or user-defined field from the temporary table
associated with the directive.
Click this link to launch the Select a Row Set program. Use this program to specify which
the changed row row set is affected when this rule activates - like the added row, the deleted row, the
updated row, and so on.
Click this link to launch the Select a Comparison program. Use this program to select a
is equal to comparison option used to compare the selected field against the value defined later in this
condition statement.
Click this link to launch the Specify an Expression program. Use this program to compose
an expression that evaluates against the comparison. The expression can contain literal
specified (expression)
values, data from the current transaction, and functions that can perform calculations and
data type conversions. Click the Check Syntax button to verify the syntax of your expression.
• There is at least one updated row in the specified table - This condition compares the value of a field included in the row
set to a table you specify. If the comparison returns TRUE, the application executes the directive’s actions.
Directive Types
Method Data Updatable BAQ
Pre-Processing Pre-Processing
All
Base Processing Base Processing
Variables
Click this link to launch the Select a Row Set program. Use this program to specify which row
updated set is affected when this rule activates - like the added row, the deleted row, the updated row,
and so on.
Click this link to launch the Select Table program. Use this program to specify a table you will
specified monitor through this condition statement. Use this program to choose any table linked to the
current data transaction.
• Value of the specific field of the designed query changed from any to another - Use this condition to query a specific
field that is outside of the current transaction. If the field’s value changes to another value that you define, the condition
activates the directive’s actions.
Directive Types
Method Data Updatable BAQ
None All None
Variables
Click this link to launch the Select Table program. Use this program to specify a standard or user-
specific
defined field that is part of the statement.
Click this link to launch the Compose Query program. Use this program to write an ABL and
Business Activity Query (BAQ) compliant query used as part of a BPM condition statement or
designed
action. In addition to standard tables, the query phrases can be run against temporary tables to
analyze values passed between datasets.
Click these links to launch the Specify a Value program. Use this program to enter values to
evaluate. For this condition statement, you specify two field values. The first field value is
any and another
compared against the second field value. If the comparison returns TRUE, the application executes
the directive’s actions.
• The specified call context field is equal to the specified expression - Use this condition to monitor the value of a context
variable in the current data transaction, such as the CurrentCompany or CurrentUserId. The application compares this argument
against an expression that you specify. If the comparison returns TRUE, the application executes the directive’s actions.
Directive Types
Method Data Updatable BAQ
All All All
Variables
Click this link to launch the Select Table Field(s) program. Use this program to specify a call
context field from one of two available Call Context tables. These tables are available for each
specified call context business method, and you leverage them for custom data storage on both the client and server.
The application compares the field value to a value that you specify. For more information, review
the Call Context topics within application help.
Click this link to launch the Select a Comparison program. Use this program to select a
is equal to comparison option that is used against the number of rows returned by the selected query. If this
comparison evaluates to TRUE, the directive’s actions are run.
Click this link to launch the Specify an Expression program. Use this program to compose
an expression that evaluates against the comparison. The expression can contain literal values,
specified
data from the current transaction, and functions that can perform calculations and data type
conversions. Click the Check Syntax button to verify the syntax of your expression.
• Method changed the specific field of the designed query from any to another value - When this condition is used,
the application verifies whether the field in the query result set has been changed from one value to another value. If the
condition statement evaluates to TRUE, the application executes the directive’s actions.
Directive Types
Method Data Updatable BAQ
Post-Processing None None
Variables
Click this link to launch the Select Table program. Use this program to specify a standard or user-
specific defined field that is part of the condition statement. Use this program to choose a field from any
temporary table (tt table) included in the current method’s parameters.
Click this link to launch the Compose Query program. Use this program to write an ABL and
Business Activity Query (BAQ) compliant query run with this condition statement. In addition to
designed
standard tables, the query phrases can run against temporary tables (tt tables) to analyze values
passed between datasets.
Click these links to launch the Specify a Value program. Use this program to enter values to
evaluate. For this condition statement, you specify two field values. The first field value is
any and another
compared against the second field value. If the comparison returns TRUE, the application executes
the directive’s actions.
• This directive has been enabled from the specified directive - Use this condition to select a pre-processing or
base processing directive that must execute successfully for the current post-processing directive to run.
Directive Types
Method Data Updatable BAQ
Post-Processing None Post-Processing
Variables
Click this link to launch the Select a Primary Directive to Depend Upon program. Use this
specified program to select a pre-processing directive or a post-processing directive that is used for
this condition.
• The specified public data tag exists on the changed row of the specified table - Use this condition to identify when a
data tag has been placed on a record. You can apply data tags to records throughout the application. A common use of data
tags may be to group related records for searches or so that BPM directives can run when the records are modified. Review
the Searches chapter for more information about data tags.
Directive Types
Variables
Click this link to launch the Specify a Value program. Use this program to enter a free-form text
The specified (data tag)
value that matches the data tag for which you want to run the directive.
Click this link to toggle between three values: public, current user and public or current user.
Select public to limit the directive to records that have a public data tag of the specified name.
Select current user to limit the directive to records where the user trying to modify the record has
public
added a private data tag. Use the public or current user option if you want a directive to run for
a given data tag regardless of whether it is public or private, instead of limiting the directive to
one or the other.
Click this link to toggle between two values: exists and doesn’t exist. Select exists to limit
exists the directive to records that have the specified data tag. Select doesn’t exist to limit the directive
to records that do not have the specified data tag.
Click this link to launch the Select a Row Set program. Use this program to specify which row
the changed row set is affected when the rule activates - like the added row, the deleted row, the updated row,
and so on.
Click this link to launch the Select Table program. Use this program to specify a table that is part
of the condition statement. For a method directive, use this program to choose a standard or user-
specified (table) defined field from any temporary table (tt table) included in the current method’s parameters. For
a data directive, be sure you select the current table; this table contains the data you want to
monitor.
Actions
This section contains the list of pre-built actions; you can use these actions by themselves or together to create complex action
statements that cause specific things to occur within the application. Available actions:
• Send email asynchronously based on the designed template with rule - Use this action to automatically send an email you
create to selected recipients.
Directive Types
Method Data Updatable BAQ
All Standard All
Variables
Click this link to set this variable to send an email either synchronously or asynchronously. This
indicates how the application handles email generated by this action. Available options:
designed 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.
Click this 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
with rule performs. Read the Support for Multiple Dirty Rows section in this chapter for details about each
option in this program. This variable is not visible if the method data transaction does not support
multiple dirty row updates.
• Call the specified Epicor Service Connect Workflow asynchronously with rule - Use this action to send a call to Epicor
Service Connect. The information in this call is then distributed through a Service Connect workflow that you select.
Directive Types
Method Data Updatable BAQ
All Standard All
Variables
Click this link to launch the Logon to Service Connect program. Use this program to enter the login
credentials for the server where Epicor Service Connect is installed.
After you successfully enter the login credentials, the Select Workflow program displays. Use this
program to select an Epicor Service Connect workflow used for this action.
specified
While you are in the Select Workflow program, you can click the Advanced button to launch the
Workflow Context Parameters program. Use this program to specify a server, user account, and
password required to run the current Epicor Service Connect workflow.
To learn more about Epicor Service Connect, review the Epicor Service Connect documentation and
the Epicor Service Connect User Guide.
Click this link to toggle between asynchronous and synchronous execution.
• Create specific task with rule - Use this action to automatically generate a task for selected users.
Directive Types
Variables
Click this link to launch the Create Task Template program. Use this program to define a task that is created
when the application executes this action.
You can also insert arguments into the current task template. The application sets the value of the task template
to a value supplied by the business object method or table linked to the directive. To use this functionality, click
the Comments tab within the Create Task Template program. Then right-click within the Comments field and
highlight the Parameters sub-menu. Select the argument you need. The argument type must be appropriate for
specific
the field where the argument is used; if it is not, the application generates an error.
You can also insert variables into a task template. You do this by designing a Simple Query that pulls in these
values from a field you define. You use the Design Simple Query program to leverage this functionality. Launch
this program by first clicking the Comments tab within the Create Task Template program. Then right-click within
the Comments field and select the Field Query option. For more information about tasks, see the Task
Maintenance and Task List topics within application help.
Click this 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. Read the Support for
with rule
Multiple Dirty Rows section in this chapter for details about each option in this program. This variable is not
visible if the method data transaction does not support multiple dirty row updates.
• Synchronously invoke .NET method don’t queue record nothing with rule - Use this action to cause a selected .NET
method to run.
Directive Types
Variables
• Queue at both BPM server and Progress – Available for asynchronous execution.
Indicates whether to record the action call to the custom code. See the Recording and Playing Calls topic in
application help for information about how to play back the recorded call. Click this link to toggle between
the following:
• Synchronously execute ABL code… record nothing with rule - Use this action to attach an ABL procedure (.p or .r) program
to the method. When this action executes, the procedure program is run.
Directive Types
Method Data Updatable BAQ
All All All
Variables
• Show informational message based on the designed template with rule - Use this action to display an informational
message that you create. After users read the message and click OK, the method continues processing. BPM informational
messages are transmitted to alternate clients - Epicor Mobile Access, Epicor Web Access, Web Services and Service Connect.
Directive Types
Variables
Click this link to launch the Design Informational Message Template program. Use this program to
enter a message that contains information you want users to see. Based on the condition(s) you define for
designed the current directive, the information message displays. You can select one of the following Severity
modes when setting up an informational message: Information, Warning, Error and Update Conflict. You
can also select if the BPM message displays as an individual message or as a grid item.
Click this 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. Read the
with rule
Support for Multiple Dirty Rows section in this chapter for details about each option in this program. This
variable is not visible if the method data transaction does not support multiple dirty row updates.
• Raise exception based on the designed template with rule - Use this action to display an exception message when this
directive’s condition(s) is met. When this action activates, it stops all processing until the user reviews and clicks OK on the
exception message window. BPM exception messages are transmitted to alternate clients - Epicor Mobile Access, Epicor
Web Access, Web Services and Service Connect.
Directive Types
Variables
Click this link to launch the Design Exception Template program. Use this program to build an exception
message generated when the application executes the directive action.
Within the message, you can include values queried from related tables and fields. You do this by
designed
designing a Simple Query that pulls in these values from fields. You use the Design Simple Query
program to define these variables; launch this program by right-clicking in the Text field and selecting either
the Field Query or the Table Query option from the context menu. You can select one of the following
Severity modes when setting up a message: Information, Warning, Error and Update Conflict.
Click this 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. Read the
with rule
Support for Multiple Dirty Rows section in this chapter for details about each option in this program. This
variable is not visible if the method data transaction does not support multiple dirty row updates.
• Attach hold of the specified type with rule - Use this action to place a BPM hold on a specific record.
Directive Types
Variables
Click this link to launch the Hold Attachment program. Use this program to specify which hold should be
attached to a record when the application executes this action. You can select from any of the hold types
defined for the business object. You can also add an optional comment.
specified After a hold has been placed on a record, any subsequent directives can check for the presence of this hold
and perform various actions when a user attempts to execute a method that affects the record.
Hold types are created and maintained in Hold Type Maintenance. To learn about this program, read
the previous Hold Type Maintenance section.
Click this 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. Read the
with rule
Support for Multiple Dirty Rows section in this chapter for details about each option in this program. This
variable is not visible if the method data transaction does not support multiple dirty row updates.
• Remove holds of the specified type with rule - Use this action to remove a hold from a specific record.
Directive Types
Method Data Updatable BAQ
All Standard None
Variables
Click this link to launch the Hold Removal program. Use this program to specify a hold type that is
removed from a record when the application launches this action.
specified
You can select from any of the hold types defined for the business object. Hold types are created and
maintained in Hold Type Maintenance. To learn about this program, read the previous Hold Type
Maintenance section.
Click this 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. Read the
with rule
Support for Multiple Dirty Rows section in this chapter for details about each option in this program. This
variable is not visible if the method data transaction does not support multiple dirty row updates.
• Set the specified field of the changed row to the specific expression with rule - Use this action to change a selected field
to a different value, using a row set action that you define.
Directive Types
Variables
Click this link to launch the Select Table Field(s) program. Use this program to specify a standard or user-
specified defined field that is changed through this action. Use this program to select a field from any temporary
table (tt table) included in the current method’s parameters.
the changed Click this link to launch the Select a Row Set program. Use this program to specify which row set is
row affected when this rule activates – like the added row, the deleted row, the updated row, and so on.
Click this link to launch the Specify an Expression program. Use this program to compose an expression
that is evaluated against the comparison. The expression can contain literal values, data from the current
specific
transaction, and functions that can perform calculations and data type conversions. Click the Check
Syntax button to verify the syntax of your expression.
Click this 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. Read the
with rule
Support for Multiple Dirty Rows section in this chapter for details about each option in this program. This
variable is not visible if the method data transaction does not support multiple dirty row updates.
• Set the specified field of all rows identified by the designed query to the specific expression with rule - Run this
action to use a query to change the value of a selected field.
Directive Types
Method Data Updatable BAQ
All In-Transaction All
Variables
Click this link to launch the Select Table Field(s) program. Use this program to specify a standard or user-defined
specified field that is changed through this action. Use this program to choose a field from any temporarytable (tt table)
included in the current method’s parameters.
Click this link to launch the Compose Query program. Use this program to write an ABL and Business Activity
designed Query (BAQ) compliant query used with this action. In addition to standard tables, the query phrases can be run
against temporary tables to analyze values passed between datasets.
Click this link to launch the Specify an Expression program. Use this program to compose an expression that is
evaluated against the comparison. The expression can contain literal values, data from the current transaction, and
specific
functions that can perform calculations and data type conversions. Click the Check Syntax button to verify the
syntax of your expression.
Click this 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. Read the Support for
with rule
Multiple Dirty Rows section in this chapter for details about each option in this program. This variable is not visible
if the method data transaction does not support multiple dirty row updates.
• Enable dependent post-process directives - Use this action to launch any post-processing directives linked to this directive.
Use this action when you want an action to perform after the record is successfully validated and updated from the “tt”
(temporary) tables to the actual, or physical, tables.
You do not select any variables for this action. Instead, you link a post-processing directive to this pre- or base processing
directive by using the “this directive has been enabled from the specified directive” condition statement. You select the directive
that contains this action statement through the specified variable.
Use this action to test for conditions in a pre-processing or base processing directive and then launch a post-processing directive
based on these conditions. For more information, review the previous Conditions section. For more information on dependent
directives, read the Dependent Directives section later in this chapter.
Directive Types
• Call the named BPM Data Form using no customization always - Use this action to launch a custom program created to
collect data specifically for use during the BPM directive action. You create the program using the BPM Data Form Designer.
Review the BPM Data Form Designer section later in this chapter for more information about BPM data forms.
Directive Types
Variables
Click this link to open the Select BPM Data Form program. Use this program to specify which BPM
named
data form should launch when this action executes.
Click this link to open the Select BPM Data Form Customization program. Use this program to
no customization
select a customization to apply to the BPM data form when it is called.
• Always – The BPM data form is called each time the action executes.
always
• Only when mandatory data missing – The BPM data form is called to acquire data
required to complete the data transaction, but was missing from the data set.
• Set the specified field of BPM Data to the specified expression - Use this action to set the value of a field in a BPM data
table. This table is used with the custom data storage functionality available through CallContext tables. You can check the field
value in a condition of a further directive or pass this value on to the client application. For more information, review the Call
Context topics within application help.
Directive Types
Variables
Click this link to launch the Select Table Field(s) program. Use this program to specify a call context
specified (call context)
field that is part of the BPM action.
Click this link to launch the Specify an Expression program. Use this program to compose an
expression used as the call context variable value. The expression can contain literal values, data from
specified
the current transaction, and functions that can perform calculations and data type conversions. Click
the Check Syntax button to verify the syntax of your expression.
• Attach the specified public data tag to the changed row of the specified table with rule - Use this action to attach a
data tag to a record. You can apply data tags to records throughout the application. A common use of data tags may be to
group related records for searches or so that BPM directives can run when the records are modified. Review the Searches chapter
for more information about data tags.
Directive Types
Method Data Updatable BAQ
All All None
Variables
Click this link to launch the Specify a Value program. Use this program to enter a free-form text value
specified (data tag) that matches the data tag you want to apply to the current record. If the data tag has not been
previously defined, it will be created.
Click this link to toggle between two values: public and current user. Select public to attach a public
public data tag to the current record. Select current user to attach a private data tag for the current user to
the current record.
Click this link to launch the Select a Row Set program. Use this program to specify which row is
the changed row
affected when this rule activates - like the added row, the deleted row, the updated row, and so on.
Click this link to launch the Select Table program. Use this program to specify the table that is changed
specified (table)
through this action.
Click this 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.
with rule
Read the Support for Multiple Dirty Rows section in this chapter for details about each option in this
program. This variable is not visible if the transaction does not support multiple dirty row updates.
• Remove the specified public data tag from the changed row of the specified table with rule - Use this action to remove
a data tag from a record. You can apply data tags to records throughout the application. A common use of data tags may be
to group related records for searches or so that BPM directives can run when the records are modified. Review the Searches
chapter for more information about data tags.
Directive Types
Variables
Click this link to launch the Specify a Value program. Use this program to enter a free-form text value
specified (data tag)
that matches the data tag you want to remove from the record.
Click this link to toggle between two values: public and current user. Select public to remove a public
public data tag from the current record. Select current user to remove a private data tag from the current
record for the user that initiated the transaction.
Click this link to launch the Select a Row Set program. Use this program to specify which row is
the changed row
affected when this rule activates – like the added row, the deleted row, the updated row, and so on.
Click this link to launch the Select Table program. Use this program to specify the table that is changed
specified (table)
through this action.
Click this 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.
with rule
Read the Support for Multiple Dirty Rows section in this chapter for details about each option in this
program. This variable is not visible if the transaction does not support multiple dirty row updates.
Some methods only allow changed rows to process one at a time, and so do not support multiple dirty rows. However, some methods
can send multiple dirty rows together as a set to the server for update.
When multiple rows are sent to the server at the same time, you can specify a directive to take action on the batch of rows in
a specific way. These actions are available for both method and data directives:
• Once passing all matching rows - The action executes once as it moves through the data within the set of dirty rows, but it
only gets the rows that match the selection criteria.
• Once passing all existing rows - The action executes one time as it moves through the data within the set of dirty rows, and it
checks all rows within the dirty row set.
• For each matching - The action executes for as many times as the number of rows that match the selection criteria in the dirty
row set. Each row processes individually.
• For each existing - The action executes for as many times as the number of rows within the dirty row set (the overall number
of dirty rows). Each row processes individually.
Directive Compatibility
Each directive must be compatible with the current version of the application.
To learn about the specific rules the BPM module
When a new version is installed, the BPM module runs routines to make sure
uses to test compatibility, read the Directive
the directive still works as expected.
Compatibility topic within application help.
A directive must be checked for compatibility through three situations:
• Importing Directives – If the directive is imported into your application, the import process validates the directive for
compatibility. If the directive is not compatible, an error message displays. For more information about this process, read
the Import Directives section in Chapter 13: Business Process Management Utilities.
• Service Packs – Each time a service pack is installed, use the Administration Tools program to run the “Validate BPM
customizations of business methods” conversion program. You do this by clicking the Run Conversion Program button and then
selecting this program from the Dialog Conversions window. This program analyzes each method signature to verify it works
with current method directives, data directives, and database tables. If it discovers an issue, the Compatible check box is cleared
on the specific directive’s Detail sheet.
• Patches – Each time a patch is installed on your application, you need to manually verify that all directives are compatible.
You do this by running the Validate Method option from the Actions menu.
Main Menu Path: System Management > Business Process Management > Setup > Method Directives
To correct incompatible directives, you need to load it into the Method Directives or the Updatable BAQ Directives program and
change it to match the revised method signature or table structure.
To help you locate these directives, the Method Search and Table Search programs are set up to only search for outdated directives.
Dependent Directives
You can establish relationships between directives created for the same business object method. These relationships are dependent;
if one directive executes successfully, the application runs the other directive. This first directive is called the Primary Directive, and it
becomes the condition for the second, or Dependent, directive. Dependent directive processing applies only to method directives, and
not to data directives.
Using dependent directives helps prevent errors. Leverage this function when you do not want to update a record or send a
confirmation email until you are sure the transaction completed successfully. If an action is run before the transaction, there may be an
error in the data – but the action runs anyway. For example, a confirmation email may be sent indicating the transaction was
successful, when actually it was not. If the condition for the email, however, is on a dependent directive, you know for certain the
transaction was successful before the email was sent.
To do this, you first create the primary directive and then the dependent directive. Both directives are created for the same method.
Primary Directive
The primary directive must either be a pre-processing or a base processing directive. After you define the condition for the directive, do
the following in the Actions window:
Dependent Directive
This directive must be a post-processing directive. To create the dependent directive, launch the Conditions window and do
the following:
3. Click the “specified” link to select the pre-processing or base processing method. In this example, the Condition Test to
Remove Hold directive is selected.
This condition statement indicates the application runs the dependent directive’s actions when both the primary directive executes
successfully and the other conditions in the dependent directive are met.
Case Studies
This section of the chapter explores some step-by-step case studies. Each case study explores a different aspect of the functionality you
can leverage within the BPM module.
In this example, you make the Phone Number field required on all customer records.
Menu Path: System Management > Business Process Management > Setup > Data Directives
7. Click OK.
9. Click Save on
the Standard toolbar. 9
1. Click the Down Arrow next to the New button; select New In-Transaction
Directive. The directive must be “in-transaction” so that the transaction can
stop before the updated record without a phone number is committed to the
database.
5. The Conditions 5
window displays. 6
9 7
7. From the User Text list, select “the specified field of the changed row is equal to the specified expression”.
8. Notice the text in the Error Text field. This indicates the condition is not set up correctly. If you hold your mouse pointer over
this field, the complete explanation for the error displays.
12
13
17
18
To define the action that causes the Phone Number field to be required:
9. Click OK.
Main Menu Path: Sales Management > Order Management > Setup > Customer
4. Click Save.
6. Click OK.
To follow this example, you must first add and customize a user-defined table that contains State codes linked to a current company
within your application. To create a user-defined table similar to this program:
When you have customized a user-defined table and entered all the state records, you are ready to create the method directive that
references this data. To create a directive for the Vendor.Update method:
Main Menu Path: System Management > Business Process Management > Setup > Method Directives
4. Click Search. 4
6. Click OK. 3
1. Click the Down Arrow next to the New button; select New Pre-Processing.
4. The Conditions 4
window displays. 5
12. When you finish entering the custom query, click OK. This query is written in valid ABL syntax. To support optimistic
record locking, the application framework maintains a copy of
the original record and the updated record. It then sends both
of these rows to the server when the Update method is
launched. To identify the Updated or Added row rather than
any original row, it is necessary for the query statement to
specifically target that row through the RowMod column.
The valid entries for a changed row are A=Add, U=Update,
and D=Delete.
18
2. The Actions 2
window displays. 3
3. Click the New button to
create a new action.
9. Click OK.
Main Menu Path: Material Management > Purchase Management > Setup > Supplier
Typically you use this functionality to intercept a method before it is processed (through a pre-processing directive) to prevent this
method from running its normal routine. This type of method directive is called an inhibitor.
In this example, you create a Shop Employee hold. This hold is used with a custom check box within the Employee Maintenance form.
If the check box is selected, the shop employee is not able to start an activity without supervisor approval.
4. The Conditions 4
window displays. 5
8
8. The Select Table Field(s)
window displays.
9
9. Click the Table drop-down list to
select ttEmpBasic.
5. Click OK.
6
6. You return to the Method
Directives window. 8
4. The Conditions 4
window displays. 5
14
14. Click OK.
To create an action for the new hold type you created – Supervisor Hold:
2. The Actions 2
window displays. 3
9. You return to 9
the Actions window.
12
12. You return to
the Method 14
Directives window.
To create a method that blocks the Start Activity for an employee on Supervisor Hold:
To create a pre-processing directive that checks for the state of the Supervisor Hold directive:
4. The Conditions 4
window displays. 5
10
11
To complete this method directive, you need to add an action that alerts the shop employee that, because of the hold, the activity
cannot start.
8. Click OK.
9. You return to 9
the Actions window.
12
12. You return to the Method
Directives window. 14
13
To create a directive that checks to see if the supervisor hold on the shop employee can be removed:
11
13
15
16
17
17. You return to the
Conditions window.
To finish this pre-processing directive, you need to create an action that enables post-processing.
5. Click OK.
6
6. You return to the Method
Directives window. 8
To complete the directives, you create a post-processing directive that removes the supervisor hold. The shop employee can then run
a selected MES activity.
4. The Conditions 4
window displays. 5
You complete this directive by adding an action that removes the supervisor hold.
2. The Actions 2
window displays.
3
3. Click the New button
on the toolbar.
8. Click OK.
12
12. You return to the Method
14
Directives window.
13
However, before you can test the directives, you need to customize Employee Maintenance. You must add the Supervisor Hold
check box.
1
1. Activate Developer Mode and
launch Employee Maintenance. 6
Main Menu Path: Production
Management > Job Management >
Setup > Employee
2
2. Click Tools > Customization to launch
the Customization Tools Dialog.
7
7. Now launch Employee
Maintenance in run 10
mode.
14
In this example, you want 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. The first part of the process publishes the customer
address information from the Customer Contact Update dashboard.
With the dashboard in Developer mode, follow these steps to publish data so it can be used in a BPM directive:
• Customer.Address1
5
• Customer.City
• Customer.State 6
• Customer.Country
7 8
• Customer.Zip
9
6. In the Call Context Subscriber grid,
click New.
10
7. From the Publish Column,
select Customer.Address1.
9. Add the remaining address columns to the Call Context Subscriber grid using the following information:
• Customer.City = Character02
• Customer.State = Character03
• Customer.Country = Character04
• Customer.Zip = Character05
4. Click Search.
6. Click OK.
You are now ready to add a directive to the updatable BAQ. In this example, the directive will default a new contact’s address
information when the user creates a new contact using the Update Customer Contact dashboard. The directive uses the information
published from the dashboard to set the values in newly added contact records.
12
13
13. You return to the
Actions window.
18
25
29
31
5. The dashboard 5
displays. 6
6. Click the Refresh 9
button on the
Standard toolbar
to retrieve the 7
customer data.
9. Click New.
8
10. A new row is added to the
Customer Contacts grid.
The address information 10
from the customer record is
added to the contact’s address
fields.
Chapter 12
Custom Business
Process Management
The previous chapter explained how you can leverage the set of default actions released with the Business Process
Management (BPM) module. You can extend this functionality, however, by programming custom actions.
This functionality is only available if your user account has BPM Advanced User permissions.
Custom program actions can be defined in the C#, Visual Basic .NET, or ABL programming languages. At their base level,
custom actions are essentially event handlers that extend or replace the functionality of server-side application business logic.
Be aware that code written using Progress can only update tables within the current transaction. If you need to update tables
outside of the transaction, you need to purchase a provision for this additional functionality. You may also be able to create a
special routine that can handle this function; contact your Epicor consultant for more information.
You begin the custom action programs within the BPM module by creating an action template. You then open this template
within a .NET or ABL environment where you program the action. Lastly, you deploy the custom action to either the
application server or the BPM server. You can then use this custom action within your method directives.
BUSINESS PROCESS MANAGEMENT | CHAPTER 8
This section describes how you use the BPM tools to create and enter your custom code. Specific details about code
languages, however, are beyond the scope of this user guide. If you have any questions about your custom code, refer to the
various reference guides and training manuals available for the programming language.
You launch the Method Advanced Options program from within the Method Directives program. Here’s how:
3. Select Advanced. 1
4. The Method 4
Advanced Options
program displays. 6 7 5 8 9
9. The Type field displays the classification for each argument. This example displays the CHARACTER, TABLE, INTEGER,
and LOGICAL types.
10. Click the Create Programming Interface button to launch the Create Programming Interface Wizard. You use this wizard
to create a template for a custom action. Read the next section for details on how to use this functionality.
• An action template for a .NET assembly – The wizard launches the Action Template Generator, which you use to create a
.NET action template. You then write custom code within the template, deploy the action to the server, and then attach it to a
method directive.
• An action template for an ABL procedure – The wizard launches the Action Template Generator so you can create an ABL
action template. You then write custom code within the template, deploy the action to the server, and then attach it to a
method directive.
• Connect to an Epicor Service Connect workflow – The wizard launches the Programming Interface Generation program.
Use this program to create the schemas required for the workflow.
3. Click Next.
6. The Out Schema field displays the path and filename used to generate the Out Schemas for the workflow.
7. Click Finish.
The schemas are now saved within this location. Review your Epicor Service Connect documentation and the Epicor Service Connect
User Guide to learn how to design your workflow.
4. Click Next. 3
• After – Select this check box to create a method or procedure template that runs as a post-processing action after
the method.
In this example, you select both the Before and After check boxes.
9. The Code Area field displays the default .NET method template or ABL procedure template required to execute this custom
action with the current method. In this example, two action templates are created – one that runs before the GetRows method,
and one that runs after the GetRows method.
10. If the code does not automatically appear, click the Generate button to create the code template as expected.
13 14
Most transactions start with a GetNew or GetByID method to either populate When you write ABL or .NET code, be sure you are
default values into the dataset or to retrieve existing data from the database. identifying the correct row within the dataset. You
The client keeps a copy of the original row and sends this back through an must do this because the Update method creates
Update method along with the updated row. The server then compares the two copies of the row within the inbound dataset. If
original copy of the row to the current row on the actual, or physical, the copy of the returned row to the client does not
database to make sure it did not change from another source before it match the actual database, you receive an error and
updates the row. In these cases, only the changed row has an A (Add), future updates also fail. This feature is part of the
U (Update), or D (Delete) value in the table’s RowMod column. Optimistic Record Locking Mechanism; it applies to
both conditions and actions.
.NET Process
To enter the programming logic for a .NET action:
4. If you need, enter a Reference to the BpmCallContext.dll assembly. Add this reference if you want to view information about
how the action was called by the BPM functionality. This assembly is found within the BPMServer folder.
CHAPTER 8 | BUSINESS PROCESS MANAGEMENT
5. Write the custom business logic in the body of each method. For example, if you are creating a custom action for entering ABC
Code records, you could enter code similar to the following:
Trace.WriteLine(“Before a call to
AbcCode.GetRows()”);}
Trace.WriteLine(“After a call to
AbcCode.GetRows()”);} }
ABL Process
To enter the programming logic for an ABL action:
1. Open your .p file within an OpenEdge (Progress) procedure. An example of a Progress procedure is the AbcCodeAction.p file.
2. Write custom business logic to the internal procedures. For example, if you created an action template that checked data before
and after an ABC record was entered, you would enter code similar to the following:
PROCEDURE GetRowsBefore:
DEF INPUT-OUTPUT PARAM whereClauseAbcCode AS CHARACTER.
DEF INPUT-OUTPUT PARAM DATASET FOR AbcCodeDataSet.
DEF INPUT-OUTPUT PARAM pageSize AS INTEGER.
DEF INPUT-OUTPUT PARAM absolutePage AS INTEGER.
DEF INPUT-OUTPUT PARAM morePages AS LOGICAL.
{&TRY_PRIVATE}
OUTPUT TO “c:\BpmActionText.txt”.
EXPORT STRING(NOW)+ “Before AbcCode.GetRows()”.
OUTPUT CLOSE.
{&CATCH_PRIVATE}
END.
PROCEDURE GetRowsAfter:
DEF INPUT-OUTPUT PARAM whereClauseAbcCode AS CHARACTER.
DEF INPUT-OUTPUT PARAM DATASET FOR AbcCodeDataSet.
DEF INPUT-OUTPUT PARAM pageSize AS INTEGER.
DEF INPUT-OUTPUT PARAM absolutePage AS INTEGER.
DEF INPUT-OUTPUT PARAM morePages AS LOGICAL.
{&TRY_PRIVATE}
OUTPUT TO “c:\BpmActionText.txt”.
EXPORT STRING(NOW)+ “After AbcCode.GetRows()”.
OUTPUT CLOSE.
{&CATCH_PRIVATE}
END.
BUSINESS PROCESS MANAGEMENT | CHAPTER 8
3. Verify your ABL syntax is correct.
Actions always take parameters by reference – including actions that run before (pre-processing) the method. Even if a parameter is
defined as OUTPUT for the business object method, the action might be executed before another action. Because of this, it should
inspect the current parameter value.
This section displays examples of how a Method Signature needs to be mapped to a C# Action Signature and an ABL
Action Signature.
Using this example, the blank C# action for this example appears like this:
If the action is developed in ABL, the signature maps to the same signature as the source method – except for the data direction,
which must be INPUT-OUTPUT for all parameters.
Poor performance makes for even poorer scalability. Your Epicor application should support 25-35 concurrent users per AppServer and
have less than 50,000 SQL Server requests per second. Even taking five seconds to run a method can reduce efficiency. During that
time, at least one CPU core is fully consumed, which impacts response times for other users. Minor performance and SQL Server
efficiency improvements provide significant scalability benefits — improving use of the application across your entire organization.
Most of the excessive SQL query traffic comes from requesting individual
rows and then evaluating a lot of data as the query moves through the While Progress does have other table join patterns,
database tier. Usually this happens when using FIND FIRST, CAN FIND, only the inner join pattern is efficient on SQL Server.
and FindTbl.i statements within FOR EACH code blocks. Those nested
statements must be consolidated with the outer FOR EACH statement.
JOINING tables can radically reduce the number of SQL Server requests. You
do this by using the FOR-EACH…,EACH…, EACH… pattern in 4GL (ABL);
these statements execute an inner table join.
You should also include field lists with your inner joins. Using field lists is a good practice that can increase database efficiency.
Many tables have several columns that can be included in queries, but usually most queries only need one or two values. Including all
of these columns in a query creates additional, unnecessary disk and network I/O traffic, and this extra traffic combines with other
overhead all the way through the database. This slows down the entire database.
A good example is the use of text columns. Text columns are stored off-page in SQL Server, meaning they require extra disk I/O
to read. But text columns are rarely needed in the application logic, so pulling them into every query is an inefficient use of
server resources.
Field lists are also critical for effectively using inner table joins. Without them, every row returned will have every column from every
table in the aggregate statement. For example, joining OrderHed and OrderDtl without a field list will return rows with 680 columns.
One major cause of poor performance are nested queries; this occurs when a FindTbl.i statement is run within the FOR EACH loop.
If a record does not exist, the query then skips through the code. The following code is an example of a nested query:
This code is inefficient because each run through the code generates a new database query. If 2000 PartWhse records are in the
database, this code will send 2001 queries to the database. Instead, you should join the PartWhse and Warehse tables. You can then
run the same code using just one database query — a major improvement over 2001 queries. The following code is an example of
a more efficient query:
partwhse-loop:
FOR EACH partwhse
fields(Company WarehouseCode partnum)
WHERE PartWhse.Company = Part.Company AND
PartWhse.PartNum = part.PartNum NO-LOCK,
EACH Warehse
fields()
where Warehse.Company = partwhse.Company
and Warehse.WarehouseCode = partwhse.WarehouseCode
and Warehse.Plant = cur-plant
BY PartWhse.Company PartWhse.PartNum PartWhse.WarehouseCode
no-lock:
This code pattern is an inner table JOIN, indicated by the nested EACH statement. The database will evaluate the PartWhse and
Warehse rows together and return only records that contain both warehouse and part warehouse data.
You can also use inner joins to gather the right rows instead of querying multiple rows and then eliminating the rows you do not
want. This creates a targeted, efficient query. The following code example is a search routine that could be drastically improved by
collecting the right rows. This code example creates search results by looking for qualifying order releases, jobs, and other related
database items.
While this code executes a nested query that could be consolidated with the outer query, the code is still inefficient. If the nested
query is not successful, you move onto the next row. Because of this, the code is pulling in all of the records and then eliminating any
rows that do not match the query parameters. You should instead consolidate these queries using a JOIN, as the code will then
automatically filter out rows based on the WHERE clause.
Progress only supports inner joins for SQL Server. Because of this, Progress only returns rows that have a matching joined row.
This feature is useful for filtering out rows in queries, but it also means you cannot use a join to get optionally related tables.
For example, Customer records can optionally have a GroupCode value, which is the key used to access the CustGrup table.
In the example query below, only rows with a GroupCode value are returned. Customer rows that have a blank (or NULL) value are
not returned. Make sure you want this behavior in your query.
Always use FIELD lists for joined tables. If you do not use FIELD lists, the results will contain all columns from all tables. Pulling in
excessive data through inner joins reduces performance by almost as much as not leveraging inner joins. If you do not need any
columns from a joined table (this happens frequently), specify an empty field list: FIELDS()
You can also use EXCEPT to filter out unwanted columns - like the UD columns.
Only use a table JOIN if the joined columns will select one row (or zero if you are filtering data). If you JOIN to a table that uses
a column list which does not represent a unique row, the database produces all of the joined rows together using a copy of the
main table.
This situation, called a Cartesian product, is inefficient and can cause issues. The following code is an example of an inefficient query:
Several things are wrong with this example (no field list, no sort, and so on). But the main problem is that without the selection
criteria, this routine will return all order headers multiplied by all order detail records. As a general rule, you should match a table’s
foreign key to the joined table’s primary key.
The following example illustrates how you match the foreign key to the primary key (to clearly illustrate this concept, this code does
not contain the FIELDS lists):
You can join as many tables and include non-key columns to filter the data as you need. For example, the Fulfillment Workbench
search selects order releases (OrderRel records) that also have complex related-data requirements. The requirements:
1. The matching PartDtl record must have the RequirementFlag value = “Y”.
3. The output temp table needs the CustID and name of the order’s customer.
All of these requirements can be consolidated into a single query using a JOIN operation:
When this query was first created for the Epicor application, it sent thousands of queries to the database server. However, now
through leveraging these inner joins, this code has drastically reduced that count to just one query. This technique is much more
efficient than nesting the PartDtl, OrderDtl, OrderHed, and Customer queries within the FOR EACH as separate queries.
Also note the use of the empty field list option (“FIELDS()”) on the PartDtl, OrderDtl, and OrderHed tables. This tells the database not
to bother returning any columns except those required to complete the join operation.
Consider including a sort order in the query. When tables are joined, SQL Server will collect rows in the most efficient way - leveraging
all the indexes together. In this situation, the code will not determine the sort order. If the order of the returned rows matters, like in
cases where a temp table is produced that returns to the client, make sure to specify a sort order.
Generally, you can do this by just using the columns and other items from the primary index of the outer-most table (the one in the
FOR EACH statement).
Joining tables is only more efficient when secondary tables are joined using the EACH statement. Progress allows joins using a FIRST
statement, but this will not run efficiently on SQL. So be aware of this situation if you use a FIRST statement in a join.
Remember to use the correct locking hints throughout the query code. If you want a NO-LOCK query, you need to specify NO-LOCK
on each table in the query.
You can deploy .NET actions without restarting the BPMServer. The new version activates as soon as it overwrites the original
action assembly.
You can now use your custom action within your method directives.
2. The Actions 2
window displays. 3
tcp://bpmserver:2010/AbcCodeAction.dll/Bpm.Custom.AbcCode.OnAfterGetRows()
8. If you do not know the location of the method, click the Browse button to find and select it.
9. The Validate button indicates whether the URL is in the correct syntax.
10. If you need, select the Asynchronous check box. This indicates this When an action runs asynchronously, BPM saves all
action can run asynchronously from the condition statement call which the information that defines the action – like the URL
initiated the action. This can occur when the condition statement call and the parameter values – within a queue. The
does not modify any of its parameters or when it does not require that application then executes the method without
the transaction be suspended while it runs. waiting for the action to begin and complete. .NET
actions can be queued both on the Progress server
11. The Queuing Mode indicates how the application queues calls to this using the BPM Async Processor, and the .NET server
action. Available options: by the BPMServer. For more information, read the
Asynchronous Action Overview and the Monitoring
• .NET Asynchronous Actions topics within application help.
• Progress
• Both
12. If you need, select the Call check box within the Record section.
For more details about using the Bpm/playCall.p
This indicates you will record all the calls to this action. This recording
procedure and troubleshooting custom .NET actions,
can be replayed using the Bpm/playCall.p procedure. Use this
read the .NET Action Implementation Details,
procedure to review and correct any issues that occur with your custom
Troubleshooting .NET Actions, and Recording and
.NET action.
Playing Calls topics within application help.
13. If you need, select the Return check box within the Record section.
This indicates you will also trace all return values generated by this
action to the Bpm/playCall.p procedure.
14. Click OK. This both validates the URL and exits the program.
2
2. The Actions
window displays. 3
12 13
15 14
9. The Code field below activates (this activation is not displayed in this
If you use the Execute code below option, do not
example; see the ABL case study later to review this functionality).
put in procedure declarations or try/catch macros in
Use this text box to enter your ABL statements in the text box.
your code. These declarations are automatically
added to the action by the BPM functionality. For
10. If you want to link this action to the code you created in the ABL
more information on manually entering ABL
programming environment, select the Forward to procedure
statements, read the Attaching the Action to
radio button.
a Method topic within application help.
4
11. Enter the URL path to this procedure in the accompanying field. Use the The action file you select must contain the following
following syntax: files: {manager/Exception.i &TO_LOG} and
[subfolder of BPM/]{action procedure
{bo/BOName_ds.i} The BOName value is the name of
file}.p\{internal procedure name which
the business object to which this custom action is
corresponds to the action}
attached. For more information on selecting an ABL
procedure, read the Attaching the Action to a
Method topic within application help.
In this example, you enter the following URL path:
MyActions/AbcCodeAction.p/GetRowsAfter
12. If you need, select the Call check box in the Record section. This causes
Use the Bpm/playCall.p procedure to troubleshoot
the BPM functionality to trace all calls to this procedure. This recording
and correct ABL actions at a more convenient time –
can be replayed using the Bpm/playCall.p procedure.
like after business hours. For more details on how to
review the calls and returns generated through these
13. If you need, select the Return check box in the Record section. This
check box options, read the Recording and Playing
indicates you will also trace all return values generated by this action to
Calls topic within application help.
the Bpm/playCall.p procedure.
14. Click the Validate button to verify the ABL procedure works properly.
You can create everything from simple forms which contain text and two buttons (for example, Abort and Continue) to complex forms
which include entry fields that update your database. BPM data forms capture data or button actions in order to control a specific
BPM processing directive. Use this functionality to either conditionally display a form or capture the data required against a
specific transaction.
When a custom BPM Data form displays, the directive pauses until the user enters the required data or clicks the appropriate button.
Note, however, the method call is still active on the server. When the user completes the requirements on the BPM custom form, the
call is sent to the server again, but this time it skips all the actions it previously ran.
5. Optionally add Form Text that details the purpose of the form and any instructions required to use it. You can add links to
content of fields in CallContext tables. Before the BPM custom form displays, this data is pulled from the field content and is
shown as text within the BPM form.
6. Click Save.
8. Use the Default field to specify a value that displays in the field automatically when the form launches. If needed, the user can
change this value.
9. The Order field indicates where the field displays on the form. Higher numbered fields appear after lower numbered fields.
The application automatically increments this field by 10 for each field you add in the order that you add them.
10. Different field types, such as radio buttons, require you define which Field Values options are available. Enter these options in
the Field Values grid.
14
15
16
17
Case Study
This section of the chapter explores a step-by-step case study of a custom BPM directive. Use this as an example for your own custom
BPM directives.
For this case study, you modify the Sales Order Line Entry method to verify the On-Hand Quantity for each inventory part – and check
for substitutes if the On-Hand Quantity in the primary warehouse is less than or equal to zero. If a default substitute part is available,
it is selected in place of the entered part. If there is no default, the first available substitute part is used.
No Condition Needed
You do not need to create a condition statement for this directive. When you do not define a condition, the directive just executes
each time its method is called – in this case, the SalesOrder.ChangePartNum method. This causes the custom ABL code to run
automatically with the method.
You now must define the ABL action that runs each time this directive activates. Here’s how you create this action:
7. The large text box becomes active. Enter the following code:
8. Click OK.
CHAPTER 8 | BUSINESS PROCESS MANAGEMENT
9. You return to the Actions window.
10. This action has to be synchronous in order to run. Before you exit the Actions window, make sure that it is set up to
synchronously execute ABL code.
You now must enable and save the directive. Here’s how:
1
1. You return to the Method
Directives window.
You can now test the directive by creating a sales order line for a part that does not have any stock. In this example, part BPM1000 is
used because it does not have a stock quantity value. This part record also has a substitute part, 1032FW, that is used instead.
8. Click Search.
7
9. Select the BPM 1000 part.
10
Chapter 13
Business Process
Management Utilities
Various utilities are available in the Business Process Management (BPM) module to help you:
• Update a group of directives to apply new settings or to keep directives up-to-date when a new version of Epicor
is installed.
This chapter explains how to use the Action Process program to set up a schedule for BPM processes and how to
troubleshoot issues that may occur. It also explains how to use the Directive Import and Export programs, which are useful for
moving groups of directives between Epicor installations. Lastly, it shows how to use the Directive Update program to apply
settings to a group of directives or to ensure directives remain compatible with new versions of the Epicor application.
Action Processing
When you have defined the method directives your application will run, you are ready to set up the action process schedule.
This regular schedule causes the BPM functionality to run periodically, updating the BPM task queue and processing asynchronous
method directives.
You do this by setting up the BPM Process task to run on a recurring schedule. To do this, you first create the schedule you want.
You then set up the process to run using this schedule.
System Agent
You create recurring schedules through System Agent Maintenance. Use this
To learn about creating new schedules within
program to create the different schedules you need for running your method
the System Agent, review Chapter 1:
directives. When you have created the schedules you need, you are ready to
Automatic Data Processing.
launch the BPM Action Process program; the next section explains how to run
this program.
You can set up this task to run on a recurring schedule. This automatically To learn more about how the BPM functionality
processes all calls made by your method directives. processes asynchronous actions, read the BPM Async
Processor topic within application help.
Main Menu Path: System Management > Business Process Management > General Operations > Action Process
CHAPTER 8 | BUSINESS PROCESS MANAGEMENT
You can define how often you want this process to run. Here’s how:
3. The Log Filename displays the directory path and log file that records the asynchronous processing actions. You can enter this
path directly or click the Log Filename button to find and select it.
4. However, if you want this process to run following a schedule, select a Schedule option from the list. Epicor recommends that
you select an Interval schedule type, as this schedule then runs every few minutes. To learn how to create schedules, review
Chapter 1: Automatic Data Processing.
5. Select the Recurring check box to indicate this process runs on a regular basis. The BPM process launches each time the system
clock passes the interval defined within the selected schedule.
Your BPM method directives are now regularly processed by the application.
Troubleshooting Actions
Tools are available to help you further troubleshoot your actions – the BPM
More information about these tools is available
Server Action Log, the BPM Async Processor Log, and the BP Monitor. This
within application help. To learn about using the
section describes how these tools can help you correct issues with
BPM Server Action Log and the BP Monitor, review
your actions.
the Troubleshooting .NET Actions topic. To learn
about using the BPM Async Processor Log, review
the BPM Async Processor topic.
A good place to start troubleshooting .NET actions, including asynchronous actions, is through the BPMServer Action Log. Exceptions
caused by .NET actions are recorded in this file. Typically this action log is found in the Epicor > BPMServer > Logs directory.
If you are running any asynchronous actions, you can use the BPM Async Processor Log to review each asynchronous action. This log is
also typically found in the Epicor > BPMServer > Logs directory. It lists the following information about each action:
• Startup timestamp
• Completion timestamp
BUSINESS PROCESS MANAGEMENT | CHAPTER 8
BP Monitor
If you cannot find the reason for the issue after you review the logs, check to see if the action is called by the application. To do this,
use the BP Monitor tool. This tool is found on the BPM Server machine by using the Start button. It is found under the Programs and
BPM menus.
Use the BP Monitor to attach the action to a business method. You can then view calls either placed or not placed by the action. You
now have the details you need about any issues with the action's calls.
Directive Management
To complete the BPM functionality, the module comes with programs that help manage your directives. You can export your directives
out to another Epicor installation, where they can then be imported. You can also update the directives to make them compatible with
the current version of the application.
Groups
This functionality requires you use Groups. Each group contains related directives. By placing related directives together, you can easily
export, import, and update the directives as you need.
You create and select groups within the Method Directives, Data Directives, or Updatable BAQ Method Directives programs. The
Pre-Processing > Detail, Base Processing > Detail, and Post-Processing > Detail sheets 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. For more information, read the Method Directives section in Chapter 11: Business Process Management.
Directive Export
Use the Directive Export program to export all the 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.
Main Menu Path: System Management > Business Process Management > General Operations > Directive Export
Here’s how you use this program to export a group of method directives:
2. Enter the File Name for the exported file. This filename is
the source path for the exported directive. You can enter
the directory path and filename directly in this field, or 1
click the File Name button to find and select it.
2
The default filename is Export.bpm, but you can change
this name if you need. Do not, however, change the .bpm 3
file extension name. This file extension name is required
by the application.
Directive Import
Use the Directive Import program to import a group of exported method directives into your application.
Main Menu Path: System Management > Business Process Management > General Operations > Directive Import
Here’s how you use this program to import a group of method directives:
4. Click the Import button to import the method directives into your application.
Import Compatibility
The import program also checks the compatibility of each imported directive. The following describes how this program checks the
compatibility of each directive:
• If the directives have the same version number as the current application, the directives are successfully imported.
• If the directives are from a previous version of the application, the import process validates all methods for compatibility. If any
incompatible directives are found, an error message displays. The incompatible directives are still imported; however, their status
is set to Out of Date.
• If the directives are from a newer version of the application, the imported directives are rejected and the application displays
an error message.
Directive Update
Use the Directive Update program to 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. You can also recompile the group directives to make them compatible with the current version of the application.
Main Menu Path: System Management > Business Process Management > General Operations > Directive Update
32
Update a Directive Group
If you upgrade your Epicor application, method directives created within the previous version most likely become incompatible. If you
upgrade from 9.00 to 9.05, for example, your 9.00 directives are out-dated and cannot run within the 9.05 version.
Although you can fix each directive individually within the Method Directives program, you can instead recompile and fix most of the
directives within the selected group using the Directive Update program. If this functionality is unable to recompile a method directive,
however, it also displays a results log which indicates what is causing the recompile error.
4
4. The Directives
recompile results
window displays. 5
Tracing Log
Use the Tracing Log tool to set up a tracing log that captures all the calls the user interface makes to the server. When you activate
this log, any business logic (BL) calls sent to the server are automatically recorded within this log.
Run this log to fine-tune your BPM directives. You can use it to find out which business logic method calls are made. You can also find
out the duration of these business calls. Lastly, you can also see the data that is sent to and from the server.
To make this log easier to review, you can organize it by entering Mark Text; all
A pre-built .xml style sheet is included with this
calls that reference this mark text are then grouped together. You have the option
functionality. It is recommended that you use
to display this log either as a text (.txt) file or as an .xml file.
the .xml file format, as it organizes these calls in
1
a readable format.
You launch this program from the Main Menu. To do this:
11 12 13
3. Select the Write Full DataSet check box if you want to record all data within the tracing log. If this option is not selected, only
header information is stored within the log.
4. Select the Track Changes Only check box if you only want changes to the dataset recorded within the tracing log. All changes
to columns in the dataset are then stored within the log.
5. Use the Write Call Context Dataset check box to include Business Process Management (BPM) table values on the trace log.
This information provides the data context for a call each time a call is sent between the client and the server. This information is
useful for developing BPM method directives, as you can intercept these calls to run additional processing to verify data and
other custom functions.
6. The Current Log File displays the directory path and filename of the tracing log.
7. Click the View button to display the log within a .txt format.
8. Enter Mark Text to organize the tracing log so it is easier to review. To use this field, enter the text you need and then click
the Write button. All the calls that reference this mark text are grouped together within the same section of the tracing log, for
example, abccode lookup.
9. The XML File field displays the directory path and filename used for the .xml version of the tracing log. Click the Browse
button to find and select this directory path and filename.
10. Click the Create XML button to save the tracing log in the default .xml format. This file can then be viewed within any web
browser. The Mark Text values you enter for this log also appear as options on the .xml file.
11. To remove all entries from the tracing log, click the Clear Log button.
12. To add all these current settings to the tracing log, click the Apply button.
Chapter 14
Security
You can first restrict access to various parts of the Main Menu through run time arguments. By adding a Menu ID run time
argument to a desktop icon, the Epicor application will only display the programs available under this specific Menu ID.
You define internal security for your application through two key programs. First, use Security Group Maintenance to create
the security groups you need. Then assign all users within your application to these security groups through User Account
Maintenance.
With security groups and their selected users defined, you can then assign security privileges throughout the application. For
example, you may want to prevent access to Payroll programs for most users. You can use the security privilege tools to only
give members of the Payroll security group access to these programs.
You set up security privileges through three maintenance programs. Menu Maintenance can prevent programs from being
displayed for specific security groups and users. To block access to a program or program function (like updating records)
from wherever it can be launched, use Process Security Maintenance. You can also block or limit access to a specific field by
using Field Security Maintenance.
To review security settings and user activity, run various reports and launch the System Activity Log. The Menu Security report
displays the current access rights specific users and security groups have on the Main Menu. Other reports are available that
display user activity, so run these reports to verify the security settings work as expected. The System Activity Log tracks
database modification activity within the application; use this tracker to review the database activity for a specific user, table,
date, and so on.
You can use the “/ menuid” run time argument to cause the Main Menu to only display a specific sub-menu or a specific program.
The user who launches the Epicor application using this icon is then limited to the programs accessible within either the menu or the
specific program. This feature is an effective way to quickly set up a level of security on workstations.
You can also use the /TE and /CRM run time arguments to set up unique concurrent user licenses. The /TE argument limits the Main
Menu to display only the Time and Expense functionality, while the /CRM argument limits the Main Menu to display the Customer
Relationship Management functionality. These unique licenses consume a different concurrent user pool. Activate these licenses either
when you want to limit a workstation to display only these specific functions or when you want to set up additional licenses separate
from the general user pool.
To leverage this feature, you display the Properties window for the Epicor icon and then modify the Target field to include a menu ID.
You can find the specific menu identifier you need within Menu Maintenance. This program is described later within this chapter.
For this example, to limit a workstation to only display programs in the CRM module:
Now enter the “-config“ run time argument and indicate which configuration
settings file the icon will use.
Next add a right slash (“/”) and enter the identifier for the menu or program
4
that you want to display. To restrict the workstation to display only the CRM
module, enter: C:\_Epicor\905client\MfgSys.exe -config=default.mfgsys
/menuid=CRMN0000
5. Click Apply.
6. Click OK.
6 5
This method may not limit access to all the programs you intend. Several
programs can still be launched by right-clicking various fields. For
example, users could still launch Part Maintenance from the Part field’s 7
context menu. You will need to use other security methods described
later in this chapter to restrict access to the programs available on context
menus.
Main Menu Path: System Management > Security Maintenance > Security GroupER 14 | SECURITY
You have now created the Production Staff security group. Repeat these steps to create all the security groups you need.
The security functionality is flexible, as you can assign a single user to multiple security groups. The application handles any conflicts
between security groups through an access hierarchy. If a user is assigned to security group Engineering, which allows access to the
Engineering Workbench, and security group Purchasing, which does not, the user will still be able to launch the Engineering
Workbench. The security group with more access overrides the security group with less access. Likewise, if a user is assigned rights to a
program, but is assigned to a group which is not, the user is still able to launch the program.
User rights have precedence over group rights, and the Allow Access setting has precedence over the Disallow Access setting.
Main Menu Path: System Management > Security Maintenance > User SecurityITY | CHAPTER 14
4. If this user manages security, select the Security Be aware that it is a good business practice to not give yourself
Security Manager access on your normal user account. This ensures
Manager check box. Users with this security access can
the menu choices you make on your normal login are appropriate
define and change the profiles of themselves and other
for your typical daily routine. It also ensures that other employees
users. They can also access all security programs. do not grant security access to themselves when you are away from
your computer. Instead, create a separate Security Manager account
5. Use the Tools Options section to assign or prevent this
that you use for security tasks.
user from accessing various tools and functions
throughout the application. A number of check box options are here; select the options you want available to this user. For
example, if you select the Allow Personalization check box, Fred Grandy is able to personalize all programs he uses.
6. Use the Access Options section to allow or prevent this user from viewing information within a web browser, mobile device,
and enterprise-wide searches.
8. When you finish assigning this user to security groups, click Save.
This user is now a member of one or more security groups. When you use this security group on a menu item, process, method, table,
or field, this user (and other users in the group) either has or does not have access to this item.
SECURITY | CHAPTER 14
Menu Maintenance
You use Menu Maintenance for two security functions. First you use this program to create Security Identifier (ID) records; you then
assign users and security groups to each Security ID record. Now when you select a Security ID record on a menu node or program,
only users/security groups assigned to this Security ID record can access the menu item/program.
Main Menu Path: System Management > Security Maintenance > Menu Maintenance
Create a Security ID
You create security IDs on the Security sheet. To create a new security ID:
12 13
4. Select the Security Manager Access Only check box to indicate that only security managers can access programs assigned to
this security level. No other users are able to see these programs.
You should select this option only when you want this ID to override all other security settings. This option is useful when you
are first setting up security, as it blocks all access until you create a security plan. You indicate which users have security manager
rights within User Account Maintenance. Review the previous User Account Maintenance section for more information.
5. Select the Current Company Only check box to apply this security code against the Main Menu structure for the current
company. Only users with access through this security code can display and launch the programs within this company node, but
this security code is not applied against other companies. If the Current Company Only check box is not selected (check box is
clear), this security code is applied against all companies within your Epicor application.
For example, if security code SEC545 is defined for While you assign security, always remember the security hierarchy. If a
Company A and its Current Company Only check box user is assigned to two groups and one group has access to a program
is selected, only users with access can expand this while the other does not, the group with access has precedence and
company node and display its programs. This security the user can launch the program. The same is true when a user has
code does not affect other areas of the Main Menu. If access to a program while a security group does not; the user is still
security code SEC545 does not have its Current able to launch the program. Users are higher in the security hierarchy
Company Only check box selected, however, then this than groups, and groups with access are higher in the hierarchy over
level of security is applied against all companies within groups that do not have access.
the application.
6. The Disconnected check box indicates whether this Security ID is available to use with Mobile Connect; you can then connect
to your database through a mobile device. Only specific security IDs created by Epicor permit this feature, so you are not able to
select this check box on your new security ID.
7. To prevent users within this security group from launching the Epicor application within an internet browser, select the Exclude
Epicor Web Access check box.
8. If you have Localization Developer rights, the Country/group codes are typically implemented by Epicor or Epicor
Country/Group Code drop-down list displays. Use Partners. If you have a Country Specific Functionality license, you can
this list to select a country group code or country code manipulate these codes as well. However Epicor recommends you
for the security group; all codes assigned to the rarely use this functionality. However, any changes you make to an
current company display on this drop-down list. If you existing localization will be overwritten during the next upgrade.
select a code from this list, users assigned to this
security group will see all localized Main Menu programs linked to this country/group code, as well as any Main Menu programs
which do not have a country/group code assigned (null) to them.
For more information on the localization functionality, review the Localization chapter in the Epicor ICE User Experience and
Customization Guide.
9. The Menu Options field displays all the programs that currently use this security level. Because this record is a new security ID,
this field is blank. As you select this security ID for specific programs, this field displays the selected programs that use this
identifier.
10. Select the Allow Access to All Groups/Users check box to give everyone in the company access to programs that use this
security level.
11. To limit this program to specific users and/or groups, you first must clear the Allow Access to All Groups/Users check box. The
Groups/Users and Selected Groups/Users lists become active. However, until you add users and/or groups to the Selected
Groups/Users list, nobody has access through this security level. Be sure you are ready to assign security before you clear this
check box.
12. Highlight the specific group or user for which you want to give security access. In this example, you select the Production Staff
security group.
15
19. Use the Blue Arrow Buttons to add and remove users/groups from this security level.
You can now select this Security ID on any program you need. You do this on the Menu Maintenance > Detail sheet.
When you assign a Security ID to a selected program, only those users given access through this security level can launch the program.
If a security group (or user) is not included in the security ID, individuals in this group (or user) cannot launch this program from their
Main Menu.
6. Click Search.
8. Click OK.
11. Notice the Web Access value indicates this program is Excluded from display within a web browser. Users will not be able to see
this node within the Epicor Web Access version of the application. You indicated this option on the security group by clicking the
Exclude Epicor Web Access check box.
This program is assigned to this security level. Continue to assign You can also use Menu Maintenance to add customizations and
security levels to the programs you need on the Main Menu. localizations to the Main Menu. These instructions are available in
the Epicor ICE User Experience and Customization Guide; review
the Customization Utilities and the Localization chapters.
For example, the Terms business object is located on the Main Menu in several locations; it can also be called from context menus
within various programs. If you want to completely prevent the Production Staff security group from launching this business object,
you can indicate this security group cannot access this program. Likewise, you may only want to prevent this security group from
updating Terms codes. In this situation, you would limit the access this security group has to the update method (BO.Terms.Update).
When a business object is secure, all methods within this business object are also secure. This can lead to unexpected results, as the
methods will not run through Service Connect, embedded processes, and from other menu options. Epicor recommends you assign
security in a test environment first before you deploy security within your live environment.
You define business object (process) security on the Process sheet; you define method security on the Method sheet.
Main Menu Path: System Management > Security Maintenance > Process SecurityTER 14 | SECURITY
You define a business object’s security by first selecting it and then indicating which groups/users can and cannot access it.
5. Select the Current Company Only check box to apply this security setting for the process against the current company.
However, this setting does not apply to this process in other companies. If the Current Company Only check box is not selected
(check box is clear), this security setting is applied to this process across all companies in your database.
6. The Disconnected check box indicates whether this business object is available to use with Mobile Connect. You can then
connect to your database through a mobile device. Only specific business objects permit this feature; if it does, this check box is
available.
7. Select the Allow Access to All Groups/Users check box to give everyone in the company access to this business object.
To only permit access to specific groups and users, however, clear this check box. Notice, however, that until you add users
and/or groups to the Selected Groups/Users list, no one has access to this business object. Be sure you are ready to assign
security before you clear this check box.
8. You can now define the specific groups and users that can use this business object. From the Groups/Users list, select a security
group or user.
10. The security group or user now displays within the Selected Any groups or users that remain in the Groups/Users
Groups/Users list. Continue to add the groups and users you need. list do not have access to this business object.
11. To remove a group or user from the Selected Groups/Users list, highlight the group or user and click the Left Blue Arrow
button.
12. To remove all the groups and users, click the Double Left Blue Arrow button.
17. The security group or user now displays within the Any groups or users that remain in the Groups/ Users list have access to
Selected Groups/Users list. Continue to add the this business object.
groups and users you need.
18. To remove a group or user from the Selected Groups/Users list, highlight the group or user and click the Left Blue Arrow
button. In this example, the _Production Staff security group displays in the Groups/Users list, so only this group has access to the
ABC code business object. Notice you can achieve the same result on the Allow Access and Disallow Access tabs; you just use a
different access condition.
19. To remove all the groups and users, click the Double Left Blue Arrow button.
You can also use Process Security Maintenance to define Not all business objects have multiple methods. This sheet is only for
security for methods within a selected business object. A more complex business objects that perform a variety of actions. You
method is an action which can be run within a process can see all the methods contained in a business object by using the
like Update, Get New, Approve, and so on. For example, Adapter tab found within the Custom Object Explorer. For information
you can use this functionality to permit a user to add a on this program, use the Epicor ICE User Experience and Customization
release to an existing purchase order but prevent this Guide; review the Custom Object Explorer section within the Advanced
same user from creating a new purchase order. Customization chapter. For a complete list of business objects and their
methods, use the Business Object Reference Guide. This .pdf guide is
available for download on EPICWeb.
6. The Disconnected check box indicates whether this method is available to use with Mobile Connect; you can then connect to
your database through a mobile device. Only specific methods permit this feature; if it does, this check box is available.
7. Select the Allow Access to All Groups/Users check box to give everyone in the company access to this method.
However, to only permit access to specific groups and users, clear this check box. Notice that until you add users and/or groups
to the Selected Groups/Users list, nobody has access to this method. Be sure you are ready to assign security before you clear
this check box.
8. You can now define the specific groups and users who can use this method. From the Groups/Users list, select a security group
or user.
10. The security group or user now displays within the Selected Groups/Users Any groups or users that remain in the Groups/
list. Continue to add the groups and users you need. Users list do not have access to this method.
11. To remove a group or user from the Selected Groups/Users list, highlight the
group or user and click the Left Blue Arrow button.
12. To remove all the groups and users, click the Double Left Blue Arrow button.
17. The security group or user now displays within the Selected Any groups or users that remain in the Groups/Users
Groups/Users list. Continue to add the groups and users you need. list have access to this method.
18. To remove a group or user from the Selected Groups/Users list, highlight the group or user and click the Left Blue Arrow
button. In this example, the _Production Staff security group displays in the Groups/Users list, so only this group has access to the
GetRows method. Notice you can achieve the same result on the Allow Access and Disallow Access tabs; you just use a different
access condition.
19. To remove all the groups and users, click the Double Left Blue Arrow button.
Main Menu Path: System Management > Security Maintenance > Field Security
You can assign security to a specific field that then applies to the entire organization or a specific company.
7. Click the Access drop-down list to define the security option for the current field. Available options:
• Full – Users can both view and enter data within this field. This security option is the default.
• Read – This option assigns display-only (read-only) rights to the current field. Users can only view data within this field; users
cannot enter any data within it.
• None – This security option causes the field to be blank. No data displays in this field, and users cannot enter any data in it.
Be aware that the None setting also causes the field’s data to not be included when the dataset is sent to and from its
program. This can have unintended consequences for processes, like BPM directives, which may require this data.
8. If you want this security level to only apply to the company you are Depending on whether you select the Current Company
currently logged into, select the Current Company Only check box. Only check box, the security option you select on the
If you keep this check box clear, the security level you define for this Access drop-down list is either applied against the entire
field is used globally throughout your organization. organization or the current company.
9. When you finish, click Save.
You can also assign security to a field that only applies to a specific user or security group. To assign field security for a user/group:
5. Click the Access column to display the drop-down list. Once again you have the Full, Read, and None security options. You also
have the Default option; select this option when you want the user or security group to use the global security level assigned for
this field on the Detail sheet. For this example, you select the Full option.
Now that you have defined field security for Aaron for the CallType table, you can see the security options in action. To do this, you
first navigate to Call Type Maintenance.
Main Menu Path: Sales Management > Customer Relationship Management > Setup > Call Type
For this example, Call Type Maintenance was customized to display the ShortChar01, ShortChar02, and ShortChar03 custom fields.
These fields, and their accompanying labels, were added using the customization tools. To learn how to customize a program, review
the Epicor ICE User Experience and Customization Guide.
7. Close Call Type Maintenance, close the Epicor application, and then log in using the Aaron user account.
TE
You can review the field security settings defined on the current table for a specific user through the User Effective Rights window.
This tool only displays the security rights for a selected user, so you can quickly verify the field security rights assigned for a user on the
current table are correct.
Reset Fields
If you want to restore the security rights assigned to a specific field, use the Reset Field feature. This feature causes Field Security
Maintenance to revert all the security options for the selected field back to the default value for all users.
Reset a Table
You can also restore an entire table back to its default field security options. This feature removes all changes you made for all users
on the selected table.
To reset a table:
CHAPTER 14 | SECURITY
You can quickly locate the database activity you wish to review by filtering the data activity that displays through several advanced
search parameters.
Main Menu Path: System Management > Security Maintenance > System Activity Log
4. To limit the data activity to only display items that occurred within a date range, select a start date and an end date in the Date
fields.
9. The Table Name column displays the table which was changed.
10. The ActivityType column defines what database action occurred. Notice in this example, several rows indicate that new business
activity queries (BAQs) were created.
11. The User ID column indicates who made the database change.
12. The Date and TimeChanged columns display the date/time stamp on which the activity occurred.
Security Reports
Run the security reports to manage user and security group activity within the Epicor application. Each report displays a specific view of
user activity. Use these reports to evaluate your security settings and practices.
You can review the security for users, security groups, or both. You can also filter this report to only display access for a specific
program, user, or security group. This key report can give you a complete overview of the security plan currently in place.
Main Menu Path: System Management > Security Maintenance > Reports > Menu Security Report
This report has a number of parameters you define. The more information you include, the longer it takes to generate this report.
Epicor recommends you should heavily filter the results the first time you run this report. After you view this sample report, you can
then expand the filters until the report displays the results you want.
5. To display all the users currently assigned to security groups, select the Recap Users on Group check box.
6. Notice the three Filter options. You can limit this report to display only Users or Security Groups. The default value is Both;
this causes the report to display all users and security groups.
7. To filter this report to only display security access for a specific program (Menu Item), click the Menu ID button to find and select
this program.
• Parent Menu/Menu ID
• Group/User
13
15. Select the Report Style you want this report to use
for its display. If you have different report styles 14
available, you can select them on this drop-down list. 17
15
You create report styles through Report Style 19
16
Maintenance. For more information, review
the Reporting Tools chapter in either the Epicor 18
ERP Implementation Guide or the Epicor ICE
Tools User Guide.
16. Click the Schedule drop-down list, select when you want this report to print. Typically you select Now, which indicates the report
prints immediately. However, if you select a schedule other than Now, the Recurring check box the Recurring check box
becomes available. You can then set up this report to print on the regular schedule you select from this list.
17. Select the Recurring check box to indicate this report is run You create recurring schedules within System Agent
through a regular schedule. When the System Agent launches Maintenance. The System Monitor is a program that
the schedule you select on the Schedule drop-down list, this regulates tasks, like processes and reports, throughout your
report automatically generates. application. For more information, review the Automatic
Data Processing chapter in either the Epicor ERP
18. Click the Archive Period drop-down list to define how long this Implementation Guide or the Epicor ICE Tools User Guide.
report should stay listed within the System Monitor; this report
displays on the History Tasks sheet. If you need, you can then reprint this report from the System Monitor.
19. In the User Description field, enter any brief notes you want to display in the report.
21. To print this report, click the Print button. You can now use this report to evaluate how your security plan is currently
implemented on the Main Menu.
Main Menu Path: System Management > Security Maintenance > Reports > Change Log Report
4. Click the Filter tab to find and select a specific database table. The report then only displays activity that occurred in the selected
table.
5. Select the Report Style and the Archive Period for the report.
Main Menu Path: System Management > Security Maintenance > Reports > User Session Log Report
1. Select the Start Date for the report. All user sessions
that occurred on or after this date are included on 6 5
the report.
Users/Groups Report
Run the Users/Groups report to review the current list of users assigned to a specific group or groups. Although you can run this
report to display all security groups and users, you can also limit this report to display a specific group or user.
Main Menu Path: System Management > Security Maintenance > Reports > Users/Group Report
Chapter 15
Data Replication
The Epicor Replication Server duplicates tables from an Epicor application database to a secondary SQL database. Typically the
replication server is installed on another server instead of the main Epicor application server; the main purpose of the
replication server is to facilitate the offloading of reporting and query functions from the main transactional server.
The Epicor application databases are referred to as the Publishing databases. The replicated SQL databases are referred to as
the Subscribing databases.
You select the database tables to publish from the application database(s) using profiles you first design within the Epicor
application and then apply to specific company records. A single replication, subscribing database can contain data from
multiple companies, even if these companies are on multiple application servers (as long as the Company IDs are unique).
Similarly, multiple replication databases can subscribe to data from a single application publisher.
DATA REPLICATION | CHAPTER 10
Replication Types
Two types of replication subscribing databases are available:
• Ad Hoc - An Ad Hoc subscribing database starts as an empty SQL database; all table schemas and data load in from the
publishing database. Use this kind of replicated database for ad hoc reporting through tools like Crystal Reports®.
• Fully Functional - A Fully Functional subscribing database starts as an empty Epicor SQL database with all tables and stored
procedures and functions pre-delivered. These empty databases are delivered with the Epicor application and may be configured
as the database for a running installation of Epicor 9. However, this database is defined as read-only and so the subscribing
Epicor application programs cannot update the data. The main purpose of this subscribing database type is to offload query
functions - such as dashboards and reports. This database is also useful when you need to support heavy data load generated by
Epicor Portal or another external system which creates offline ad-hoc queries.
Replication Setup
Before you can use the data replication functionality, you must install the following applications:
• Progress SonicMQ V7.6 application or higher - This application is not included with the replication server installation.
• Either MS SQL Server 2000 or MS SQL Server 2005 - This application must be installed on either the same machine
or on a machine connected to the machine where you installed the replication server.
Replication Dataflow
The following components are involved in replicating data from a source database to a destination database:
1. An Epicor source, or
publisher, database which 3 5
contains the data you wish to
replicate. You must define 2 4
how this source database 1
interacts with the
replication functionality.
3. The functionality uses Sonic messages to send the requests back to the publishing database and then pull the requested data
out to the replication server.
4. The replication server is a separate .NET component which executes the data replication; it pushes the data out to the target
databases. You can run the replication server as either a Windows server or a console application.
5. One or multiple target databases receive the replicated data. Each target database is assigned to a specific subscriber, which is
a .NET class, that defines how the replication server interacts with this database, the schematics of the database, and so on.
Replication Components
Two separate systems manage the replication components:
• Publishing Components – You manage the publishing components within the Epicor application. The programs you need
to use are Replication System Maintenance, Replication Profile Maintenance, Replication Agent Process, and the Replication
Log Reader.
• Subscribing Components – You manage the replication server and the subscriber functions through the Replication
Management Console. You install this application separately and then access it to define your subscribing databases.
Publishing Components
This section details the programs you need to set up for the publishing functionality within your source Epicor database.
You later assign a profile to a specific company within Replication System Maintenance. You can assign different profiles to different
companies, so you can replicate the specific data you need from a publishing database.
Main Menu Path: System Management > Replication > Replication Profile Maintenance
15 14
Main Menu Path: System Management > Replication > Replication System Maintenance
This process queries for records within the Replication Log Table and then places them within a Sonic message. The message
consolidates these records in chronological order, grouping them together by tables. When these records are moved to the Sonic
message, the replication log clears out its data until it is initialized again.
Main Menu Path: System Management > Replication > Replication Log Reader Process
3. Click the Log Filename button to find and select the directory path and file that updates with the replication log
information. The log reader data is saved within this log file.
4. Select the Schedule during which you want this process to automatically run. Typically, you select Daily Start Up from this
drop-down list.
5. If you want this process to run each time the selected schedule activates, select the Recurring check box.
7. If you want to add this process to a process set, click the Save Process Set button. Process sets organize a series of tasks
(submitted processes or reports) to run in a sequence you define. For more information about process sets, review Chapter 1:
Automatic Data Processing.
This section details how the Replication Log Reader gathers data from the publishing database and sends it out to the replication
server. What happens:
4. A trigger runs, which automatically creates a duplicated record within the Replication Log table.
5. When its schedule activates, the Replication Log Reader launches and pulls the data out of the Replication Log Table.
It consolidates the records into chronological order, grouping them by table. It creates a message which contains this data.
For example, a request for data is sent from subscriber class. The replication server sends this request through a Sonic message to the
replication agent, saving this request to the repl* tables defined within the Epicor application database.
The replication agent processes these requests by reviewing the repl* tables during a specific time you define within this process. If the
process sees that data is available which answers this request, it executes it and sends the replicated data out to the replication server.
The replication server notifies the subscriber class that data is available and the subscriber class, in turn, adds, updates, and deletes the
data within its database.
Main Menu Path: System Management > Replication > Replication Agent Process
4. If you want to add this process to a process set, click the Save Process Set button. Process sets organize a series of tasks
(submitted processes or reports) to run in a sequence you define. For more information about process sets, review Chapter 1:
Automatic Data Processing.
43
Replication Agent Process – How It Works
This section provides more details about how the Replication Agent handles requests coming into the publisher and data being
duplicated out to target databases on the subscriber. What happens:
2. This generates a request to the replication server, which is forwarded to the replication agent through a Sonic message.
This request is saved to the repl* tables within the publisher database.
3. The replication agent processes the requests, reviewing the data sent to it by the Replication Log Reader. The data it discovers
that matches a request is sent to the replication server using a Sonic message.
4. The replication server notifies the subscriber (for example, an ad-hoc subscriber) that new data is received and ready
for distribution.
Subscribing Components
This section details what you need to set up to define the subscribing functionality within the Replication Management Console.
You launch the Replication Management Console separately from the Epicor application. To launch this program from the Windows
desktop: Start > All Programs > Epicor Database Replication > Management Console
The following are the steps you follow to set up the replication process within this console (more specific instructions follow
this overview):
1. Create a publisher. This record defines the source database from which the data is replicated.
2. Define what kind of subscriber class type you need – Functional, Ad-Hoc, or a Custom database. This record identifies the type
of data you wish to replicate.
3. Create a target database for the subscriber class. This database receives the replicated data.
5. Define which tables and companies are received by the subscriber instance by configuring its filter.
6. Optionally create tables within the target database and copy the existing data to the target database.
5
Add a Replication Server
You begin by creating replication servers below the DB Replication node. This item is the root node which displays all the replication
servers available within your network. To add a replication server:
1
5 6
5. The replication server displays below the DB Replication node. To connect this replication server to the server, right click this
node and select the Connect command.
6. Notice that the replication server node displays the name of the server and the port used to connect to the replication server.
Because you may have several replication servers running on the same machine, the port values help indicate the different
instances of each replication server.
Now the replication server is connected to your server and it is also processing data. If you wish to disconnect the replication server
from the main server, right-click the node and select Remove.
Add a Publisher
You manage publisher databases by using the Publishers node. As discussed previously, a publisher is an Epicor application database
from which you receive data. By adding a publisher, you link the Epicor database to the replication server.
To add a publisher:
2. The Properties 2
window displays.
3
3. Enter the Name you need
for the publisher. 4
5
4. Enter the Broker URL host
name and the port for the 6
Sonic server using the <host
name>:<port> format.
9
5. The Topic prefix value defines the
specific set of Sonic topics this 7
publisher uses to communicate
between the Epicor application 8
and the Sonic server. Because the
same Sonic server can be used for
multiple replication servers, these topic
set names cannot be identical and
require different prefixes.
8. Select the Connect automatically check box to indicate the publisher and all its subscribers automatically connect to the server
each time the server is started.
9. To verify the connection works correctly, click the Test Connection button.
You use subscriber instances to link the current publisher to the target database. You can also filter what data is received through each
subscriber instance.
2. The Subscriber 2
Instance Properties
window displays.
3
3. Enter the Name you 4
need for the subscriber
instance. Be sure this 5
name is unique within
the network.
You can now manage the subscriber instance as you need. You do this by right-clicking the subscriber instance and selecting
Properties. Use this window to define any filters you wish to use with the subscriber instance. Review application help for more
information on the properties available for each subscriber instance.
3
Manual Snapshot Copy
In some situations it may be faster to copy the data through a manual snapshot. You can then send the data using ftp, http, or
a copied file. If the database is large, you could also burn it onto a DVD and send it to the location you need.
1. Right-click a subscriber
instance, and, from
the context menu,
select Initialize.
1
6 7
7. All the current requests for the subscriber instance display within the table. When the State column displays the Completed
status, the manual snapshot is created.
DATA REPLICATION | CHAPTER 10
View Activities
As described briefly in the previous section, you can review activities to track the status of a request sent to the replication server.
Use this feature to track the status of both a subscriber instance and a publisher. The publisher activity list displays the requests sent
to the Epicor application. The subscriber instance activity list displays the requests sent to the replication server.
To view activity:
1
4. A table displays the recent
requests sent to the 2
replication server.
3
5. Note the State column. The 6
values in this column indicate the
current status of the request.
The following states are available for subscriber instances. You view these values in the State column described in the previous View
Activities section. Available subscriber instance states:
• TRAVELING – The request is sent to the Epicor application through Sonic; however, the receiver has not yet confirmed receipt
of the request. This can happen because the Replication Agent is either stopped or busy processing another request.
• CANCELLING – Another request is requested to be cancelled. This current request is waiting to be cancelled.
• SNAPSHOT_WAIT – This state is applicable to the requests with the SCHEMA_AND_DATA and DATA initialization scopes.
The subscriber is waiting for snapshots to arrive from the Epicor application.
• INIT_READY – All snapshots and/or schemas have arrived from the Epicor application. All the required data is received.
• SCHEMA_INITIALIZED – The subscriber has created (or recreated) all the tables in the target database.
• DATA_INITIALIZED – This state is applicable to the requests with the DATA initialization scope. The subscriber has uploaded all
the snapshots to the target database.
• ALL_INITIALIZED – This state is applicable to the requests with the SCHEMA_AND_DATA initialization scope. The subscriber has
created all the tables and has uploaded the snapshots for the tables to the target database.
Publisher States
The following states are available for publishers. You view these values in the State column described within the previous View
Activities section. Available publisher states:
• WAITING – The request is received from the Sonic server and is saved to the request queue (ReplRequest* tables).
• CANCELLED – The request is cancelled from the Replication Management Console. To learn how to do this, review the Cancel
a Request section later in this chapter.
• SCHEMA_SENT – The Replication Agent has created the schema definition for all the tables in the request and has sent it to the
replication server through Sonic.
If the Replication Agent is stopped, the state of all requests stays the same until the Replication Agent activates again.
View Tables
You can view table information when you need to track the processing status of the database tables selected for replication. You view
this information below a subscriber instance node.
You can stop any requests made to a specific publisher or a specific subscriber instance. Here’s how:
Subscriber Class
A subscriber is a component that defines the target database type, like database server, schema, and so on, which receives the
replicated data. Each subscriber is a .NET class. You need to create a separate subscriber for each database type. When you install the
replication server, the Test, Ad-Hoc, and Functional subscriber classes are installed as well:
• Functional – This subscriber handles data within the Epicor application. The Epicor application must run using SQL Server.
• Ad-Hoc – This subscriber creates a SQL database that has a similar schema to the Epicor SQL database. This database is created
automatically by the subscriber class.
• Test – You use this subscriber to troubleshoot issues with the replication If you need, you can also create a custom subscriber
server. This class records events in the server log and does not support a class. For information on how to do this, review the
target database. Developing Custom Subscriber Class topic within the
application help.
You need to link subscribers to a target database. Here’s how:
A Tables node is available under each target database node. Select this Tables node to review all the tables which exist in the target
database and the current state of each table.
You can also clean up the data from a command available at this node. When you launch the data cleanup, the data within all the
tables and selected companies is refreshed and restored for final display within the target database. During this process, all running
subscribers pause and are placed in a cleanup state.
2
• AVAILABLE – No
database cleanup is in
progress and the table is
ready to receive the
replicated data.
• CLEANUP_PENDING –
The user has submitted
the cleanup request; this
table is waiting its turn to be cleaned up.
6. The Last Action column displays the time and date during which this table received the replicated data.
Now the data you need to display from the publishing database is automatically replicated in the subscribing target database.
By leveraging this functionality, you can make important data available for review throughout your entire organization.
Replication Wizard
To streamline creating your database replication process, the Replication Management Console contains the Replication Wizard.
This step-by-step program guides you through the entire process, from selecting the replication server to creating the subscriber
instance. Use this wizard to quickly and correctly set up database replications for your organization.
1 2
3. The Replication 3
Wizard displays.
5. Click Next.
23