SAP MII Workflow Configuration and Queue Management

Share

Workflow Configurations

Workflow Configurations in SAP Manufacturing Integration and Intelligence (SAP MII) refer to the processes used to design and set up business processes. These configurations contain information about how workflows will operate, the sequence of steps, and the actions that will be triggered.

Configurations

This chapter explains how to configure ERP-Shop Floor integration in SAP MII. Configuration settings for ERP-Shop Floor integration are managed within SAP MII, utilizing SAP Overall Equipment Effectiveness (SAP OEE) Central Technical Configuration (CTC). These configurations can be optionally modified.

To access the configuration settings for ERP-Shop Floor integration, navigate to the ‘ERP-Shop Floor Integration for Worker UI’ section in the SAP MII main menu. Within this section, you will find multiple sub-headings. In this chapter, we will specifically explore the ‘Workflow Configurations’ and ‘Queue Monitor’ sections.

Figure A Main Title

Workflow Configurations

Select the message type from the Types List section on the Workflow Configurations screen. The details of the related Extensible Stylesheet Language Transformations (XSLTs) are displayed in the Type Details section.

The workflows configured to process IDocs are listed below:

Standard Workflow

The standard workflow employs XSLT to convert the message from the source XML format to the target XML format. You can view the XSLT definitions used for this transformation.

For all standard OEE message types in the workflow configuration, the Standard Workflow is utilized to process IDocs once and send approvals to SAP ERP.

Split Workflow

The split workflow is used to divide a message into multiple parts before it is processed by the Standard Workflow.

Correlation Workflow

The Correlation Workflow is used to combine multiple messages into a single message before being processed by the Standard Workflow.


NOTE: Please use the Standard Workflow to complete any data or data processed by the Split and Correlation Workflow methods.

Figure B Workflow Configurations

Queue Monitor

The Queue Monitor enables you to monitor the status of an IDoc after it has been imported into the ERP-Shop Floor Integration framework. Use the Trace button to view the input or output parameters of the IDoc, and you can also access intermediate XMLs generated after XSL transformations.

It is also possible to retry a failed IDoc. To do this, simply select the IDoc and trigger the Retry button. The status of the IDoc will change from FAILED to Retry and will be updated as PASS or FAILED depending on the result.

A standard process for retrieving IDocs is available in the Message Queue.

When searching the Queue Monitor without a filter, you may encounter an excessive amount of data. To quickly access data from a specific workflow, you can apply filters and search within the extensive dataset. In this context, utilize the ‘Search Criteria’ field in the Queue Tracker for detailed searches.

Uses of the search filters respectively,

  1. Document Type: This is the section where the name of the workflow(s) to be found is written/selected.
  2. Status: This section allows you to select the status of the workflow(s).
  3. Identifier: This is the field where the desired workflow(s) can be searched with the Workflow Handler Parameters specified in the Workflow Configurations.
  4. Correlation Key: This is the field where you can search for the workflow(s) using the parameter created with the Correlation Workflow.
  5. From-To: This is the section where the start and end parameters of the workflow(s) to be found are entered.
  6. Parent ID: This field is used to search for the workflow(s) using the Main ID number.
  7.  Record Qty: This section specifies the maximum number of workflows to be found.

Figure C Queue Monitor

Scheduler Jobs

Each workflow in the Queue Monitor passes through several different system jobs. Below, you’ll find detailed descriptions for each of these system jobs.

Message Dispatcher

The Message Dispatcher is used to process messages that are queued to enter the queue.

Number of Messages

This is where you specify the number of messages to be processed by the job in the queue. This process will only handle the specified number of messages each time it runs. The default number of messages it will process at a time is 50, but this number can be customized.

Message Enqueuer

The Message Enqueuer is responsible for forwarding each message from the Outgoing MII Messages Queue to the Integration Message Queue for processing in the Message Dispatcher.

Number of Messages

The default value for the number of messages in the queue to be processed at a time is 200, but this number can be customized.

After each message is queued for processing by the Message Dispatcher, it will be deleted by default at the end of the process. If you want to change this default state, simply change the “deleteAfterQueuing” input parameter of this job to “false”.

Queue Message Cleaner

The Queue Message Cleaner is used to clean up processed messages. This task clears all messages whose status is not one of the following: ‘QUEUED,’ ‘RETRY,’ or ‘IN_CORRELATION”.

IDOC Inbound Enqueuer

IDOC Inbound Enqueuer is used to deliver messages from the SAP MII Category Queue to the Integration Message Queue for processing by the Message Dispatcher.

