【SAP PO】SAP PO 接口配置完整教程之二REST服务对接


本示例以SAP端作为请求端,通过调用封装了外部Rest服务的Sproxy代理类方法,实现与外部服务的对接。

1、了解服务协议

外部服务,由对接方系统提供。
现在主流的服务形式为Restful接口服务,需要使用JSON 数据格式、UTF8 编码。
这里我们以一个SAP推送采购需求到SRM系统的实际案例来进行举例说明。

1.1、服务通讯协议

(1)接口访问方式
请求数据类型:JSON
请求方式:POST
认证方式:Oauth 2.0
传输协议:https

(2)接口认证方式
在每次主动调用SRM开放平台接口时需要带上AccessToken参数,开放平台会根据此次访问的 AccessToken,校验访问的合法性以及所对应的权限并返回相应的结果。
AccessToken的默认有效期为1小时,调用方可定时更新自己本地缓存的token。
设置AccessToken有两种方式,推荐使用第一种,如下所示:
A:在httpHeaders里面设置AccessToken

HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.add("Authorization", "Bearer " + accessToken);

B:在调用地址后面带上AccessToken

https://*******/sitf/v1/rest/operation-units/conversion-operation-unit?access_token=5e0b05ef-ea2e-4cd8-8a90-2663498e9d87

获取Access Token
① 简要描述:调用该接口,获取token授权,token将作为其他接口的授权凭证。
② 请求方式:POST
③ 请求URL:/oauth/oauth/token
④ 请求参数示例:

https://*******/oauth/oauth/token?grant_type=client_credentials&client_id=*******&client_secret=******&scope=default

请求参数说明

参数名称类型非空描述
grant_typeString授权模式,固定值client_credentials
client_idString即对接账号(由服务方提供)
client_secretString客户端密钥(由服务方提供)
scopeString作用域,固定值default

⑤ 反馈示例
正确返回值

{
    "access_token": "97eb08ad-8c86-459f-9526-905caebe2958",
    "token_type": "Bearer",
    "expires_in": 2263,
    "scope": "default"
}

错误返回值

{
    "error": "invalid_grant",
    "error_description": "Bad credentials"
}

反馈参数说明

参数名称类型非空描述
access_tokenString访问令牌,用于业务接口调用。
token_typeStringToken类型
expires_inIntegeraccess_token的有效期,单位:秒
scopeString作用域

(3)标准请求结构说明
请求body由两部分组成,一部分是"header"信息(并非httpHeader,每个接口格式固定),一部分是"body"信息(存放的动态业务数据,每个接口视具体接口字段而定),如下所示

{
    "header":{
        "applicationCode":"",
        "applicationGroupCode":"",
        "batchCount":"",
        "batchNum":"",
        "externalSystemCode":"",
        "interfaceCode":"",
        "userName":""
    },
    "body":[
        {
            "sourceCode":"testFiled",
            "esOuCode":"testFiled",
            "erpCreationDate":"2019-09-16 03:01:50",
            "erpLastUpdateDate":"2019-09-16 03:01:50",
            "enabledFlag":1,
            "esOuId":"testFiled",
            "ouName":"testFiled"
        }
    ]
}

请求参数说明

字段字段类型是否必填描述备注
applicationGroupCodeString应用组SRM提供,随着对接环境不同会变化
applicationCodeString应用SRM提供,随着对接环境不同会变化
batchCountString数据量对方系统提供,可不传
batchNumString批次号对方系统提供,不超过20位递增的数字,建议时间戳
externalSystemCodeString外部系统SRM提供,固定值
interfaceCodeString接口编码SRM提供,不同接口编码不同
userNameString用户名SRM提供,SRM子账户名,随着对接环境不同会变化

(4)标准反馈结构说明
​SRM接口的反馈结构是固定的标准格式,分为批次响应结果(本次请求的响应结果)和单据执行结果(传输的具体单据的执行响应结果),如下所示:

{
    "batchNum":"",
    "executeResult":"PART",
    "responseMessage":"SSS",
    "responseStatus":"SUCCESS",
    "restResponseDtlDTOList":[
        {
            "documentCode":"SS",
            "documentId":1,
            "responseMessage":"MM",
            "responseStatus":"SUCCESS"
        },
        {
            "documentCode":"BB",
            "documentId":2,
            "responseMessage":"",
            "responseStatus":"ERROR"
        }
    ]
}

反馈参数说明

字段字段类型描述备注
batchNumString批次号请求的批次号
responseStatusString程序执行状态ERROR:失败,SUCCESS:成功;状态为ERROR说明整批数据程序执行异常,无需关心明细响应结构。状态为SUCCESS,需要从restResponseDtlDTOList中获取具体每条数据的执行状态
responseMessageString错误信息
executeResultString执行结果SUCCESS:数据全部执行成功,FAILED:数据全部执行失败,PART:数据部分成功部分失败

restResponseDtlDTOList

