Useful Services and Business Services

The following section highlights some business services and services provided by the product that may be useful for implementations to use.

Data Explorer Service

The system provides a mechanism for performing an SQL select statement for use in scripting, Java plug-ins, or via a web service call. This is done by creating a zone using one of the data explorer zone types where the SQL is defined. Then, create a business service using the Data Explorer service (FWLZDEXP).

Note: There are numerous business services delivered with the base product that reference this service that may be used as a template.

The following points highlight how to create your own business service for this service. Note that typically a separate business service exists for each zone.

  • Enter a Business Service code and a Description. It is recommended to define the business service code to match the zone code so that it’s easier to manage which business service invokes which zone.
  • Select the Service Name FWLZDEXP.
  • On the Schema tab, under the <schema> node, enter mapping for the fields that are required for the Data Explorer service:
    • The Zone should be mapped into service field ZONE_​CD . Define the zone code as the default value.
    • For every user filter defined on the zone, create a schema mapping into the service field Fx_​VALUE , where "x" is the filter number (from the zone parameters).
    • For every hidden filter defined on the zone, create a mapping into the service field Hx_​VALUE , where "x" is the filter number (from the zone parameters).
    • The search results are returned as a list by the data explorer service. Each column value is in the service field COL_​VALUE with an appropriate sequence number ( SEQNO ). The results can be flattened based on sequence number allowing for a logical element name to be defined.
    • Another useful field is ROW_​CNT , which provides the number of rows retrieved by your search.

The following is an example of the schema for a BS that receives a business object code and returns a list of status values and their descriptions that allow status reasons to be defined.


<schema>
     <zone mapField="ZONE_CD" default="F1-BOSTSLST"/>
     <bo mapField="H1_VALUE" />>
     <rowCount mapField="ROW_CNT"/>>
     <results type="list" mapList="DE">>
          <status dataType="string" mapField="COL_VALUE">
               <row mapList="DE_VAL">>
                    <SEQNO is="1" />>
               </row>>
          </status>>
          <description dataType="string" mapField="COL_VALUE">
               <row mapList="DE_VAL">>
                    <SEQNO is="2" />>
               </row>>
          </description>>
      </results>>
</schema>

Maintenance Object Log Service

Many maintenance objects support a log table that follows a pattern of column names and behavior. The system provides a service called Generic MO Log Service (F1MOLOGP) that may be used to perform common functions related to log entries:

  • Read log entries. If you pass a certain MO, primary key and log sequence number, the service will return the details of that log entry. The product provides a generic business service that may be used for this purpose — Generic MO - Retrieve Log Details (F1–ReadMOLog). Alternatively, it is possible to create a business service for a given MO where the MO code is assigned to the MO element using the default syntax. This allows business functionality specific to that maintenance object to use the specific BS.

  • Add log. The service may be used to add a log entry. If a user log is added, then the comments from the user are populated in the detailed description. System generated log entries typically supply a message category / message number along with other information such as the status, a specific log type and optionally a related object reference (via a characteristic). The product provides a generic business service that may be used for this purpose — Add Generic MO Log (F1–AddMOLog). Alternatively, it is possible to create a business service for a given MO where the MO code is assigned to the MO element using the default syntax. This allows business functionality specific to that maintenance object to use the specific BS.

Base Business Services

The following table highlights some business services provided by the product that may be useful for custom logic for an implementation.

CAUTION: This is not intended to be a complete reference of Business Services. Refer to the business service page to find all the supported business services.

Business Object Related Services

Business Service Name Description
F1-AutoTransitionBO Performs monitoring algorithms associated with the current state of a given business object instance (which may result in subsequent state transitioning).
F1-CompareBusinessObjectData Compares two versions of a given business object instance.
F1-DetermineBo Determines the business object of a given instance of a maintenance object by executing the MO's Determine BO logic.
F1-GetRequiredFieldsForBOState Returns the required fields for a given business object status.
F1-RetrieveBOOption Returns BO option values for a given BO and option type.
F1-RetrieveBOStatusOption Returns BO option values for a given BO, status and option type.
F1-RetrieveBOStatusOption Retrieves a list of BOs for a given MO that are accessible for the current user.
F1-RetrieveBoStatusDescription Return the description of a given BO status.
F1-RetrieveBusinessObjectLabel Return the label appropriate for a given path (e.g. element) within a BO schema.
F1-RetrieveNextStates Return a list of next possible states based on the input of a MO and its prime key, or a BO and one of its statuses.

Email Related Services

Business Service Name Description
F1-EmailService Sends an email message in real time.
F1-RetrieveEmailAddress Retrieves the email addresses of users belonging to a To Do Role.
F1-RetrieveEnvironmentURL Retrieves the current environment URL information for the installation.

Tools for Maps and Scripting

Business Service Name Description
F1-AddWarning This business service may be used to log a warning by providing the message details. The system gathers all the warning and displays them to the user all at once.
F1-CheckOnlineConnection Check if Connection is Online or Batch.
F1-CheckWarning Used to check if any warnings have been accumulated. If warnings have been accumulated, any logic that cannot be rolled back (when the warnings are shown) should not be performed.
F1-DateMath Performs various date and time math calculations. Refer to the BS description for more details.
F1-DateTimeFormattingService Formats a given date / time based on the user’s display profile settings.
F1-ExecuteScriptInNewSession Executes a Service Script in a new processing session/transaction.
F1-GetFieldLabel Retrieves the label for a given field.
F1-GetForeignKeyReference Returns foreign key reference information for a given FK Reference and primary key, including info description, navigation option, and context menu.
F1-GetFKReferenceDetails Returns foreign key reference information for a given MO and primary key, including FK reference code, info description, navigation option, search zone and context menu.
F1-GetLookupDescription Returns lookup description for a lookup field value given the lookup field name.
F1-GetExtLookUpVal Returns the list of values for a given extendable lookup BO.
F1-GetMonthInYearAbbreviation Returns a 3-character month abbreviation for an input date in system format.
F1-NumberAmountFormatter Formats a given amount or number based on the user’s display profile settings. It also may receive input to adjust the scale and optionally apply currency settings.
F1-OutmsgDispatcher Dispatches a real-time message giving the user the option of whether to persist the message on the database, and whether to trap errors that may take place during the call. Refer to Real Time Messages for more information.
F1-OutmsgMediator Alternative to F1-OutmsgDispatcher and may be a better option if the sender does not require an outbound message record to be instantiated. Refer to Real Time Messages for more information.
F1-RethrowError Issues an application error using the input message category / number / parameters.
F1-RetrieveMODescription Retrieves the description for a maintenance object.
F1-ReturnMessage Returns the expanded message given a message category, number, parameters, and parameter types.
F1-SavePointDispatcher Allows for a service script to be executed where exceptions are trapped and the transaction is rolled back to a save point set before the service script execution.

User Related Services

Business Service Name Comments
F1-CheckApplicationSecurity Checks a user’s security for a given application service / access mode
F1-CheckUserAuthorization Determine whether a given user is authorized for access based on the input application service, security code, and authorization level.
F1-DetermineIfUserCanApproveTD Determine if the current user can approve a given To Do.