Business Events

Form ID: (SM302050)

You use this form to configure the system to perform actions if a specific business event has happened in the system: if the data you specify has been changed in the system, or if particular conditions have occurred, which the system checks for at the schedule you specify. You can also use this form to review existing business events and make any needed changes.

For more details about business process monitoring and business events, see Using Business Events.

Form Toolbar

The form toolbar includes standard and form-specific buttons and commands. For the list of standard buttons, see Form Toolbar and More Menu. The form-specific commands are listed in the following table.

Button Description
View Screen Navigates to the form selected in the Screen Name box.
View History Opens the Business Event History (SM502030) form, where you can review the history of the occurrence of the event selected in the Event ID box.

Summary Area

In this area, you can specify the settings of a new business event or select an existing business event for editing.

Element Description
Event ID Required. The identifier of the business event.
Type
The type of the business event, which can be one of the following:
  • Trigger by Record Change: The system processes the subscribers specified on the Subscribers tab when the inquiry results or data provided by the data entry form have changed in the ways that meet the conditions specified on the Trigger Conditions tab. The option is available if an inquiry form or data entry form is specified in the Screen Name box. For details on this type of business event, see Business Events: Data Change Processing.
  • Trigger by Schedule: At the times and frequencies specified on the Schedules tab of the Business Events form, the system checks the results of the inquiry and processes the subscribers specified on the Subscribers tab of the form if the inquiry results satisfy the conditions specified on the Trigger Conditions tab. This option is available if an inquiry form is specified in the Screen Name box for this event. For more information about this type of business event, see Business Events: Scheduled Event Processing.
  • Trigger by Action: The system processes the subscribers specified on the Subscribers tab when a user clicks the action specified in the Action Name box for this business event. The option is available if an inquiry form or data entry form is specified in the Screen Name box. For details on this type of business event, see Business Events: User-Triggered Processing of Subscribers.
Action Name

The action name, which will be displayed in two commands on the Actions menu of the form toolbar of the generic inquiry: <Action Name> and <Action Name> (All). The actions are used similarly to the actions available on mass processing forms.

The box is available only if the Trigger by Action option is selected in the Type box.

Raise Event The way the system should generate the business event for the records that satisfy the conditions specified on the Trigger Conditions tab. One of the following options can be selected:
  • For Each Record: For each record that satisfies the condition, the system raises a business event and executes the subscribers of the business event.
  • Once for All Records: The system raises one business event for all records that satisfy the conditions and executes each subscriber once for all records of the business event.
  • For Group of Records: For each generic inquiry field that is selected for the grouping in the Group Records By box, the system raises an event for each group of records. If this option is selected, a separate event will be raised for each group of records with the same value of the specified field.

    If this option is selected, the Group Records By box and Use Previous Value check box become available.

Group Records By

The field by which records are grouped. This box contains a list of all internal fields of the generic inquiry in the <Table Name>.<Field Name> format, including formula fields.

The box becomes available if the For Group of Records option is selected in the Raise Event box.

Use Previous Value A check box indicating (if selected) that the previous value of the specified generic inquiry field will be used for grouping records when the event is triggered. When this check box is cleared, the new value of the field will be used when the event is triggered. The check box becomes available if the For Group of Records option is selected in the Raise Event box.
Active A check box that indicates (if selected) that this business event is active and the system can process the subscribers specified on the Subscribers tab if this business event has occurred.
Description A description of the business event.
Screen Name

Required. The name of the inquiry form or data entry form that defines the data the system should monitor to detect whether this business event has occurred. The inquiry form can be any generic inquiry that does not have grouping specified on the Grouping tab of the Generic Inquiry (SM208000) form.

Tip: If a business event needs to be triggered by the changes made in the MYOB Advanced Customer Portal, the related generic inquiry must be added to the Customer Portal site map. If the related generic inquiry is used as an entry point, then the entry point form should be added to the Customer Portal site map. In the MYOB Advanced Customer Portal, forms are added to the site map on the Portal Map (SM200521) form.
Screen ID

A read-only box that displays the identifier of the inquiry form or data entry form that defines the data the system should monitor to detect whether this business event has occurred.