字段字段类型描述备注
documentIdLongerp业务单据唯一性标识暂无使用
documentCodeStringerp业务单据唯一性标识对应接口的唯一性字段
responseStatusString执行状态SUCCESS:成功,ERROR:失败(当前此笔单据执行的状态)
responseMessageString错误信息当前此笔单据执行产生的异常信息,如果状态为SUCCESS此处无值,如果为ERROR,此处有具体报错信息

1.2、具体接口协议

(1)接口地址:https://gateway.dev.isrm.going-link.com/sitf/v1/rest/forecast/receiver-data
(2)请求报文结构:

{
    "header": {
        "applicationCode": "服务方提供",
        "applicationGroupCode":"服务方提供",
        "batchCount":"此批次数据条数",
        "batchNum":"递增且唯一的少于20位的数字,建议时间戳",
        "externalSystemCode":"服务方提供的外部系统CODE",
        "interfaceCode":"服务方提供",
        "userName": "服务方提供"
    },
    "body": [
        {
            "esFcstHeaderId": "",
            "esFcstNum": "2200001003361000001101421010",
            "lineNum": "1",
            "sourceCode": "SAP",
            "fcstStartDate": "2022-01-01",
            "esItemId": "",
            "esItemCode": "000000100000110142",
            "esSupplierId": "",
            "esSupplierCode": "0000100336",
            "esCategoryId": "",
            "esCategoryCode": "",
            "esOuId": "",
            "esOuCode": "1000",
            "esUomCode": "PCS",
            "esUomName": "",
            "esAgentId": "",
            "esAgentCode": "",
            "esPurchaseOrgId": " ",
            "esPurchaseOrgCode": "",
            "esInvOrganizationId": " ",
            "esInvOrganizationCode": "1010",
            "updateSelectiveFlag": "1",
            "deliveryPlan": "",
            "forecastLines": [
                {
                    "fcstLineType": "MONTH",
                    "fcstSeq": "3",
                    "fcstDate": "month3",
                    "fcstQuantity": "30",
                    "fcstLineDetails": [
                        {
                            "fcstDeliveryDate":"2022-03-15",
                            "fcstQuantity": 30.0,
                            "purchaserRemark": "采购方备注"
                        }
                    ]
                }
            ]
        }
    ]
}

(3)返回报文结构:同标准结构。

1.3、接口服务测试

首先确保服务能够被正常访问,我们可以使用postman工具来做接口测试。在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
接口测试通过,第三方服务准备就绪,接下来就开始PO端的配置。

2、PO端接口配置

2.1、PO端ESR配置

(1)登录PO,点击 Enterprise Services Builder,进入Java版ESB配置客户端
在这里插入图片描述
在这里插入图片描述
(2)创建 Namespace (仅首次需要)
在 SC_ERP(对应SAP系统)下新建 Namespace,右键→New→Namespace
在这里插入图片描述
输入 Namespace 名称,点击 Create
在这里插入图片描述
(3)在 Namespace 下创建文件夹,右键→Create Folder
在这里插入图片描述
修改为自己所需的文件夹名称,如:
在这里插入图片描述
(4)定义 ED(External Definition)
首先,定义报文结构 xsd文件
请求报文:ED_SRM_FORECAST_REQ.xsd

<?xml version="1.0" encoding="utf-8"?>
<schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema">
	<element name="ED_SRM_FORECAST_REQ">
		<complexType>
			<sequence>
			  <element name="header" minOccurs="0">
				<complexType>
				  <sequence>
					<element name="applicationCode" type="string" minOccurs="0"/>
					<element name="applicationGroupCode" type="string" minOccurs="0"/>
					<element name="batchCount" type="string" minOccurs="0"/>
					<element name="batchNum" type="string" minOccurs="0"/>
					<element name="externalSystemCode" type="string" minOccurs="0"/>
					<element name="interfaceCode" type="string" minOccurs="0"/>
					<element name="password" type="string" minOccurs="0"/>
					<element name="userName" type="string" minOccurs="0"/>
				  </sequence>
				</complexType>
			  </element>
			  <element name="body" minOccurs="0" maxOccurs="unbounded">
				<complexType>
				  <sequence>
					<element name="esFcstHeaderId" type="string" minOccurs="0"/>
					<element name="esFcstNum" type="string" minOccurs="0"/>
					<element name="lineNum" type="string" minOccurs="0"/>
					<element name="sourceCode" type="string" minOccurs="0"/>
					<element name="fcstStartDate" type="string" minOccurs="0"/>
					<element name="esItemCode" type="string" minOccurs="0"/>
					<element name="esSupplierCode" type="string" minOccurs="0"/>
					<element name="esCategoryCode" type="string" minOccurs="0"/>
					<element name="esOuCode" type="string" minOccurs="0"/>
					<element name="esUomCode" type="string" minOccurs="0"/>
					<element name="esAgentCode" type="string" minOccurs="0"/>
					<element name="esPurchaseOrgCode" type="string" minOccurs="0"/>
					<element name="esInvOrganizationCode" type="string" minOccurs="0"/>
					<element name="updateSelectiveFlag" type="string" minOccurs="0"/>			
					<element name="forecastLines" minOccurs="0" maxOccurs="unbounded">
					  <complexType>
						<sequence>
						  <element name="fcstLineType" type="string" minOccurs="0"/>
						  <element name="fcstSeq" type="string" minOccurs="0"/>
						  <element name="fcstDate" type="string" minOccurs="0"/>
						  <element name="fcstQuantity" type="string" minOccurs="0"/>
						  <element name="fcstLineDetails" minOccurs="0" maxOccurs="unbounded">
							  <complexType>
								<sequence>
								  <element name="fcstDeliveryDate" type="string" minOccurs="0"/>
								  <element name="fcstQuantity" type="string" minOccurs="0"/>
								  <element name="purchaserRemark" type="string" minOccurs="0"/>
								</sequence>
							  </complexType>
							</element>
						</sequence>
					  </complexType>
					</element>
				  </sequence>
				</complexType>
			  </element>
			</sequence>
		</complexType>
	</element>