Number of Messages

In the Category Queue, the default number of messages processed by the job is set to 200, which can be customized. The job processes the specified number of messages each time it runs. By default, each message queued for processing by the Message Dispatcher is deleted at the end of the process. If you want to change this default behavior, simply set the ‘deleteAfterQueuing’ input parameter of this job to ‘false’.

SAP EWM Inbound Message Enqueuer

SAP EWM processes the notification messages synchronously from the EWM_NOTIFICATION_QUEUE queue and sends the processed messages to the Queue Monitor. If the message status is ‘Failed,’ it will be reprocessed by the Message Dispatcher Job.

Number of Messages

The number of messages in the EWM_NOTIFICATION_QUEUE queue to be processed defaults to 50.  This job will process only the specified number of messages each time it runs. The default value can be customized.


NOTE: For optimal performance, it is recommended that, for all the above jobs, you process fewer messages more frequently rather than processing more messages less frequently.

Figure D Scheduler Jobs

Queue Management in Multi-Workflow Situation

If multiple workflows of the same type are found consecutively in the queue, it’s essential to prioritize them. This is because workflows are processed asynchronously. To achieve this, we utilize the ‘procType’ field within the Workflow Handler Parameters, as demonstrated in the example below. Ensure that identical ‘procType’ values are assigned to workflows of the same type, while different ‘procType’ values should be used for distinct workflows. This correction ensures that operations within the queue are executed sequentially, eliminating any potential confusion.

Example Usage: …length(/Z_MATMAS05/IDOC/E1MARAM/MATNR_LONG)=0]);enrichWithSuppPlantConfig=true;procType=Q6

Example

The following example describes the customization of the standard MATMAS IDOC due to the new business setup and how these customization processes occur in sequence.

First, a new Workflow must be created. For this,

  1. Navigate to the Workflow Configuration tab in the SAP MII menu and click the ‘Create’ button.

NOTE: In order to perform this operation faster, it is possible to create a new flow over an existing flow by using the Copy As button.

Figure E Creating a New Workflow
  • Customizations are made in the Type Details section for the new workflow created, and mandatory fields are filled in.

NOTE: This example is created for the Standard Workflow. Split and Correlation Workflows may have different fields or missing parts.

The main areas here are:

  1. Message Type: Specify the name of the workflow.
  2. Workflow: Select the flow type of the workflow.
  3. Workflow Handler: It is automatically filled in as soon as the Workflow Type is selected.
  4. Workflow Handler Parameters: This is filled in with the data you want to appear in the Identifier section of the Queue Monitor screen.
  5. Pre XSLT Transaction: This is the section where the address extension in SAP MII Workbench will be specified when the XML message from MII is to be converted to XSLT format to make it more readable or to customize tag names.
  6. Partner (Request) XSLT Address: This section specifies the address extension in SAP MII Workbench when converting an incoming (Request) message to XSLT format.
  7. Post XSLT Transaction: This is the step in SAP MII Workbench where you specify the address extension of the transaction, making changes to the workflow.
  8. Response XSLT Address: This section specifies the address extension of the XSLT in SAP MII Workbench that will be returned as a result when the process flow is completed.
  9. Pass Handler Transaction: If the “Status” tag returned from the XSLT contains the result “PASS,” this section specifies the address extension of the transaction to be used in SAP MII Workbench.
  10. Failed Handler Transaction: If the Status tag returned from the Response XSLT contains ‘FAILED,’ this is the part where the address extension of the transaction to be used in SAP MII Workbench is specified.

NOTE: There is prioritization in the order of actions. When the Customer field is empty, the Partner action will be executed. When all Customer fields are full, only the Customer action will be executed.

Figure F Workflow Settings
  • For a new field in the Request XSLT in MATMAS IDoc, a new section is added to the XSLT as follows.

Figure F New Development

  • After all operations are completed, when our workflow is triggered, the data received from or sent to the Queue Monitor can be displayed.

Figure H Searching for a Desired Scenario in the Queue Monitor

  • Click on the Trace button to see the results and access the details.
  • The following image shows that the edited part has been added and contains data.

Figure J Result

Muhammed Furkan Gerem

Supporting your business processes with emerging technologies is the main goal of our business.

exp head deco 3
icon our expertise

Thank you

You’ll receive an email with download link shortly.

If not, reach us on solviamarketing@solviads.com

Created by icon 54from the Noun Project

Thank you

You’ll receive an email shortly.

If not, reach us on solviamarketing@solviads.com