The system fills in this box automatically when you select a value in the Screen Name box.

Shared Filter to Apply

The shared filter that the system should apply to the records retrieved by the generic inquiry selected in the Screen Name box. The shared filter can be any of the filters that are listed for the generic inquiry on the Filters (CS209010) form.

By default, All Records is selected, which means that no shared filter is applied to the records.

This box appears on the form only if Trigger by Record Change is selected in the Type box.

For details on shared filters, see Advanced Filters: General Information.

Inquiry Parameters

A button that you can click to open the Inquiry Parameters dialog box, where you can specify the values of the parameters to be used for the inquiry selected in the Screen Name box.

By default, the system runs the inquiry with the default values of the parameters.

The button appears on the form only if Trigger by Record Change is selected in the Type box and is available only if the inquiry selected in the Screen Name box has parameters.

Table 1. Inquiry Parameters Dialog BoxIn rows of the table in this dialog box, which the system opens when you click the Inquiry Parameters button in the Summary area, you can specify the values of the parameters to be used for the inquiry selected in the Screen Name box.
Column Description
Display Name The name of the parameter of the inquiry, as the name is displayed in the selection area of the inquiry form.
Value

The parameter value that should be used by the system for retrieving data for this business event.

The box initially contains the default value (if any) of the parameter, but you can override this value.

If you change the value in a row of this column, the system clears the Use Default Value check box in this row. You can select the check box to discard the new value and cause the default value to be inserted in this column again.

Use Default Value

A check box that indicates (if selected) that the default value of the parameter is used by the system for retrieving data for this business event.

By default, this check box is selected; the system clears this check box if you change the value in the Value column.

The check box is available only if it is cleared. If you select this check box, the value specified in the Value column is discarded and the default value is used instead.

The dialog box has the following buttons.
Reset to Defaults Discards all changes in the table and displays the default settings.
OK Closes the dialog box.

Trigger Conditions Tab

You use this tab to configure and review the conditions that define when the business event has occurred. The active conditions specified on this tab need to be met in order for the event to be considered as having occurred.

Table 2. Table Toolbar

The table toolbar includes standard buttons and buttons that are specific to this table. For the list of standard buttons, see Table Toolbar. The table-specific buttons are listed below.

Button Description
Move Row Up Moves the selected row up by one position.
Move Row Down Moves the selected row down by one position.
Table 3. Table Columns
Column Description
Active A check box that indicates (if selected) that the condition is active and will be used by the system to determine that the business event has occurred.
Brackets The opening parenthesis (or parentheses if you are composing a logical expression with multiple conditions).
Operation

The operation that defines how the data should have been changed for the condition to be met. The operation can be applied to any of the following:

  • The results of the generic inquiry or a record on a data entry form before the data change (the old field values)
  • The results of the generic inquiry or a record on a data entry form after the data has been changed (the new field values)
  • The change of the data (this applies when a field value is changed or when a record is added, removed, or updated)

The operation can be one of the following:

  • Field Changed: The value of the field in the results of the generic inquiry or the record on the data entry form has been changed in any way. If you select this operation, you specify the table to which the field belongs and the field in the Table Name and Field Name columns, respectively.
  • Field Value Increased: The value of the field in the results of the generic inquiry or the record on the data entry form has been increased. If you select this operation, you specify the table to which the field belongs and the field in the Table Name and Field Name columns, respectively. This operation can be used only for fields with numeric types.
  • Field Value Decreased: The value of the field in the results of the generic inquiry or the record on the data entry form has been decreased. If you select this operation, you specify the table to which the field belongs and the field in the Table Name and Field Name columns, respectively. This operation can be used only for fields with numeric types.
  • New Field Value: The value of the field is checked in the results of the generic inquiry or the record on the data entry form after the data has been changed. If you select this operation, you specify the table to which the field belongs and the field in the Table Name and Field Name columns, respectively. You also specify a condition on the new field value by using the Condition and Value 1 (and Value 2 if Condition is Is Between) columns.
  • Old Field Value: The value of the field is checked in the results of the generic inquiry or the record on the data entry form before the data change. If you select this operation, you specify the table to which the field belongs and the field in the Table Name and Field Name columns, respectively. You also specify a condition on the new field value by using the Condition and Value 1 (and Value 2 if Condition is Is Between) columns.
  • Record Inserted: A new record has appeared in the inquiry results.
    Attention: If the Record Inserted or Record Deleted operation is used in a trigger condition of a business event, you need to add to the list on the Fields to Track tab all fields whose change can lead to the appearance or disappearance of rows in the inquiry results. That is, you need to add the following fields:
    • If the generic inquiry has conditions, every field mentioned in the conditions
    • If the generic inquiry has joins, the fields of the joins
    • The key fields of the DACs
  • Record Deleted: A record has been removed in the inquiry results.
    Attention: For information on which fields to add to the list on the Fields to Track tab, see the note for the Record Inserted operation.
  • Record Changed (Tracked Fields): A record has been changed in the inquiry results.
    Note: If the Record Changed (Tracked Fields) operation is used in a trigger condition, a business event occurs only if any field listed on the Fields to Track tab changes.