</schema>

响应报文:ED_SRM_FORECAST_RESP.xsd

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.yankon.com/xi/SRM" targetNamespace="http://www.yankon.com/xi/SRM">
   <xsd:element name="MT_SRM_RESP" type="DT_SRM_RESP" />
   <xsd:complexType name="DT_SRM_RESP">
      <xsd:sequence>
         <xsd:element name="batchNum" type="xsd:string" minOccurs="0" />
         <xsd:element name="responseStatus" type="xsd:string" minOccurs="0" />
         <xsd:element name="responseMessage" type="xsd:string" minOccurs="0" />
         <xsd:element name="executeResult" type="xsd:string" minOccurs="0" />
         <xsd:element name="restResponseDtlDTOList" minOccurs="0" maxOccurs="unbounded">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="documentId" type="xsd:string" minOccurs="0" />
                  <xsd:element name="documentCode" type="xsd:string" minOccurs="0" />
                  <xsd:element name="responseStatus" type="xsd:string" minOccurs="0" />
                  <xsd:element name="responseMessage" type="xsd:string" minOccurs="0" />
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>
      </xsd:sequence>
   </xsd:complexType>
</xsd:schema>

说明:
① xml节点有无“xsd:”,没有区别。
② 响应结构与请求结构,前几行定义方式不一致,是由于在测试过程中发现,响应消息解析报错,后来做了调整。而请求能够正常解析,故没做调整。实际全新配置的,建议都参考响应结构定义。

<schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema">
	<element name="ED_SRM_FORECAST_REQ">
		<complexType>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.yankon.com/xi/SRM" targetNamespace="http://www.yankon.com/xi/SRM">
   <xsd:element name="MT_SRM_RESP" type="DT_SRM_RESP" />
   <xsd:complexType name="DT_SRM_RESP">

然后,PO中新建 请求ED,导入对应xsd文件
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
切换至Messages页签,可以检查确认请求报文结构。
同理创建 响应ED。

(5)定义 SI(Service Interface)
创建 请求SI
在这里插入图片描述
在这里插入图片描述
同理创建 响应SI
在这里插入图片描述
(6)定义 MM(Message Mapping)
创建 请求MM
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
同理创建 响应MM
在这里插入图片描述
(7)定义 OM(Operation Mapping)
创建 OM
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
保存所有对象,激活所有对象,ESR配置完毕。

2.2、PO端IB配置

返回PO主界面,点击 Integration Builder,进入Java版IB配置客户端
在这里插入图片描述
(1)在 BS_ERP_300 中,定义消息发送通道(Sender),配置如下,
在这里插入图片描述
(2)创建SRM端 BC(仅首次需要)
在这里插入图片描述
在 BC_SI 添加 服务接口 SI
在这里插入图片描述
(3)在 BC_SRM 中,定义消息接收通道(Receiver)
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
(4)创建 IC
在这里插入图片描述
在这里插入图片描述
配置如下:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
保存,激活,查看WSDL
在这里插入图片描述
复制WSDL URL,发给外部系统调用,如SoapUI
在这里插入图片描述

2.3、PO端https证书导入

(1)证书的获取
浏览器打开相应地址,如下图
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
(2)证书的导入
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
重启PO系统即可。

3、SAP端代理服务创建

登录SAPGUI,执行事务码 Sproxy,进入对象导航界面,定位到前面创建的发送请求的SI,双击或右键→Generate,创建代理类
在这里插入图片描述
在这里插入图片描述
保存,激活即可,双击可以查看类源码
这里我们可以重点查看一下方法的参数结构,后面调用代理类的时候需要用到
在这里插入图片描述
在这里插入图片描述

4、SAP端请求服务

执行事务码 SE37,定义一个函数来封装代理类的调用,这里只做测试用,未定义入参出参。

FUNCTION ZFMMM_092.
*"----------------------------------------------------------------------
*"*"本地接口:
*"----------------------------------------------------------------------

