Month: July 2017

Find complete BPMN error traces

Find complete BPMN error traces

Scenario

During the development of a BPMN on SAP Process Orchestration you will probably arrive at a point where your Process does not work as expected. One way to find the issue is to check the traces in the Log Viewer, to find out more about the error.

Find the traces in the Log Viewer

  1. Triggered the BPMN to run again
  2. To check the BPM Status open PIMON (http://your.po:port/pimon)
  3. Go to Monitoring -> Processes and Tasks -> Manage Process
  4. Open the “History” Tab and select “Show: Advanced”. You can find the Log ID in the log entries below.
    Manage Processes: Find Log Id
    Manage Processes: Find Log Id

    If the following message is shown:

    For more details, decrease severity of log controller as described in SAP Note 1753560.

    Please check the section Increase BPMN Trace level and afterwards start again with step 1.

  5. Open  the NetWeaver Administrator (http://your.po:port/nwa)
  6. Got to Troubleshooting -> Logs and Traces -> Log Viewer
  7. Open View -> Open View -> System Logs and Traces

    Open "System Logs and Traces" view in Log Viewer
    Open “System Logs and Traces” view in Log Viewer
  8. Add a filter for Log ID and enter the Log ID out of the “Manage Processes” View

    NWA Log Viewer: Filter for LogId
    NWA Log Viewer: Filter for Log ID
  9. You can find the whole error trace in the filtered results.

Increase BPMN trace level

To increase the BPMN trace level follow the steps below:

  1. Open  the NetWeaver Administrator (http://your.po:port/nwa)
  2. Go to Configuration -> Infrastructure -> Log Configuration
  3. Select “Show: Tracing Locations”
  4. Click on “Open Filter” and filter for Location “BPMNException”
  5. Change Severity for location “ExceptionAdapter$BPMNException” to “ALL”

    NWA Log Configuration: Increase Severity for ExceptionAdapter$BPMNException
    NWA Log Configuration: Increase Severity for ExceptionAdapter$BPMNException
  6. Click on “Save Configuration” and trigger your BPMN again

Also, check out SAP Note 1753560.

“Start Process” in Process Repository is disabled

“Start Process” in Process Repository is disabled

Scenario

If you develop a BPMN, you probably have to manually trigger the process multiple times to check that everything works as expected. One way to trigger a BPMN is the usage of the “Start Process” function in the Process Repository.

You can find the Process Repository in the NetWeaver Administrator -> Processes and Tasks -> Process Repository.

Error

The “Start Process…” button in the Process Repository is disabled.

"Start Process..." button in Process Repository is disabled
“Start Process…” button in Process Repository is disabled

Solution

The role “SAP_BPM_SuperAdmin” is necessary to use the “Start process…” function. To add the role to your user, follow the steps below:

  1. Open the NetWeaver Administrator (http://your.pi/nwa)
  2. Go to Configuration -> Security -> Identity Management
  3. Select you User and open the “Assigned Roles” Tab
  4. Click on “Modify” and search for the role “SAP_BPM_SuperAdmin”
  5. Select the role, click on “Add” and afterwards on “Save”
    Add role SAP_BPM_SuperAdmin to user
    Add role SAP_BPM_SuperAdmin to user

     

After refreshing the repository browser, the “Start Process…” button should be available.

Error during BPMN deployment

Error during BPMN deployment

Scenario

Developing and debugging a BPMN can be a nightmare. The build and redeployment of a BPMN can take up to five minutes and lead to multiple errors.

After multiple successful deployments, it was no longer possible to deploy or undeploy a process.

Error

The following error message was shown in the deployment log of SAP NetWeaver Developer Studio:

Description: Description: 1. Adapter com.sap.glx.adapter.internal.Transformer has refused deploy unit e5853c8198e860817e261ae672f4bfc4 using configuration mode DEPLOYMENT

-> Transformer could not get lock within 60 seconds

Solution

Restart the Galaxy Core Service to fix the issue. This can be done like this:

  1. Open the NetWeaver Administrator (http://your.pi:port/nwa)
  2. Go to Operations -> Systems -> Start & Stop -> Java Services
  3. Search for Name “Galaxy Core Service”
  4. Select your Instance and click on Restart
  5. Wait some seconds and  try to deploy your service again
NWA: Restart Galaxy Core Service
NWA: Restart Galaxy Core Service
Forbidden Error in XI Receiver Channel

Forbidden Error in XI Receiver Channel

Scenario

In a configuration with an SAP R3 system as receiver, which is connected via a XI Receiver Channel, the message cannot be delivered to the target system.

Error

The following message is shown in the Message Log of PIMON:

SOAP: Error occurred: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 403 Forbidden

Exception caught by adapter framework: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 403 Forbidden

Transmitting the message to endpoint <local> using connection JPR failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 403 Forbidden

Solution

Activate the Integration Engine Service on your target system:

  1. Open SAP GUI and connect to your target system
  2. Open transaction “SICF”
  3. Enter “/sap/xi/engine” as “Service Path” and click execute

    Transaction SCIF: Service Path /sap/xi/engine
    Transaction SCIF: Service Path /sap/xi/engine
  4. Right click on “Integration Engine (SAP XI Message Format)” and select “Activate Service”

    Transaction SCIF: Activate Integration Engine Service
    Transaction SCIF: Activate Integration Engine Service
  5. Restart your message
  6. If it still does not work, check that the used user has the role “SAP_XI_APPL_SERV_USER”
IDOC_ERROR_PARSE_FAILURE: Namespace in IDOCs

IDOC_ERROR_PARSE_FAILURE: Namespace in IDOCs

Scenario:

In a SOAP to IDOC scenario with a XSLT mapping, the receiving IDOC Communication Channel produced an error message.

Error:

The following error message is shown in the Message Log:

Error before sending due to idoc parsing error: (7) IDOC_ERROR_PARSE_FAILURE: Invalid XML 1.0 character encountered within IDoc-XML for type <ORDERS05>:
state=EXPECTING_IMMEDIATE_TAG_END, charPosition=64, lineNumber=1, columnNumber=65, invalidChar=U+0078,
sourceSnippet=…UTF-8″ standalone=”no”?><ORDERS05 xmlns:a=”http://example.namespace.com/order”><IDOC BEGIN=”1″><EDI_DC40 SEGMENT=”1…
—————————————————^

Error Message in PIMON Message Monitor
Error Message in PIMON Message Monitor

Solution:

Namespaces are not allowed in IDOCs. You can add the exclude-result-prefixes parameter to your stylesheet definition to make sure that the given namespaces are not added to the target document.

<ns0:stylesheet version="1.0" xmlns:a="http://example.namespace.com/order" xmlns:ns0="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="a">

Multiple namespaces can be added by using a white space as separator:

<ns0:stylesheet version="1.0" xmlns:a="http://example.namespace.com/order" xmlns:ns0="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="a b c">
Graphical Mapping with Plain Text to XML conversion

Graphical Mapping with Plain Text to XML conversion

Scenario:

Synchronous communication between a SAP system and a non SAP websystem. The SAP system sends a request via Proxy to SAP PI, which forwards the request via SOAP to a webservice. The webservice sends a synchronous XML response back to PI and PI forwards it back to the SAP system. So far so good.

But, in case of an error, the webservice responds with a plain text message only, which fails on PI during the mapping.

Solution:

Therefore, a mapping, which wraps non XML responds into an XML envelope is necessary. As the response is mapped to a different data structure, I decided to create a standard message mapping, which checks the first character for “<“. If the character is “<“, the standard message mapping is executed. In case it is any other character, the complete message is wrapped into a XML envelope.

To create this behavior, I added the following transform function into the “Attributes and Methods”:

public void transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException {
	String strXML = new String();
	String outputPayload = null;
	// convert TransformationInput and TransformationOutput to InputStream and OutputStream
	InputStream i = (InputStream) in.getInputPayload().getInputStream();
	OutputStream o = (OutputStream) out.getOutputPayload().getOutputStream();

	// convert InputStream to String
	try {
		BufferedReader inpxml = new BufferedReader(new InputStreamReader(i));
		StringBuffer buffer = new StringBuffer();
		String line="";

		while ((line = inpxml.readLine()) != null) {
			buffer.append(line);
		}
		strXML=buffer.toString();

	} catch (Exception e) {
		System.out.println("Exception Occurred");
	}

	// check if input is XML
	if (strXML.startsWith("<")) {
		// if input is XML, use regular graphical mapping
		super.transform(in, out);
	} else {
		// if input is non XML, wrap input into XML envelope
		outputPayload =
		"<?xml version='1.0' encoding='UTF-8'?>"
		+ "<ns0:message xmlns:ns0='http://tempuri.org/message'>"
		+ strXML
		+ "</ns0:message>";

		// write payload into OutputStream
		try {
			o.write(outputPayload.getBytes("UTF-8"));
		} catch (Exception e) {
			System.out.println("Exception Occurred");
		}

	}

}
JAVA Mapping in Graphical Mapping
JAVA Mapping in Graphical Mapping