This column appears only if the selected option in the Type box of the Summary area is Trigger by Record Change.

Table Name

The table that contains the record whose changes the system should monitor. The table can be any of the tables included in the generic inquiry or the primary view of the data entry form that is specified in the Screen Name box in the Summary area.

If the selected option in the Type box of the Summary area is Trigger by Record Change, you select a table name in this column only if the selected Operation is any of the following: Field Changed, Field Value Increased, Field Value Decreased, New Field Value, or Old Field Value.

Field Name

The field (in the table specified in Table Name) whose changes the system should monitor.

If the selected option in the Type box of the Summary area is Trigger by Schedule or if the selected Operation is Field Changed, New Field Value, or Old Field Value, the field can be any of the fields included in the results table of the inquiry that is defined in the Screen Name box in the Summary area. If the selected Operation is Field Value Increased or Field Value Decreased, only the fields of the results table with numeric types are available.

If the selected option in the Type box of the Summary area is Trigger by Record Change, you select a field in this column only if the specified Operation is any of the following: Field Changed, Field Value Increased, Field Value Decreased, New Field Value, or Old Field Value.

Condition

The logical operation that applies to the value of the selected field.

The following options are available:

  • Equals: Returns TRUE if the value of the specified field is equal to the value specified in the Value 1 column.
  • Does Not Equal: Returns TRUE if the value of the specified field is not equal to the value specified in the Value 1 column.
  • Is Greater Than: Returns TRUE if the value of the specified field is greater than the value specified in the Value 1 column.
  • Is Greater Than or Equal To: Returns TRUE if the value of the specified field is greater than or equal to the value specified in the Value 1 column.
  • Is Less Than: Returns TRUE if the value of the specified field is less than the value specified in the Value 1 column.
  • Is Less Than or Equal To: Returns TRUE if the value of the specified field is less than or equal to the value specified in the Value 1 column.
  • Contains (for fields of the string type): Returns TRUE if the value of the specified field (a string) contains the value specified in the Value 1 column.
  • Starts With (for a field of the string type): Returns TRUE if the value of the specified field (a string) contains at the beginning the value specified in the Value 1 column.
  • Ends With (for a field of the string type): Returns TRUE if the value of the specified field (a string) ends with the same character or string as the value specified in the Value 1 column contains.
  • Does Not Contain (for a field of the string type): Returns TRUE if the value of the specified field (a string) does not contain the value specified in the Value 1 column.
  • Is Between: Returns TRUE if the value of the specified field is greater than the value specified in the Value 1 column and less than the value specified in the Value 2 column.
  • Is Empty: Returns TRUE if the value of the specified field is empty (null).
  • Is Not Empty: Returns TRUE if the value of the specified field is not empty (not null).
  • Is In (for a field of the user type): Returns TRUE if the value of the specified field (a user) is included in the workgroup specified in the Value 1 column. You can select this option for the @MyGroups and @MyWorktree parameters specified in Value 1.
  • Is Not In (for the fields of the user type): Returns TRUE if the value of the specified field (a user) is not included in the workgroup specified in the Value 1 column. You can select this option for the @MyGroups and @MyWorktree parameters specified in Value 1.