DATA:LC_TEST      				TYPE REF TO ZPCO_SI_S4_SRM_FORECAST_REQ,
     	  OUTPUT       			TYPE  ZPED_SRM_FORECAST_REQ,
          BODY         			TYPE ZPSI_S4_SRM_FORECAST_REQ_B_TAB,
          LS_BODY      			TYPE ZPSI_S4_SRM_FORECAST_REQ_BODY,
          FORECAST_LINES 		TYPE ZPSI_S4_SRM_FORECAST_REQ_F_TAB,
          LS_FORECAST_LINES 	TYPE ZPSI_S4_SRM_FORECAST_REQ_FOREC,
          FCST_LINE_DETAILS 	TYPE ZPSI_S4_SRM_FORECAST_REQ__TAB1,
          LS_FCST_LINE_DETAILS 	TYPE ZPSI_S4_SRM_FORECAST_REQ_FCST,
          INPUT        			TYPE  ZPMT_SRM_RESP,
          GS_EXCEPTION 			TYPE REF TO CX_AI_SYSTEM_FAULT, " 异常
          GS_MSG       			TYPE STRING.
          
*  &参数赋值
  LS_FCST_LINE_DETAILS-FCST_DELIVERY_DATE = '2022-03-15'.
  LS_FCST_LINE_DETAILS-FCST_QUANTITY = '30.0'.
  LS_FCST_LINE_DETAILS-PURCHASER_REMARK = '采购方备注'.
  APPEND ls_FCST_LINE_DETAILS TO FCST_LINE_DETAILS.
  
  LS_FORECAST_LINES-FCST_LINE_TYPE = 'MONTH'.
  LS_FORECAST_LINES-FCST_SEQ = '3'.
  LS_FORECAST_LINES-FCST_DATE = 'month3'.
  LS_FORECAST_LINES-FCST_QUANTITY = '30'.
  LS_FORECAST_LINES-FCST_LINE_DETAILS = FCST_LINE_DETAILS.
  APPEND LS_FORECAST_LINES TO FORECAST_LINES.

  LS_BODY-ES_FCST_HEADER_ID = ''.
  LS_BODY-ES_FCST_NUM = '2200001003361000001101421010'.
  LS_BODY-LINE_NUM = '1'.
  LS_BODY-SOURCE_CODE = 'SAP'.
  LS_BODY-FCST_START_DATE = '2022-01-01'.
  LS_BODY-ES_ITEM_CODE = '000000100000110142'.
  LS_BODY-ES_SUPPLIER_CODE = '0000100336'.
  LS_BODY-ES_CATEGORY_CODE = ''.
  LS_BODY-ES_OU_CODE = '1000'.
  LS_BODY-ES_UOM_CODE = 'PCS'.
  LS_BODY-ES_AGENT_CODE = ''.
  LS_BODY-ES_PURCHASE_ORG_CODE = ''.
  LS_BODY-ES_INV_ORGANIZATION_CODE = '1010'.
  LS_BODY-UPDATE_SELECTIVE_FLAG = '1'.
  LS_BODY-FORECAST_LINES = FORECAST_LINES.
  APPEND LS_BODY TO BODY.

  OUTPUT-HEADER-APPLICATION_CODE = '服务方提供'.
  OUTPUT-HEADER-APPLICATION_GROUP_CODE = '服务方提供'.
  OUTPUT-HEADER-BATCH_COUNT = '1'.
  OUTPUT-HEADER-BATCH_NUM = '202209014000000011'.
  OUTPUT-HEADER-EXTERNAL_SYSTEM_CODE = '服务方提供'.
  OUTPUT-HEADER-INTERFACE_CODE = '服务方提供'.
*  OUTPUT-HEADER-PASSWORD = ''.
  OUTPUT-HEADER-USER_NAME = '服务方提供'.
  OUTPUT-BODY = BODY.

*  &实例化
  IF LC_TEST IS NOT BOUND.
    CREATE OBJECT LC_TEST TYPE ZPCO_SI_S4_SRM_FORECAST_REQ.
  ENDIF.
  TRY.
      CALL METHOD LC_TEST->SI_S4_SRM_FORECAST_REQ
        EXPORTING
          OUTPUT = OUTPUT
        IMPORTING
          INPUT  = INPUT.
    CATCH CX_AI_SYSTEM_FAULT INTO GS_EXCEPTION.
*  &---异常信息获取
      CALL METHOD GS_EXCEPTION->GET_TEXT
        RECEIVING
          RESULT = GS_MSG.
    CATCH CX_AI_APPLICATION_FAULT .
  ENDTRY.
  CLEAR: OUTPUT.
  COMMIT WORK.

ENDFUNCTION.

5、接口测试

(1)代理类执行,需要在与PO对应的测试环境进行测试,如开发300环境。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
调整请求参数,或导入已经保存的请求变式
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
(2)函数执行
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
继续执行,看出返回信心 INPUT
在这里插入图片描述

原创文章,转载请注明来源-X档案

SAP Process Orchestration The Comprehensive Guide, 2nd Edition SAP流程编制综合指南 1 Introduction to SAP Process Orchestration 1.1 Historical Overview and Evolution 1.1.1 SAP Process Integration 1.1.2 SAP Composition Environment 1.1.3 SAP Process Orchestration 1.1.4 SAP Process Orchestration 7.5 Highlights 1.2 SAP Process Orchestration Components 1.2.1 SAP Process Integration 1.2.2 Business Process Management 1.2.3 Business Rules Management 1.3 Architectural Overview and Positioning 1.3.1 SAP Process Orchestration Positioning 1.3.2 SAP NetWeaver Application Server for Java: System Architecture 1.3.3 SAP NetWeaver AS Java System Logical Layers 1.4 Installation Options 1.4.1 Case 1: SAP Process Integration Dual Stack 1.4.2 Case 2: SAP PI Dual Stack and SAP Composition Environment in Separate Installations 1.4.3 Case 3: SAP PI Single Stack and SAP Composition Environment in Separate Installations 1.4.4 Case 4: SAP POSAP PI and SAP Composition Environment in a Single Installation 1.5 Summary 2 Administration and Development Tools 2.1 SAP Process Orchestration Tools 2.1.1 Enterprise Services Repository 2.1.2 Integration Directory 2.1.3 System Landscape Directory 2.1.4 Configuration and Monitoring 2.2 SAP NetWeaver Administrator 2.2.1 Availability and Performance 2.2.2 Operations 2.2.3 Configuration 2.2.4 Troubleshooting 2.2.5 SOA 2.3 SAP NetWeaver Developer Studio 2.3.1 Use and Download 2.3.2 SAP Process Orchestration and SAP NetWeaver Developer Studio 2.4 Summary Part II Advanced Adapter Engine Extended (AEX) 3 Configuring the System Landscape Directory 3.1 System Landscape Directory Components and Features 3.1.1 Landscape 3.1.2 Software Catalog 3.1.3 Development 3.2 Registering Systems to the System Landscape Directory 3.2.1 Connecting to ABAP-Based Systems 3.2.2 Connecting to Java-Based Systems 3.2.3 Connecting to Other Systems 3.3 Administration of the System Landscape Directory 3.3.1 Server 3.3.2 Data and Content 3.4 System Landscape Directory Strategies 3.4.1 Manual Export and Import of Data 3.4.2 Automatic Bridge Forwarding 3.4.3 Full Automatic Synchronization 3.5 Tips and Tricks 3.5.1 Naming Convention 3.5.2 Keeping Your System Landscape Directory Catalogs Up to Date 3.5.3 Self-Registration of a Java-Based System with the SLD 3.5.4 Configuring Data Suppliers from One SLD to Another 3.5.5 Manual Export and Import of Data 3.5.6 Connecting the SLD to CTS+ to Facilitate the Export and Import of SLD Data 3.6 Exercise: Configuring the System Landscape Directory 3.6.1 Exercise Description 3.6.2 Exercise Solution Approach 3.6.3 Exercise Step-by-Step Solution 3.7 Summary 4 Working with the Enterprise Services Repository and Registry 4.1 Basic ES Repository Technical Concepts 4.1.1 Functional Blocks 4.1.2 First Steps in the Enterprise Services Repository 4.1.3 Service Interface 4.1.4 Integration Patterns: Stateful and Stateless Communication 4.1.5 Asynchronous versus Synchronous 4.1.6 Quality of Service 4.2 Design Objects 4.2.1 Software Component Versions 4.2.2 Folders 4.2.3 Namespaces 4.2.4 Mappings 4.2.5 Process Integration Scenario 4.2.6 Actions 4.3 Data Types and Message Types 4.3.1 Data Types 4.3.2 External Definitions 4.3.3 Message Type 4.3.4 Additional Design Objects 4.4 Exercise: Working with the ES Repository and Registry 4.4.1 Exercise Description 4.4.2 Exercise Solution Approach 4.4.3 Exercise Step-by-Step Solution 4.5 Summary 5 Working with the Integration Directory 5.1 Integration Directory Overview 5.2 Collaboration Profiles 5.2.1 Party 5.2.2 Communication Component 5.2.3 Communication Channel 5.2.4 Communication Component without a Party 5.3 Adapter Types 5.3.1 Technical Adapters to Enable Communication with SAP or Third-Party Systems 5.3.2 Application Adapters to Enable Communication with an SAP System 5.3.3 SAP Industry Adapters 5.3.4 Third-Party-Developed Adapters 5.4 Integrated Configuration 5.4.1 Inbound Processing 5.4.2 Receiver 5.4.3 Receiver Interfaces 5.4.4 Outbound Processing 5.5 The XI Message Protocol 5.6 Configuration Scenario 5.6.1 Creating a Configuration Scenario from Scratch (Manually) 5.6.2 Creating a Configuration Scenario from a Model 5.7 Value Mapping 5.7.1 If/Else Logic 5.7.2 Fixed Values 5.7.3 Value Mapping 5.8 Business-to-Business Integration 5.8.1 Business-to-Business On Premise 5.8.2 Business-to-Business Managed Services 5.8.3 Trading Partner Management 5.9 Axis Framework 5.10 Representational State Transfer Adapter 5.11 Message Alerting 5.11.1 Alert Rule Overview 5.11.2 Creating an Alert Rule 5.11.3 Editing or Deleting a Rule 5.12 Publish the Service in the Services Registry 5.13 Integration Directory Programming Interface (Directory API) 5.14 Exercise: Working with the Integration Directory 5.14.1 Exercise Description 5.14.2 Exercise Solution Approach 5.14.3 Exercise Step-by-Step Solution 5.15 Summary 6 Building an Integration Flow 6.1 SAP NetWeaver Developer Studio 6.1.1 Installing SAP NetWeaver Developer Studio 6.1.2 Setting Up SAP NetWeaver Developer Studio 6.1.3 Enterprise Integration Patterns and User-Defined Templates 6.2 Basics of Creating and Configuring an Integration Flow 6.2.1 Creating an iFlow 6.2.2 Configuring an iFlow 6.3 iFlow Example 6.3.1 Creating Products, Software Components, Business Systems, and Technical Systems in the SLD 6.3.2 Importing SLD Objects into the ES Repository in SAP NetWeaver Developer Studio 6.3.3 Create Enterprise Service Repository Objects 6.3.4 Create Directory Objects: Import Business Systems and Create iFlows 6.3.5 Testing the iFlow Scenario 6.3.6 Monitoring the Scenario 6.4 New Features of the Process Integration Designer 6.4.1 Export Objects from the Integration Designer 6.4.2 Automatically Deploy after Import 6.4.3 Version History and Deployment Status 6.5 Supporting Multiple Senders for Your iFlow 6.6 Exercise: Building an Integration Flow 6.6.1 Exercise Description 6.6.2 Exercise Solution Approach 6.6.3 Exercise Step-by-Step Solution 6.7 Summary 7 Administration and Monitoring in AEX 7.1 Administration 7.1.1 Central Administration Tool 7.1.2 SAP NetWeaver Administrator 7.1.3 SAP NetWeaver Application Server Java 7.1.4 SAP Process Integration Monitoring (pimon) 7.1.5 SAP Management Console 7.1.6 Config Tool 7.1.7 Administration Using Telnet 7.2 Monitoring 7.2.1 SAP NetWeaver Administrator 7.2.2 SAP Process Integration Local Monitoring 7.2.3 SAP PI Central Monitoring with SAP Solution Manager 7.2.4 Message Retention 7.2.5 User-Defined Message Search 7.3 Troubleshooting 7.3.1 Configuring Log and Traces 7.3.2 Using the Log Viewer 7.4 Summary 8 Migrating Interfaces from SAP PI Dual Stack to SAP PO 8.1 Migration Strategies 8.2 Migrating System Landscape Directory Content 8.2.1 Products 8.2.2 Software Components 8.2.3 Technical System 8.2.4 Business System 8.3 Migrating Enterprise Services Repository Content 8.3.1 Exporting Objects 8.3.2 Importing Objects 8.4 Migrating Integration Directory Content 8.4.1 Manually 8.4.2 Using the Migration Tool 8.5 Summary Part III Business Process Management and Composition 9 Introduction to SAP BPM and BPMN 2.0 9.1 Managing Business Processes 9.2 SAP Business Process Management 9.2.1 SAP BPM versus SAP Business Workflow 9.2.2 BPM before SAP BPM 9.2.3 SAP BPM Main Components 9.3 Business Process Model and Notation 2.0 9.3.1 Swimlanes 9.3.2 Artifacts 9.3.3 Flow Objects 9.3.4 Connections 9.4 Summary 10 Creating Your First SAP BPM Process 10.1 SAP BPM Positioning and Development Environment 10.1.1 Positioning 10.1.2 Setting Up Your Development Environment 10.2 Creating and Modeling an SAP BPM Process 10.2.1 Demonstration Scenario 10.2.2 Building an SAP BPM Process: Overview 10.2.3 SAP NetWeaver Developer Studio Perspective Concept 10.2.4 Create a Project in SAP NetWeaver Developer Studio 10.2.5 Creating a Process for Your BPMN 10.2.6 Creating a BPMN Model 10.3 Configuring the BPMN Model 10.3.1 Data Objects 10.3.2 Creating Data Structures 10.3.3 Importing XSD and WSDL 10.3.4 Process Pool Properties 10.3.5 BPMN Flow Objects 10.4 Flow Objects 10.4.1 Events 10.4.2 Tasks 10.4.3 Activities 10.4.4 Gateways 10.4.5 Artifacts 10.5 Build and Deploy Your Process 10.5.1 Steps for Building a Process 10.5.2 Steps for Deploying a Process 10.6 Advanced Mapping 10.6.1 Mappings 10.6.2 Options in Mapping Assignment 10.6.3 Automatic Mapping 10.6.4 Custom Functions 10.7 Implementing Error Handling 10.8 Combining SAP BPM and the AEX 10.8.1 Message from SAP BPM to the AEX 10.8.2 Message from the AEX to SAP BPM 10.8.3 Leverage an ES Repository Mapping in SAP BPM 10.9 Exercise: Creating an SAP Business Process Management Process 10.9.1 Exercise Description 10.9.2 Exercise Solution Approach 10.9.3 Exercise Step-by-Step Solution 10.10 Summary 11 Applying Advanced SAP BPM Concepts and Extensions 11.1 Service-Oriented Architecture Configuration 11.1.1 Configuration for an Automated Activity 11.1.2 Configuration for a Start Event or Intermediary Event 11.2 Testing and Running an SAP BPM Process 11.2.1 Process Repository Overview 11.2.2 Process Testing 11.3 Custom Enterprise Java Bean Functions 11.3.1 Create EJB and EAR Development Components 11.3.2 Create the Enterprise Java Bean 11.3.3 Build and Deploy 11.3.4 Create a New Enterprise Java Bean Function 11.4 Using the Claim Check Pattern 11.4.1 Create Interfaces 11.4.2 Create Mappings 11.4.3 Configure the Channel 11.4.4 Retrieve the Large Message from SAP BPM 11.4.5 Update the Status of the Large Message from SAP BPM 11.5 SAP BPM Application Programming Interface 11.5.1 Prerequisite to Using the SAP BPM API 11.5.2 Implementation Aspects and Examples 11.6 SAP Business Process Management OData 11.6.1 OData Services for Tasks and Task Data 11.6.2 Error Handling 11.7 Using the Push API to Access SAP BPM Lifecycle Events 11.7.1 Accessing Events through a Message Driven Bean 11.7.2 Accessing Events through a Java Message Service API 11.8 Debugging and Troubleshooting SAP BPM Processes 11.8.1 Place Breakpoints in the Process 11.8.2 Add a Debug Configuration 11.9 Tuning SAP BPM-Related Performance Parameters 11.10 Best Practices for Your SAP BPM Application 11.10.1 BPMN, Mapping, and Parallelism 11.10.2 Task Related 11.10.3 Gateways 11.10.4 Looping 11.10.5 Data Object 11.10.6 Correlation 11.10.7 Error Handling 11.10.8 Housekeeping 11.11 Exercise: Applying Advanced SAP BPM Concepts and Extensions 11.11.1 Exercise Solution Approach 11.11.2 Exercise Step-by-Step Solution 11.12 Summary 12 Combining SAP BPM and UI Technologies 12.1 Web Dynpro Java User Interface Technology 12.1.1 Generating a Web Dynpro User Interface 12.1.2 Post-Configuration Steps 12.2 Integrating SAPUI5 into an SAP BPM Process 12.2.1 SAPUI5 Technology Platform 12.2.2 Model-View-Controller Concept 12.2.3 SAPUI5 Components 12.2.4 Other SAPUI5 Concepts 12.2.5 Integration Steps 12.3 Other User Interface Technologies 12.3.1 Visual Composer 12.3.2 Adobe Offline Forms 12.3.3 Support for Custom User Interface Technologies 12.4 Summary 13 SAP Business Rules Management 13.1 How Business Rules Work 13.2 SAP Business Rules Management 13.2.1 Rules Composer 13.2.2 Rules Manager 13.2.3 Rules Engine 13.3 Modeling Business Rules with Rules Composer 13.3.1 Create the Rules Composer Development Component 13.3.2 Adding Context to the Rules 13.3.3 Creating a Ruleset 13.3.4 Flow Ruleset 13.4 Testing Business Rules 13.5 Best Practices for Modeling Business Rules 13.5.1 Separate Decision Logic from Other Types of Logic 13.5.2 Reuse and Extend before Building 13.6 Exercise: SAP Business Rules Management 13.6.1 Exercise Solution Approach 13.6.2 Exercise Step-by-Step Solution 13.7 Summary 14 Implementing Java Proxies 14.1 Java Proxy Concept and Considerations 14.2 Implementation Approaches 14.2.1 Outside-In Approach 14.2.2 Inside-Out Approach 14.3 Technical Implementation 14.3.1 Development Environment 14.3.2 Developing a Server Java Proxy 14.3.3 Developing a Client Java Proxy 14.4 Building an Orchestration 14.5 Exercise: Implementing Java Proxies 14.5.1 Exercise Solution Approach 14.5.2 Exercise Step-by-Step Solution 14.6 Summary 15 Administration and Monitoring Message Processing in SAP BPM 15.1 Monitoring 15.1.1 SAP Business Process Management System Overview 15.1.2 Process Repository 15.1.3 Process Management 15.1.4 Task Management 15.1.5 SAP BPM Inbox 15.1.6 Business Logs 15.1.7 SAP BPM Action Monitor 15.1.8 Process Troubleshooting 15.1.9 Rules Business Logs 15.1.10 SAP BPM Analytics Dashboard 15.2 Administration 15.2.1 Process Data Archiving 15.2.2 Log Viewer 15.3 Summary 16 Migrating ccBPM from SAP PI to SAP PO 16.1 Motivation for Migration 16.2 Migration Approach 16.2.1 Analyze the As-Is Integration Processes 16.2.2 Translate and Redesign 16.2.3 Export and Reuse Enterprise Services Repository Objects 16.2.4 Migrate and Adapt Configuration Scenarios 16.3 Recommendations 16.4 Summary Part IV Advanced Concepts 17 SAP Cloud Platform Integration for SAP PO 17.1 Enable Cloud Integration Content in SAP PO 17.2 Reusing Cloud Integration Content 17.2.1 Download Cloud Integration Content 17.2.2 Deploy the Cloud Integration Content 17.3 Monitoring 17.3.1 Monitoring the Integration Gateway Component 17.3.2 Monitoring Messages Related to the Deployment of Cloud Integration Content 17.4 Summary 18 Additional Components for SAP Process Orchestration 18.1 Component Model 18.1.1 Product 18.1.2 Software Components 18.1.3 Development Component 18.1.4 Dependencies among Development Components 18.1.5 Public Parts 18.2 SAP NetWeaver Development Infrastructure 18.2.1 Change Management Services 18.2.2 Design Time Repository 18.2.3 Component Build Service 18.3 SAP Composite Application Framework 18.3.1 Design Time Aspects 18.3.2 Runtime Aspects 18.4 Service Registry 18.5 Enhanced Change and Transport System 18.5.1 SAP PI-Related Transports 18.5.2 Transports for Non-SAP PI Java Objects 18.6 Exercise: Create an SWCV 18.6.1 Exercise Solution Approach 18.6.2 Exercise Step-by-Step Solution 18.7 Summary 19 Landscape Setup Considerations 19.1 Java System Configuration 19.1.1 Java Sizing and Setup Considerations 19.1.2 Java System Architecture 19.1.3 Java Central Services 19.1.4 Java Parameter Tuning 19.2 Handling Certificates 19.2.1 Certificate Key Storage 19.2.2 Encryption of Message Content on Database Level 19.3 Housekeeping 19.3.1 Archiving 19.3.2 Deletion 19.3.3 Restarting 19.3.4 Recovery 19.4 Monitoring 19.4.1 Runtime Workbench 19.4.2 Wily Enterprise Manager 19.4.3 SAP Management Console 19.4.4 SAP Solution Manager Monitoring 19.4.5 Tracing 19.4.6 JVMMON 19.5 Summary A Orchestration Outlook A.1 SAP API Management A.2 SAP Cloud Platform Integration A.2.1 Features and Facts Overview of SAP Cloud Platform Integration A.2.2 Development Guide: Getting Started A.2.3 Monitoring A.3 The Integration Advisor A.3.1 Interface Specifications: Advice from the Advisor A.3.2 Mapping Guideline A.3.3 Runtime A.3.4 Testing A.4 SAP Cloud Platform Workflow as a Service A.4.1 Workflow Service A.4.2 Workflow Modeling A.4.3 SAP Cloud Platform Business Rules A.4.4 Workflow Tasks Management A.4.5 Integration 官方出品,英文原版,可编辑带导航非影印版(总计1866页)
### 不同操作系统上安装 Node.js 的 canvas 模块 (node-canvas) 在不同的操作系统中,安装 `node-canvas` 需要满足特定的依赖条件以及遵循一定的流程。以下是针对 Windows、macOS 和 Linux 系统的具体说明。 #### 1. **Windows** 对于 Windows 用户来说,安装 `node-canvas` 可能会遇到一些挑战,主要是由于缺少必要的构建工具和运行时依赖项。为了顺利安装该模块,可以按照以下方式准备环境: - 安装 Microsoft Visual Studio 或者至少安装其 C++ 构建工具组件。 - 使用 Python 版本管理器(如 pyenv)来设置支持版本的 Python(通常推荐使用 Python 2.7.x 或更高版本但低于 3.0[^4])。 - 设置全局变量 PATH 中包含 Python 路径以便于编译过程能够找到解释器。 执行如下命令完成安装: ```bash npm install --global windows-build-tools npm install canvas ``` 如果上述方法仍然失败,则考虑采用预编译二进制文件的方式替代源码编译[^2]。 #### 2. **macOS** Mac OS X 上的操作相对简单些,但仍需注意几个前置步骤: - 更新 macOS 自带的 Xcode 命令行工具至最新版。 - 如果尚未安装 Homebrew,请先通过官网链接获取并安装此软件包管理系统;之后利用它来安装 libpng 和 cairo 库作为必要依赖项。 具体指令如下所示: ```bash brew update brew install pkg-config cairo pango libpng jpeg giflib librsvg npm install canvas ``` 以上步骤应该足以让大多数用户的 Mac 设备成功加载 `node-canvas` 插件[^3]。 #### 3. **Linux** 最后来看一下基于 Debian/Ubuntu 类型发行版下的解决方案: - 执行 apt-get upgrade & dist-upgrade 来保证系统处于最新状态。 - 添加额外存储库以访问较新的图形处理程序及其头文件资料集。 - 明确指明所需的各种开发套件名称列表并通过 APT 获取它们。 下面给出了一组典型的APT包名供参考: ```bash sudo apt-get install -y build-essential libcairo2-dev libjpeg-turbo8-dev libpangocairo-1.0-0 \ libgif-dev gobject-introspection gir1.2-rsvg-2.0 python-is-python3 npm install canvas ``` 这样就可以正常引入所需的外部资源从而顺利完成整个构建工作流。 ```javascript const { createCanvas } = require('canvas'); let canvas = createCanvas(200, 200); let ctx = canvas.getContext('2d'); ctx.fillStyle = 'green'; ctx.fillRect(50, 50, 100, 100); console.log(canvas.toDataURL()); ```
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值