You select a condition in this column if the value of the Operation column is New Field Value or Old Field Value or if the selected option in the Type box of the Summary area is Trigger by Schedule. In other cases, the column is empty and unavailable.

Value 1 The value for the logical condition used to filter the data. For date-relative and user-relative values, you can use the parameters (such as @today or @MyGroup) that are described in Advanced Filters: General Information.
Value 2

The second value for the logical condition used to filter the data.

You specify a value in this column only if the value of the Condition column is Is Between.

Brackets The closing parenthesis (or parentheses if you are composing a logical expression with multiple conditions).
Operator The logical operator between conditions, which can be And or Or.

Subscribers Tab

On this tab, you configure and review the list of subscribers to the business event. A subscriber to a business event is an entity in the system (such as an email notification or a script based on an import scenario) that the system processes in a particular way, based on the type of the entity, when the business event occurs. For example, if a subscriber is an email notification, the system sends an email or multiple emails according to the configured notification template. For more information about subscribers, see Business Events: Subscribers.

Table 4. Table Toolbar

The table toolbar includes standard buttons and buttons that are specific to this table. For the list of standard buttons, see Table Toolbar. The table-specific buttons are listed below.

Button Description
Move Row Up Moves the selected row up by one position.
Move Row Down Moves the selected row down by one position.
Create Subscriber

Provides the following menu commands, which you can click to create a subscriber of a specific type.

You click one of the following menu commands to create the subscriber of the corresponding type:

  • Import Scenario: When you click this menu command, the system opens the Create Import Scenario dialog box, where you specify the name of a new import scenario and click OK. The system then creates a data provider of the Business Process Provider type (if the provider has not been created earlier for the generic inquiry of the business event), links this provider to the generic inquiry of the business event, and opens the Import Scenarios (SM206025) form with the import scenario name and provider specified. On this form, you complete the creation of the import scenario. Once you have specified the settings of the import scenario, saved your changes, and closed the form, the system adds a row for the subscriber to this tab.
    Tip: You can add to a business event only an import scenario with a data provider that has the Business Process Provider type and that uses the same generic inquiry as the business event.
  • Task: When you click this menu command, the system opens the Task Templates (SM204005) form, where you can create a template for tasks. Once you have specified the settings of the task template, saved your changes, and closed the form, the system adds a row for the subscriber to this tab.
  • Email Notification: When you click this menu command, the system opens the Email Templates (SM204003) form, where you can create a template for email notifications. Once you have specified the settings of the notification template, saved your changes, and closed the form, the system adds a row for the subscriber to this tab.
  • Mobile Push Notification: When you click this menu command, the system opens the Mobile Notifications (SM204004) form with the Push option selected in the Delivery Method box. On this form, you can create a template for mobile push notifications. Once you have specified the settings of the notification template, saved your changes, and closed the form, the system adds a row for the subscriber to this tab.
  • Mobile SMS Notification: When you click this menu command, the system opens the Mobile Notifications (SM204004) form with the SMS option selected in the Delivery Method box. On this form, you can create a template for mobile text notification. Once you have specified the settings of the notification template, saved your changes, and closed the form, the system adds a row for the subscriber to this tab.
Table 5. Table Columns
Column Description
Active A check box that indicates (if selected) that the subscriber is active and the system can process this subscriber if the business event has occurred.
Type

The type of the subscriber.

The following types are available:

  • Email Notification: A notification template that the system uses to send emails if the business event has occurred
  • Mobile Push Notification: A notification template that the system uses to send push notifications if the business event occurred
  • Mobile SMS Notification: A notification template that the system uses to send mobile text messages if the business event occurred
  • Import Scenario: An import scenario that uses a data provider of the Business Process Provider type and that defines the sequence of instructions for the system to perform if the business event has occurred

If you create a subscriber from this tab, when you save your changes on the applicable form and close the form, the system adds a row for the subscriber and fills in the type. If you add a subscriber that has already been created, you select the type manually.

Subscriber ID

The identifier of the subscriber. For details about what is used as the identifier for a particular subscriber, see Actions to Perform on Event Occurrence (Event Subscribers).

If you create a subscriber from this tab, when you save your changes on the applicable form and close the form, the system fills in the ID. If you are adding a subscriber that has already been defined in the system, you select the subscriber in this column.

For details about subscribers of business events, see Business Events: Subscribers.

Stop on Error

A check box that indicates (if selected) that the system should not process subsequent subscribers if an error has occurred for this subscriber. If the check box is cleared (the default setting), the system processes subsequent subscribers of this event regardless of any error for the current subscriber. The subscribers are processed in the order in which they are defined on this tab.

If the check box is selected, the system considers the subscriber to be mandatory. That is, if the subscriber has not been processed successfully, on the Business Event History (SM502030) form, the system displays an error for the subscriber and for the business event.

If the check box is cleared, the system considers the subscriber to be optional. That is, if the subscriber has not been processed successfully, on the Business Event History form, the system displays a warning for the subscriber and for the business event.

Fields to Track Tab

You use this tab to configure and review the list of data fields whose values the system will track for the event. The system will store the new and previous value of each field when the value has changed.

By default, the system tracks all the data fields used to configure conditions on the Trigger Conditions tab. You cannot modify or delete these rows.

If you plan to use the previous value of a data field for configuring a subscriber, you should add this field to the table. Otherwise, the system will not store or return a previous value for the field.

The tab appears only if the value in the Type box of the Summary area is Trigger by Record Change.

The table toolbar includes only standard buttons. For the list of standard buttons, see Table Toolbar.

Table 6. Parameters Area
Element Description
Track All Fields A check box that indicates (if selected) that the system tracks all data fields from the DACs that are used for the generic inquiry or data entry form that is selected in the Screen Name box of the form.
Table 7. Table Columns
Column Description
Table Name The name of the table used for the generic inquiry or data entry form that is selected in the Screen Name box of the form.
Field Name

The name of the field from the selected table.

If a generic inquiry is specified in the Screen Name box of the form, the system offers for selection only the data fields that were added to the Results Grid tab of the on the Generic Inquiry (SM208000) form.

Table 8. View Schedule History Dialog BoxIn this dialog box, you can view the history of schedule execution.
Element Description
Unlabeled The status of the schedule execution.
Schedule ID The identifier of the schedule.
Execution Date The date when the schedule was executed.
Execution Result The result of the execution.
Event ID The identifier of the business event.
Description The description of the business event.
Screen ID The identifier of the generic inquiry related to the business event.
The dialog box has the following button.
Close Closes the dialog box.

Schedules Tab

You use this tab to configure and review the list of schedules for this business event. The system executes the generic inquiry that defines the data for the system to monitor and check the conditions on this data based on the schedule or schedules specified on this tab.

The tab appears only if the value in the Type box of the Summary area is Trigger by Schedule.

Table 9. Table Toolbar

The table toolbar includes standard buttons and buttons that are specific to this table. For the list of standard buttons, see Table Toolbar. The table-specific buttons are listed below.

Button Description
View Schedule History Opens the View Schedule History dialog box, where you can view when the selected schedule (which you click before clicking this button) has been executed.
Create Schedule Opens the Automation Schedules (SM205020) form, where you can create a new schedule by which the system should check conditions on the data for monitoring. When you create a schedule and close the Automation Schedules form, the created schedule is added to the table on the tab.
Table 10. Table Columns
Column Description
Active A check box that indicates (if selected) that the schedule is active and the system can execute the generic inquiry that is specified in the Screen Name box in the Summary area and check the conditions specified on the Trigger Conditions tab based on this schedule.
Schedule ID The identifier of the schedule.
Time Zone The time zone for which the schedule is configured.
Last Executed The most recent date when the schedule was executed.
Next Execution Date The next date when the schedule will be executed.
Table 11. View Schedule History Dialog BoxIn this dialog box, you can view the history of schedule execution.
Element Description
Unlabeled The status of the schedule execution.
Schedule ID The identifier of the schedule.
Execution Date The date when the schedule was executed.
Execution Result The result of the execution.
Event ID The identifier of the business event.
Description The description of the business event.
Screen ID The identifier of the generic inquiry related to the business event.
The dialog box has the following button.
Close Closes the dialog box.