Quantcast
Channel: SCN : Blog List - Process Integration (PI) & SOA Middleware
Viewing all 676 articles
Browse latest View live

Early days of HCI and Solution overview

$
0
0

Introduction


In this document I’m going to discuss overview of HCI [Hana Cloud Integration] and its features, current service offerings etc.

 

          To connect to the cloud based applications standard SAP PI don’t have the required connectors, so to do integration between cloud applications we depended on third-party tools like Dell Atmosphere, IBM’s Cast Iron and Mule soft. Finally SAP Come up with HANA Cloud Integration [HCI] to enable and support the customers to connect On-Demand Applications with On-Premise applications. Hana Cloud Integration is the SAP’s first On-Premise application integration tool hosted in SAP HANA. HCI makes it possible for us to integrate cloud applications and trading partners directly from the web.

 

           Finally SAP Come up with HANA Cloud Integration [HCI] to enable and support the customers to connect On-Demand Applications with On-Premise applications. Hana Cloud Integration is the SAP’s first On-Premise application integration tool hosted in SAP HANA. HCI makes it possible for us to integrate cloud applications and trading partners directly from the web.

 

           HCI [HANA Cloud integration] is an integration platform hosted in SAP HANA Cloud enabling the integration of business processes spanning across cloud and on premise systems. The new architecture and flexible rollout options have been built to achieve cloud-to-cloud and cloud-to-on premise integration.

 

Early days of HCI


           SAP is firmly positioning itself for a complete makeover from a traditional on premise software vendor to a cloud-based software vendor.The company beat its revenue guidance on the back of explosive growth in its cloud business and the continued success of SAP HANA.


           Following the acquisition of Success Factors, Ariba and others, it has become increasingly more evident that SAP’s strategy going forward is to reinvent itself in the Cloud. Nothing illustrates this mission further than the announcement of SAP’s 2014 Earnings more than $1.5 Billion in cloud revenues.

 

           SAP allows businesses to leverage existing investments integrating non-cloud and cloud-enabled solutions onto one common platform by launching its HANA Cloud Platform. HANA Cloud is basically SAP’s in-memory cloud platform, enabling developers to build, extend, and run applications in the cloud. The platform provides a set of application services (or SAP HANA AppServices) namely integration, portal, mobile, analytics and collaboration giving developers the flexibility to build their applications. HANA also provides developers with a database-as-a-service (with SAP HANA DB Services).SAP began integrating Success Factors and SAP Business Suite solutions powered by HANA running in the SAP HANA Enterprise Cloud.

 

What is HCI?

 

           HCI is a platform hosted in SAP HANA cloud.IT facilitates and support end to end process integration across cloud based and on premise applications efficiently and securely. HCI is available since March 2013.HCI is ISO-25001 certified. It helps customers integrate applications between on premise and cloud, as well as cloud to cloud.

test.jpg

          Quickly and seamlessly connect your cloud applications to other SAP and non-SAP enterprise software - without extensive coding - using SAP HANA Cloud Integration. This integration as a service solution from SAP can help you harmonize business processes and data in a secure and reliable environment. Pre-packaged integration content helps us to design the integration flows without the need for custom integration code. It will also reduce the total cost of ownership for developing and maintaining custom integrations. Because the technology operates on SAP HANA Cloud platform there is no need to monitor, Support or upgrade the integration technology. This feature helps us to reduce
the cost of infrastructure and application management.

 

When to use HCI?

 

  • Focus on cloud strategy.
  • Have the need for cloud to cloud integration.
  • Have the leading system(s) within the cloud.
  • Do not have SAP Process Integration or SAP Data Services on-Premise.
  • Do not want to invest into an on-Premise middleware and bear the costs associated with it, such as system set up, maintenance and operations, build up know how etc.
  • Prefer subscription fee based license model.
  • Require fast innovation.

 

HCI Licensing models

SAP HCI is available as IPAAS [integration platform as a service]. It is available for customers and partners in different editions. Customers and partners can subscribe based on their requirements [Bandwidth / connections].

 

test2.png

HCI application edition is available with specific cloud services such as SAP cloud for customer, success factors, ariba,SAP FIN etc.

 

HCI Standard Edition is an entry package,it contains process integration capabilities and allows you to connect to number of systems and use up an amount of bandwidth per month.

HCI professional edition offers more value and is available at little high price. It supports more number of systems connectivity and bandwidth.


Additional la carte option available for extra connections and extra bandwidth [10GB].


Both standard and professional editions can be used for any to any integration.


Hana cloud Platform Edition isavailable with HCP premium and multiapp editions, with restriction “one end of the integration should always be HCP”.


Developer / Partner Edition [Not for productive use]


Special edition for customers and partners, where partners can build integration scenarios with integration content.


Implement new adapters / interfaces and can get it certified from SAP.


Trail Phase edition:


SAP is providing great opportunity to all it's customers and prtners to participate in SAP HCI trail phase [30days].


To get the trail access please send a mail to hci.trial@sap.comwith your details and SAP Service user ID.


HCI Components


HCI has the following components to design / configure and monitor the integration flows.

 

  • Web-UI
  • Eclipse-UI

 

Web- UI

 

Designed for business users

  • Single access point to configure process integration flows and data integration flows.
  • Discover Pre-packaged content.
  • Deploy security artifacts for process integration flows.
  • Run integration scenarios.
  • Download integration flows to eclipse for enhancements.
  • Monitor deployed artifacts [Integration content] and message monitoring.

 

Limitations

 

  • We cannot design [New] or modify existing integration flows.

 

Eclipse-UI

It is developer’s workbench.we can use Eclipse UI for the below tasks

 

  • To configure own integration flows based on the business requirement.
  • To change the mapping.
  • Changes required to the standard content can be done in Eclipse UI.
  • Add/Delete fields to the existing content.
  • Monitor messages and process integration flows through HCI runtime.
  • Simplified BPMN modeling of process integration flows.
  • Enterprise integration patterns.
  • Deploy / undeploy artifacts.
  • Start and stop instances.
  • Import process integration [on-Premise] scenarios.
  • Implement value / XSLT / UDF etc.
  • Message transformations

 

Solution overview

 

  • Customers (and partners) are able to develop, extend,test, deploy and share integration content, based on existing integration connectors. Another feature of HCI is that it will be available during upgrades and that it is scalable if more capacity is required.

 

  • Web based modeling and monitoring.

 

  • Since SAP HCI is offered as a service, the on demand solution provides highest level of security features such as content encryption and signing, certificate based authentication, encrypted data storage, data isolation at runtime as well as persistency.

 

  • SAP HCI provides capabilities such as runtime for processing, data transformation, routing of messages, and diverse connectivity options.

 

  • HCI is automatically upgraded to higher version without interrupting the message processing.

 

  • As user interface to SAP HCI there is a an HTML5-based web UI available to enable browse and discover standard integration content delivered by SAP, and also Eclipse based tools to create and modify integration artifacts, such integration flows, mappings, connectivity and security settings.

 

Referred links

 

http://help.sap.com/cloudintegration

 

http://scn.sap.com/docs/DOC-40396

 

http://scn.sap.com/docs/DOC-49305

 

https://cloudintegration.hana.ondemand.com/#/shell/discover


SAP Hana Cloud Integration[HCI] Features

$
0
0

In this blog I’m going to discuss the features of SAP Hana Cloud Integration [HCI].I tried to list down maximum features and tried to explain.

 

1)  Automatic upgrades

     HCI is automatically upgraded to higher version without interrupting the message processing. Cloud managed service team handles all the operations related the HCI upgrade. Frequency of upgrade is once in a month. All tenant owners of HCI will be notified when upgrade is done.

 

     All tenant owners of HCI will be notified when upgrade is done. Information on the maintenance windows dependson the location of the data center you have chosen and is available in the contracts that you sign when purchasing HANA Cloud Integration.

 

2)  Flexibility

     As long as employees have internet access, they can work from anywhere. This flexibility positively affects knowledge workers' work-life balance and high productivity. Cloud to Cloud Integration,Cloud to On Premise integration

3)  Cost Savings

 

     Lower TCO with an affordable, pay-as-you-go subscription model and minimal up-front investment. With cloud based integration we can save substantial capital costs with zero in-house server storage and application requirements. The lack of on-premises infrastructure also removes their associated operational costs in the form of power, air conditioning and administration costs.

4)  Reliability

 

     With a managed service platform, cloud computing is much more reliable and consistent than in-house IT infrastructure.Your organization can benefit from a massive pool of redundant IT resources, as well as quick failover mechanism - if a server fails, hosted applications and services can easily be transited to any of the available servers.

5)  Disaster recovery

 

     When companies start relying on cloud-based services, they no longer need complex disaster recovery plans.Cloud computing providers take care of the
disaster recovery.

6) Security

 

     Since SAP HCI is offered as a service, the on demand solution provides highest level of security features such as content encryption and signing, certificate based authentication, encrypted data storage, data isolation at runtime as well as persistency.

  • Transport
    level: HTTPS, SFTP, basic authentication, Certificate based client authentication
  • Payload level: Encryption, decryption, signing, Signature verification
  • PKCS#7    //  XML Signature (signing)
  • WS Security (signing) //  PGP
  • Message Digest // Encoding/Decoding
  • Secure key store // Encrypted Data Persistency

 

SAP is maintaining globally distributed data centers with secure landscape and 24/7 support.Redundant data   storage in two datacenter locations.


7) Standard Content

 

  SAP provides a lot of standard content which can be used in order to connect SAP ERP, HCM, SRM, APO and SAP Financial services with On Premise or On Demand solutions. SAP provides pre-packaged integration content with mappings, API and adapter configuration, connectivity.

 

  The packaged Integration Content, upon purchasing, will be available in a customer specific tenant. The benefit allows customers who have concerns on a multi-tenant architecture to operate with separated firewall rules, separated system configuration as well as individual security.


   Customers (and partners) are able to develop, extend, test, deploy and share integration content, based on existing integration connectors.This will leverage the implementation costs and effort of devising a ‘new standard’. It’s more likely that a large enterprise has the need to integrate with different SAP products than a small or midsize enterprise. The small and midsize are often using one (or a few) SAP products.


8)  Fast implementation

 

    With the help of standard content provided by SAP, we can implement the interfaces in less time when compared to standard implementation.Some of the standard content which is delivered by SAP is to integrate success factors, Ariba, SAP Financial services and SAP cloud for customer with on premise systems such as ECC and CRM.


9) Maintenance


    The cloud infrastructure is managed by SAP with fixed pricing for services consumed by each customer. HCI software runs within SAP’s data centers allowing customers to have access by connecting their on premise or cloud systems to HCI. SAP handles all technical aspects,including upgrades.


SAP will take care of the server maintenance – including security updates. Which will help the organizations to freeing up their customers’ time and resources for the maintenance tasks.

 

10) Out of the box integration


    SAP Cloud for Customer to on-premise SAP CRM / SAP ERP Success Factors to SAP HCM or to 3rd party recruiting systems as SHL or People Answers

SAP edocuments to government systems (Peru, Chile) for exchanging B2G e-invoices.


11) Out of the box connectivity


   We have various set of adapters which will allow you to connect SAP HANA Cloud Integration to different kinds of technical communication protocols. The connected customer systems exchange data with each other based on the configured transport protocol.These protocols support different options to protect the exchanged data against unauthorized access. In addition to security at transport level, the content of the exchanged messages can also be protected by means of digital encryption and signature.


Adapters available for connectivity : SOAP, IDOC, Success Factors, OData, HANA, SFTP, HTTP,Mail etc.


12) User-friendly GUI

 

  • Web-based (HTML5)
  • Easy-to-use wizard based
  • Role based (self-service user management)
  • Designers
  • Operators
  • Administrators
  • Graphical tools for design & configuration.
  • Eclipse based model driven approach for configuring integration and data flows.


Web User Interface for configuration, deployment, monitoring of data integration and process integration flows. Web User Interface for design of integration flows with roles for designer, operators, administrators. It will be very easy for the end users to understand the interface functionality.


13) Core Runtime


     Core runtime for processing, transformation, and routing of messages to be exchanged between the involved customer systems.Message processing at runtime is performed by a cluster of virtual machines running on SAP HANA Cloud. Here, the platform ensures that data related to different customers connected to SAP HCI is isolated. This is important when using SAP HCI for business-to-business scenarios.


14) Re-usability


  We can re-use existing on-premise content (service interfaces / message mappings / operation mappings / XSLT based mappings) from an SAP Enterprise Services Repository (EHP 1 for SAP NetWeaver 7.3).

Designing and Configuring Value mapping in SAP HCI

$
0
0

Introduction


A more flexible and"dynamic"way to define a value mapping is to use the standard functionValue mapping (Conversions function group area). Using this standard function, you can refer to value pairs that are defined at a later point in time during configuration. To define the value pairs in eclipse we use value mapping group.

 

The advantages of this approach are that value mappings can be reused within different message mappings and values can be specified later at configuration time.We usevalue mapping to map multiple representations of an object across different applications or companies.There is a slight difference in defining Value mapping definition in SAP HCI and SAP PI [on-Premise].

test.jpg.png

Go to Eclipse main menu File --> New --> Integration project


In the new project Wizard, provide name for value mapping and select project type as “Value mapping” and click on Finish.

test2.png

Value mapping project will be created in the “Project Explorer” with a node type “IFLMAP” as below.

test3.png

Expand the project to check the default objects created under this

test4.png

Modify the value mapping


Open value_mappig.xml under value mapping project.

test5.png

Value mapping.xml --> Right click --> Paste the required xml as per the requirement.

test6.png

We will get the below pop-up window to overwrite --> click Yes.

test7.png

Continue

test8.png

Click ok.


Open  Value_mapping.xml in the editor and choose source tab

test9.png

Enter the group ID, agency, schema and value as shown in the example below, and save the changes.

test10.png

If we need to edit values, we can do it in design tab

test11.png

How to use Value mapping in message mapping?

In the project explorer view à expand the project. Click on “src.main.resources.mapping”à double click the message mapping where you want to use the value
mapping.

test12.png

Message mapping will be open in mapping editor.

test13.png

Click on Definition tab to view the mapping between source and target structures.


In the expression tab page --> select the value mapping which is under standard functions --> Conversions

test14.png

Select value mapping and drop it in expression editor tab.

test15.png

Double click on the value mapping function and provide details for value mapping parameters.

test16.png

Connect the node to the value mapping function as per the requirement and save the changes.


We can check the consistency to validate the value mapping. The inconsistencies can be invalid content [ values for agency – schema pair repeated / incorrect / missing tags] entered in the value_mapping.xml ma There may be chances to check To check the consistency of the value mapping.


Right click on the value mapping project and choose execute checks. We can check the results in console tab as shown below

test17.png

How to change the retention period for performance data displayed in Performance Monitor tool

$
0
0

You may want to keep more data with a longer history of time intervals in the Java Performance Monitoring.

 

For example, you want to keep the daily intervals for 14 days instead of only 7 days. 

 

For PI releases 7.31/7.4, the enhancement was introduced that allows extension of retention period for persisted performance data. You can call the following servlet and set custom value of the retention period using the URL parameter PeriodConfig of PerformanceDataQueryServlet.

 

http://<host>:<port>/mdt/performancedataqueryservlet?PeriodConfig=...

 

The following period types are supported:

 

  • MINUTE: performance data for last 1 hour, aggregated per 15 minutes;
  • HOURLY: performance data for last 24 hours, aggregated per 1 hour;
  • DAILY: performance data for last 7 days, aggregated per 1 day.

 

For example,

 

1) If you'd like to see the performance data per day in the past 14 days in the Performance Monitor tool, you can use the servlet:

 

http://<host>:<port>/mdt/performancedataqueryservlet?PeriodConfig=DAILY=14


(14 = 14*1)

 

2) If you'd like to see the performance data per hour in the past 30 days in the Performance Monitor tool, you can use the servlet:

 

http://<host>:<port>/mdt/performancedataqueryservlet?PeriodConfig=HOURLY=720

 

(720 = 30*24)

 

3) If you'd like to see the performance data in the last 24 hours with 15 minutes interval in the Performance Monitor tool, you can use the servlet:

 

http://<host>:<port>/mdt/performancedataqueryservlet?PeriodConfig=MINUTE=96

 

(96 = 24*4)

 

4) You can also change all interval types with one servlet call and don’t have to call it 3 times:

 

http://<host>:<port>/mdt/performancedataqueryservlet?PeriodConfig=DAILY=14,HOURLY=720,MINUTE=96

 

 

Note: If you call this servlet (HOURLY=720), it means "keep the hourly intervals for 720 hours(30 days)", not "keep 720 hourly intervals". The URL parameter PeriodConfig defines the retention period for performance data displayed in performance monitor tool, not the number of intervals displayed there. An interval only appears if there are actually messages in this interval. For example, if you don't have messages in the night, then some hour intervals might not appear.

 

Note: The new, customized values are persisted to database and survive a system restart and deployment of updates and upgrades.  But if the performance data collection was disabled (parameter profile.performance.runtime of the service "XPI Service: AF Core" as described in note 1636215) and again enabled, then the values are reset to the default (DAILY=7, HOURLY=24, MINUTE=4).

 

Note:  Keeping too many entries can cause the respective database table to grow. So you should always adjust the number of kept entries to the required minimum and consider to export them to a remote database or file. The number of entries/rows in the table can be calculated with the following formula:

 

    Rows = Nr. of Server Nodes * PI Scenarios * (daily + hourly + minute)

 

So if you keep 96 of the 15-minute intervals and 720 of the 1-hour intervals and 14 of the 1-day intervals,  that means 830 entries. This 830 is then multiplied by the number of scenarios and the number of server nodes, for example, if you have 1000 scenarios and 10 server nodes, then you will have 8.3 million entries in the DB table XI_AF_PROF_PERF_AC.

 

************

 

Also you may want to know if parameter profile.performance.cache.cleanup is relevant to the data retained time in performance monitor tool. The answer is no.

 

Some background information:

 

1) Performance Monitor first keeps non-final messages in a memory cache. Those are messages in Delivering, To Be Delivered, System Error and Waiting.

 

If there are too many non-final messages piling-up in the memory (e.g. some PI scenario fails and there are thousands of System Error messages in the system), the so far collected performance data for the non-final messages are swapped-out from the memory cache to the DB table XI_AF_PROF_PERF_CA to prevent unlimited growth of the memory cache and out-of-memory errors.

 

The parameter "profile.performance.cache.cleanup" now controls, after how many days the old data is deleted from the DB table XI_AF_PROF_PERF_CA. Please note that this data is only for the non-final messages, which are not part of what we can see in the Performance Monitor tool.

 

2) If the message goes into a final status (Cancelled or Delivered), they are removed from the memory cache and aggregated into the final data sets. Those Performance Data is summed-up in an aggregated data entry according to the time intervals.

 

Those aggregated data is stored in DB table XI_AF_PROF_PERF_AC (please note that the table name here is different from the previous one) and this is the data we can see in the Performance Monitor tool. How long we keep this aggregated data can be changed with the servlet above.

 

 

Related Content

 

Note 2006366 - Performance Monitor: change number of retained time intervals

 

 

Note 1993988 - Performance Monitor: improvements and fixes for Java PerfMon 2


Note 1790113 - Performance Data: automatic query of data with a servlet

 

External Collection of Message Processing Statistics from Advanced Adapter Engine of PI

HowTo: Configure Communication Channel with SFSF Adapter (with REST Message Protocol) for SAP Process Integration

$
0
0

The SFSF adapter is a part of the Connectivity Add-On 1.0. It facilitates integration between SucessFactors and ERP va SAP Process Integration (PI). As of SP02, the adapter supports REST as a message protocol for communicating with the LMS (Learning Management System) of the SuccessFactors system.

 

This HowTo blog guides you in configuring the communication channel with SFSF adapter and use REST message protocol.

 

Prerequisites

 

  • You have installed the latest version (SP02 or higher) of Connectivity Add-on 1.0. For information on how to install the connectivity add-on, see Connectivity Add-On Installation Guide.
  • You have logged on to the Integration Builder and created a business component with the communication channel.
  • You have created the Integration Flow.


Configuring SFSF Sender Communication Channel

 

 

1. When you launch the Model Configuration editor, the integration flow does not have adapters assigned to the communication channel.

1.png

 

2. You have to assign the SFSF adapter to a channel. Based on your requirement, assign the SFSF adapter to either the Sender Channel or the Receiver Channel. Double-click the channel (highlighted in yellow) in Model Configuration editor. System redirects you to the adapter selection window.

 


Note: Optionally, you can select the channel (highlighted in yellow) and choose the channel tab page (marked in red) to access the adapter selection screen.

 

 

3. In the choose adapter window, select the SFSF adapter by filtering for ‘SFSF’. Choose OK to assign the SFSF adapter to the relevant channel.

3.png

4. In the Message Protocol field, select REST message protocol.

Picture1.png

 

5. Choose the Adapter Specific tab page.

Picture4.png

6. In Login Credentials section, provide values in fields based on description in table.

Picture5.png

FieldDescription
Grant TypeSelect the type of authorization granted by the SuccessFactors system
Authentication URLEnter the URL that you use for authentication with REST web service
Client IDEnter your client ID
Client SecretEnter your client secret
Scope

Combination of user ID, company ID, type of user and

type of resource in the format {"userId":"<User ID>","companyId":"DEFAULT","userType":"<Type of user>","resourceType":"<Type of resource>"}

 

7. If you want to configure proxy settings, select Use HTTP Proxy checkbox.

Picture6.png

Enter the proxy host name, port number, username and password in the respective fields.

 

8. If you want to use SSL certificate, select Specify SSL Server Certificate checkbox.

Picture7.png

 

9. Choose the Processing tab-page.

Picture2.png

10. In Processing Details section, provide values in fields based on description in table.

Picture3.png

FieldDescription
Resource PathEnter the resource path for the entity you are accessing in the LMS system.
OperationSelect the operation that you want to perform on the entity
EntityEnter the entity name on which the operation has to be performed
Maximum number of records per XI messageMaximum number of records that can be packed in one XI message

 

11. If you are configuring the sender channel, specify the poll interval and batch size in Polling Settings section. Poll interval is the interval for scheduling a data polling cycle. For example, if the poll interval is 1 day, 10 hours, a data polling cycle is executed every 1 day, 10 hours or every 34 hours. Batch size is the number of records to be fetched in a single data polling cycle.

Picture8.png

 

12. Save the configuration.

 

Modeling SFSF Operations using HCI Operations Modeler

 

The connectivity add-on uses the HCI’s eclipse based Operations Modeler tool. You use this tool to generate the EDMX file that you need to import to the Enterprise Service Repository (ESR) for mapping operations.

 

Refer the Installation guide for installing the HCI Operation Modeler.

 

Note: Use Kepler or Luna versions of Eclipse to get for the latest updates on HCI Operation Modeler.

 

 

 

Additional References

 

Restricted On-Premise Objects Being Imported in to the Integration Project [HCI]

$
0
0

In this blog I’m going to list down the un-supported objects while importing SAP Net weaver PI objects from Enterprise service repository.

 

This blog is continuation to http://scn.sap.com/community/pi-and-soa-middleware/blog/2015/01/16/blog-10-importing-pi-content-in-integration-flows

In the above blog sujit explained step by step procedure to import the SAP Net weaver PI objects into Hana Cloud integration.

We can import message mapping, operation mapping and WSDL. Please go through below table for un-supported repository objects [Message and operation mapping] to import into integration project.

Capture.JPG

 

References:

SAP HANA Cloud Integration for Processes

 

SAP HANA Cloud Integration – SAP Help Portal Page

 

http://help.sap.com/cloudintegration/SAP_HCI_DevGuide.pdf

 

SAP HANA Cloud Integration (External)

Hana Cloud Integration and SuccessFactors Integration Center

$
0
0

Hana Cloud Integration and SuccessFactors Integration Center

Because Nextmoves, the company I work for, is currently involved in a couple of SuccessFactors implementation projects, my eye was caught by the latest release notes for SuccessFactors. In release 1508 there will be an Integration Center within SuccessFactors. I thought it would be a good idea to see what kind of integration options are available in the SuccessFactors Integration Center and off course I want to share my experience with you.
The description in the release notes is as follows:

Integration Center enables Non-IT users to easily build, deploy and manage outbound file based integrations themselves using a fun and intuitive user interface within SuccessFactors Admin UI.

I am very curious what that fun interface means, let’s see!

Setting up SF IC

First of all, you need to activate the SuccessFactors Integration Center (SF IC) in your provisioning, which is something your SuccessFactors admin can do for you (a link to the official SAP documentation is at the end of this blog). There is no extra license fee for the IC, it comes with the SuccessFactors Foundation module.
After the Integration Center is activated in provisioning you can select it in your admin tools:

The first thing you see on the welcome screen are the tiles with the different options.

* Browse Integration Catalog
* Create a New Integration
* Edit my integrations
* Import an Integration From a File
* Monitor Integrations

I am going to focus on the ‘Create a New Integration’ tile, but I will cover the other tiles briefly.

Browse Integration Catalog

This tile brings you to the overall Cloud Integration catalog. In here you will find pre-packaged integrations for SuccessFactors but also for other applications. When I wrote this blog there were seven SF IC flows available, but I’m guessing this number will grow over time.

 

Create a new Integration

The first thing when creating a new integration is to choose from which entity you want to extract data. When selecting an entity it will show a preview of the fields in the entity. I’m going for the entity 'User’ and choose select.

After selecting the right entity we can see we have to go through six steps to complete our integration. The subjects of the steps and the fields in the first step seem really self-explanatory. 

When you’ve filled in the required fields and choose next it may take some time for the system to gather the information. When the calculation is done, the screen will give you a preview of the data. Here you can edit fields, re-arrange them, remove them and add a lot of filters and sorting options.

On a side note; you can save the integration while configuring it and I suggest you do. It seems that the standard SuccessFactors log-off-when-idle time can interrupt your creation before you finished it.


 

Maybe this looks familiar to you as we discussed this in my second blog: Starting with Hana Cloud Integration? Create a simple integration flow (iFlow)!

Just play around  with these settings and when you’re ready choose next to see a preview of what you created.  If you like what you see in the preview choose next so we can enter the SFTP settings.

The fields in this step are also clear. Enter your SFTP address, enter your credentials and choose a file name and place. This is almost exactly the same as the sFTP adapter option in HCI.

The next step is to schedule. You can choose not to Schedule the integration so you can run it once.

The review and run step is the final step of the process. Here you can check the created integration and run it.

Under the Save button (which I mentioned earlier) there are some more options. You can export the Integration definition as well as the specifications, you can download the preview. One other thing that is worth mentioning is the Audit History Log. Here you can view your previously saved versions of your integration. If you mess up and know that version 4 of the integration was working fine, just go on with that one!

 

 

Edit my integrations

Here you can find previously created integrations and edit them.

Import an Integration From a File

 

Let’s try to import an integration from a file. First we need to go to the catalog and download a integration for SF IC. I filtered on supported platform (SF IC) and went with the Telephone and Location template.

Select the tile and go to the documents tab:

Select the document, choose Download and save it on your disk.

When you saved the integration go to the Import an Integration From a File tile and select your downloaded integration. Choose upload and you will be in the same screen as when we created our own integration. But when you select “preview” you see that the download integration selected a couple of fields, which also contain the location and phone numbers. You can easily add and modify fields, or upload another integration if that suites your needs.

Monitor Integrations

When going into the monitor integrations we see a nice HCI-WEBUI looking monitoring. You can see the jobs that have been triggered from the Integration Center, jobs that you scheduled and jobs that have been triggered from Dell Boomi.

When you click on a process name, for example the one that casued an error, you will get detailed information of the job. If you entered an incorrect sFTP adress you will see the error in there.

For scheduled jobs it is possible to add an email address to receive status updates after the job has finished. In the Schedule tab, when you choose an occurrence other than ‘none’ you get the option to enter an email address.
This is only an information mail, the actual data will be stored on your sFTP server. The title of the mail will be something like:

And that was all. I hope this blog helped you along with the SF IC, if you’ve got any more questions do not hesitate to contact me:

bob@nextmoves.nl
www.nextmoves.nl

 

You can find the official SAP User Guide for Integration Center here.


Blog 1: Starting with Hana Cloud Integration? Keep this in mind!
Blog 2: Starting with Hana Cloud Integration? Create a simple integration flow (iFlow)!

Blog 3: Deep dive in Hana Cloud Integration.

Blog 4: Hana Cloud Integration and SuccessFactors Integration Center



ASUG Integration Technologies and E-Business SIG Webcast Series - 2015

$
0
0

It’s been a while since we had our ASUG webcast series on Process Integration/ Process Orchestration.

 

We are trying to schedule a series of webcasts in the coming months and will keep this blog updated with the session details. Make sure that you bookmark/follow this blog to receive the updates.

 

We invite you to join the ASUG Integration Technologies and E-business (ITEB) SIG for the upcoming Webcast on

 

Topic :  "Connectivity with SAP Process Orchestration".

 

Schedule:


Start      :               September 30, 2015 10:00 AM (CT), 11:00 AM (ET), 9:00 AM (MT), 8:00 AM (PT)

End        :               September 30, 2015 11:00 AM (CT), 12:00 PM (ET), 10:00 AM (MT), 9:00 AM (PT)

               

Registration Link: Click Here

 

About the Session:

Connectivity is a key capability for an integration platform and a must for integrating heterogeneous systems within and outside of a domain. In this session, learn what different integration options are provided with SAP Process Orchestration and its add-ons. It will especially focus on adapters that have recently shipped such as REST and OData

 

Speaker:

Alexander Bundschuh ,SAP


If you are not an ASUG member and would like to attend this session, please directly reach out to ASUG . Contact information is available on the registration page.

 

Note: If you cannot attend the live broadcast, the webcast will be recorded. The link to the recording will be posted on this event page and emailed to all registrants.


+SAP Process Orchestration

+B2B Integration with SAP Process Orchestration


Copy value from Request message to Response message using DynamicConfigurationBean and dynamic header fields

$
0
0

Recently I worked on a scenario with two Idocs that are used as asynchronous request and response messages for ERP and a synchronous webservice.

For this scenario, I used SOAP adapter with async-sync brigde with help of RequestResponseBean and ResponseOnewayBean.

 

I wanted to populate fields in the response Idoc from the request Idoc. Here I had the challenge that the required values were only available in the Idocs, but not part of the request and response message of the web service, so I could not use the option with GetPayloadValueBean and PutPayloadValueBean, as it is described in this blog of Beena Thekdi:

Insert value from Request message to Response message using GetPayloadValueBean and PutPayloadValueBean

 

I wanted to use the dynamical header fields of the PI message to store the vales. Unfortunately, the SOAP adapter removes dynamic header field from request message, so the response message would not be able to access them. So I needed to find a way to keep the values.

 

I found the solution with the DynamicConfigurationBean that allows copying values form dynamical header fields to the module context and back. All adapter modules within the same module chain of the communication channel can access the parameter values in the module context.

 

I have already described this feature in this blog:

Unknown use case of DynamicConfigurationBean: Store file name to JMS header without mapping

 

Now the module chain of my SOAP adapter receiver channel looks like this:

 

ModuleTypeModule Key
AF_Modules/DynamicConfigurationBeanLocal Enterprise BeanDC1
AF_Modules/RequestResponseBeanLocal Enterprise BeanRRB
sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBeanLocal Enterprise BeanSOAP
AF_Modules/DynamicConfigurationBeanLocal Enterprise BeanDC2
AF_Modules/ResponseOnewayBeanLocal Enterprise BeanROB

 

I will not go into the configuration for RequestResponseBean and ResponseOnewayBean, as this is described in other blogs.

 

The module parameters for the DynamicConfigurationBean are following. In my scenario, I used the dynamic value "Value" with namespace "strDocNum".

Those values might not be the best choices, however it works anyway.

 

Module KeyParameter NameParameter Value
DC1key.1write strDocNum Value
DC1value.1module.strDocNum
DC2key.2read strDocNum Value
DC2value.2module.strDocNum

 

For the graphical mapping tool, it is necessary to create user-defined functions to store the values in the dynamical header fields and read them from there. Here are the functions that are used in my scenario:

 

PutDocNum

public String PutDocNum(String docnum, String username, Container container) throws StreamTransformationException{

DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey keySource1 = DynamicConfigurationKey.create("strDocNum","Value");

 

if (conf != null) {

  conf.put(keySource1, docnum);

}

 

return username;

 

Note: as the value DocNum was not part of the target message, the UDF was tied to another target field called username.

 

GetDocNum

public String GetDocNum(Container container) throws StreamTransformationException{

DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

if (conf != null) {

    DynamicConfigurationKey keySource1 = DynamicConfigurationKey.create("strDocNum","Value");

    return conf.get(keySource1);

} else

    return "";

 

 

Here is the link to the online help, the parameter value module.nn is still not mentioned:

Adding DynamicConfigurationBean in the Module Processor

Setup alerts specific to one interface in PI 7.4 Java stack

$
0
0

Recently we have a requirement to setup alerts specific to the interface.

 

There is standard consumer ALERT-TO-MAIL can be used for Alert rule for all interfaces.

 

What we need to do is to register a new consumer for the Specfic Alert rule from web service navigator.

 

Step 1.

 

Create new Alert Rule in Integration Directory, sample Test_Alert. assign Specific configuration Objects here. save and active.

No need to Insert consumer in Extended tab, casue this will be done in Step2.

未命名.jpg

Step 2. Register Consumer, we will use web service navigator to do this

未命名.jpg

You will find Register Consumer operation from Service Interface "AlertRuleIn", chose this and click Next

未命名.jpg

Chose RegisterConsumer operation and click Next

未命名.jpg

Here we need to type parameters:

AlertRuleID:  the one we create from Step 1 in ID

ConsumerName: type any name, here I use test_to_mail.

EnableAlertRules: True

 

Continue by click Next Button

未命名.jpg

 

It will ask user account and Password. the user must have role SAP_XI_ALERTCONFIGURATOR_J2EE

Message shows RegisterConsumer excuted successfully

未命名.jpg

After complete this, you will see your Consumer been assigned to Alert rule

未命名.jpg

 

Step 3, Schedule Job by NWA-->Operations-->Jobs-->Jave scheduler

 

Reference blog from Step 3

Michal's PI tips: Component-Based Message Alerting

IFG for Integration: SAP PO and SAP AIF - how do they work together ?

$
0
0

International Focus Group for Integration(IFG for Integration) has several objectives and one of them is to educate SAP customers about different integration related products from SAP. In this video blog from IFG for Integration, you will learn how the two most common integration products: SAP Process Orchestration (SAP PO) and SAP Application and Interface Framework (SAP AIF) can work together in any SAP landscape in order to make the best use of each of them.


 

 

 

If you'd like to have more information on any of those two products or any other integration technologies from SAP please include it in the blog's comment section. 

SAP PI ABAP Proxy to JDBC Synchronous Interface Part I

$
0
0

I search for a lot of document for  ABAP Proxy and JDBC, some of them are implement in an older SAP system, and others are not detail enough.So I want to write a step by step guide to record the procedure I implement such a interface, hope it can help others who are interesting in ABAP Proxy or JDBC.

The content is:

1.    Deploy JDBC Driver

1.1    Download SAPXI3RDPARTY

1.2    Download JDBC Driver

1.3    Prepare com.sap.aii.adapter.lib.sda

1.4    Using SUM to deploy the sda file

2.    Configure ESR

2.1    Create Data Type

2.2    Create Message Type

2.3    Create Service Interface

2.4    Create Message Mapping

2.5    Create Operation Mapping

3.    Generate ABAP Proxy Consumer

3.1    Configure RFC destination to ESR

3.2    Generate Consumer

4.    Configure Integration Runtime

4.1    SLD Connection from ABAP to AEX SLD

4.2    RFC Destination to PI SOAP Adapter

4.3    Integration Engine Configuration

4.4    Register the jobs to auto execute queues

4.5    Activate the XI engine service

5.    Configure ID

5.1    Configure Scenario via wizard

5.2    Configure the SOAP adapter

5.3    Configure the JDBC adapter

6.    Test

7.    Reference

 

Now let's begin.

1. Deploy JDBC Driver

1.1 Download SAPXI3RDPARTY

My Company's Application Components" My Company's Software" SAP NETWEAVER" SAP NETWEAVER 7.4" Entry by Component" Process Integration

1.png

2.png

 

1.2 Download JDBC Driver

According to different database, I need deploy different JDBC Driver. The database in this demo is MSSQL Server 2012, so download the microsoft JDBC Driver 4.0.

http://www.microsoft.com/en-in/download/details.aspx?id=11774

3.png

4.png

 

1.3 Prepare com.sap.aii.adapter.lib.sda

Unzip the file com.sap.aii.adapter.lib.sda from SAPXI3RDPARTY

5.png

 

Unzip the JDBC Driver 4.0

6.png

 

Open the file com.sap.aii.adapter.lib.sda with compression tool, add the file “sqljdbc4.jar” to lib

7.png

 

Decompression the file server\provide.xml,

Add new line contain the JDBC Driver jar,

8.png

replace into the file com.sap.aii.adapter.lib.sda

9.png

 

If you want to deploy the sda file another time, you need to change the component version to higher by modify the files MANIFEST.MF and SAP_MANIFEST.MF:

10.png

11.png

12.png

 

 

 

1.4 Using SUM to deploy the sda file

Copy the sda file to PI server:

13.png

Download and decompression the SUM(SAP Update Management):

14.png

 

 

Execute the STARTUP.BAT with user <sid>adm:

15.png

16.png

 

Open the url http://host:4239/

17.png

Run the sdtdsu.jnlp

18.png

19.png

20.png

21.png

 

 

 

Specify the folder caontain the sda file.

22.png

23.png

24.png

 

 

The target version is I maitain above.

Click “continue” always

25.png

  1. Completed.

 

Check the deploy library in following folder:

D:\usr\sap\PIQ\DVEBMGS00\j2ee\cluster\bin\ext\com.sap.aii.adapter.lib\lib

 

26.png

SAP PI ABAP Proxy to JDBC Synchronous Interface Part II

$
0
0

This part I will show that how to configure PI ESR and generate ABAP proxy consumer in ABAP system.

 

2. Configure ESR

2.1 Create Data Type

Request data type in ERP side:

27.png

 

Response data type in ERP side:

  28.png

 

Request data type in 3rd Party

  29.png

The JDBC XML format can be found in SAP help in the 5 part Reference

In this scenario I want to use JDBC Adapter to execute a store procedure, so should use the XLM format as below:

Format of EXECUTE Statement

<StatementName>     <storedProcedureName action=" EXECUTE">          <table>realStoredProcedureeName</table>          <param1 [isInput="true"][isOutput=true]type=SQLDatatype>val1</param1>     </storedProcedureName ></StatementName>

 

PS: <table> element is optional, I leave out in the data type.

Element name ”SP_GET_SUPERIOR_APPROVER” is the store procedure name.

 

Reponse data type in the 3rd party side:

  30.png

 

PS: The element name “Procedure_response” is required according to element name “Procedure” in request data type;

I don’t find the explain for “reponse_1” and “row” in SAP help, but they could be found in PI message monitor.

 

2.2 Create Message Type

Request message type in ERP side:

  31.png

 

Reponse message type in ERP side:

  32.png

 

Request message type in 3rd party side:

  33.png

Response message type in 3rd party side:

  34.png

 

PS: The response message type name must be “<reqmt>_response”, <reqmt> is the request message type name.

 

2.3 Create Service Interface

Service interface in ERP side:

  35.png

Outbound and Synchronous.

Service interface in 3rd party side:

  36.png

 

2.4 Create Message Mapping

Request message mapping:

  37.png

From ERP request message type to 3rd request message type

  38.png

The value for action should be “EXECUTE” for store procedure.

  39.png

 

Response message mapping:

  40.png

 

2.5 Create Operation Mapping

  41.png

42.png

 

3. Generate ABAP Proxy Consumer

3.1 Configure RFC destination to ESR

Tcode: SM59

The RFC destination name must be: “SAP_PROXY_ESR”

  43.png

Input the PI server host and port in “Target Host” and “Service No.”, the “Path Prefix” must be “/rep”.

  44.png

 

3.2 Generate Consumer

Tcode: SPROXY

  45.png

Double click the Service Consumers(Service Interface in PI) “SI_A2J”

  46.png

47.png

  Activate!

 

 

 

 

SAP PI ABAP Proxy to JDBC Synchronous Interface Part III

$
0
0

In this part I will show that how to configure integration runtion for abap proxy and PI ID.

 

4. Configure Integration Runtime

4.1 SLD Connection from ABAP to AEX SLD

Tcode: SLDAPICUST

48.png

 

  49.png

 

Tcode: SLDCHECK

  50.png

 

4.2 RFC Destination to PI SOAP Adapter

Tcode: SM59

Create the destination to PI SOAP XI Adapter

  51.png

Because I want to use “XI Message Protocol” in SOAP Adapter, so the “Path Prefix” is :

/XISOAPAdapter/MessageServlet?ximessage=true

If you use XI Adapter, the “Path Prefix” should be:

/sap/xi/engine?type=entry

  52.png

Maintain the PI user info.

 

4.3 Integration Engine Configuration

Tcode: SXMB_ADM

  53.png

  54.png

  55.png

The value of “IS_URL” the “dest://<RFC_NAME>”, and <RFC_NAME> is maintain above.

 

4.4 Register the jobs to auto execute queues

  56.png

  57.png

 

4.5 Activate the XI engine service

Comment: This step is no need for proxy consumer, but required to use proxy provider.

Tcode: SICF

  58.png

  59.png

  60.png

  61.png

 

 

5. Configure ID

5.1 Configure Scenario via wizard

  62.png

  63.png

  64.png

Choose the Service Interface in ERP side and SOAP Adapter.

  65.png

Choose the Service Interface in 3rd side and JDBC Adapter

  66.png

Enter the CC name

  67.png

  68.png

Specify the Operation Mapping

  69.png

Enter the Receiver CC name

  70.png

Enter the scenario name

 

5.2 Configure the SOAP adapter

  71.png

Apater type is “SOAP”, and Message Protocol is “XI 3.0”.

 

5.3 Configure the JDBC adapter

  72.png

The value of “JDBC Driver” and “Connection” can be found in the JDBC Driver help:

  73.png

 

At last activate all the objects configured above!

 

SAP PI ABAP Proxy to JDBC Synchronous Interface Part IV

$
0
0

At the last part I will show that how to test this interface.

 

6. Test

We can test the abap proxy consumer in “SPROXY”

74.png

   75.png

 

  76.png

  77.png

 

Or write some abap code to test the ABAP proxy consumer:

 

  data: lo_proxy type ref to zco_si_a2j.
 data: ls_outut type zmt_a2j_req,
 ls_input type zmt_a2j_res.
 data: wa_results type zdt_a2j_res_results.
 constants l_times type i value 10.
 create object lo_proxy.
 parameters p_empc type string DEFAULT '0010009151'.
 try.      ls_outut-mt_a2j_req-emp_code = p_empc.      call method lo_proxy->si_a2j      exporting           output = ls_outut      importing           input  = ls_input.      commit work.      write: / 'Success!'.      loop at ls_input-mt_a2j_res-results into wa_results.           write: / 'structurecode:', wa_results-scode.           write: / 'empcode:', wa_results-empcode.           write: / 'c_name:', wa_results-name.           write: / 'parentid:', wa_results-pid.           write: / 'superempcode:', wa_results-superempc.           write: / 'defaultposition:', wa_results-defposit.           write: / 'approve:', wa_results-approve.      endloop.      catch cx_ai_system_fault .      data fault type ref to cx_ai_system_fault.      create object fault.      write :/ fault->errortext.
 endtry.

7. Reference

JDBC Receiver scenarios best practices - Stored procedure design-Part4

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/09/07/jdbc-receiver-scenarios-best-practices--stored-procedure-design-part4

 

JDBC Stored Procedures

http://scn.sap.com/people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures

 

Defining XML Documents for Message Protocol XML SQL Format

http://help.sap.com/saphelp_nw74/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

 

Defining an EXECUTE Statement

http://help.sap.com/saphelp_nw74/helpdata/en/44/7b72b2fde93673e10000000a114a6b/content.htm

 

JDBC Receiver Adapter -- Synchronous Select – Step by Step

http://scn.sap.com/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-step-by-step

 

JDBC receiver adapter - stored procedure response

https://scn.sap.com/thread/2015436

 

Please contact me if there are some mistake in the documents or doubt.

Sorry for my poor Englist.


BPM to Mail Interface testing

$
0
0

Hi Experts,

 

We have one interface BPM to Mail which is developed on XI3.0 ,10 years back, i have CR i need to replace one mail ID to another Mail ID i replaced it. now i need to test whether is it working or not.BPM is a intermediate step how can i test this interface whether it is working or not.

Can you please help out this.

 

Regards,

Gopi.

Create email with body and attachments for binary payload with Java mapping

$
0
0

Some years ago I wrote a blog about emails with body and attachment with help of the MailPackage structure:

XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping

 

In this blog I will present another solution which does not use MailPackage and I show also how to add binary payloads to an email.

 

Meanwhile there are many blogs available that show the use of the mail adapter and module configuration. However, using a Java mapping to create the whole MIME stream is the most flexible way to create a mail exactly in the way that it should look like.

 

The following code should show the basics of the MIME creation, feel free to use and enhance it to your needs:

 

Java Mapping to create MIME parts of an email

package sample;

 

import java.io.IOException;

import java.io.InputStream;

import java.io.OutputStream;

 

import javax.xml.bind.DatatypeConverter;

 

import com.sap.aii.mapping.api.AbstractTransformation;

import com.sap.aii.mapping.api.StreamTransformationException;

import com.sap.aii.mapping.api.TransformationInput;

import com.sap.aii.mapping.api.TransformationOutput;

 

 

public class MyBinaryMessageAsAttachment extends AbstractTransformation {

 

  String attachmentName = "file.pdf";

  String boundary = "--AaZz";

  String mailContent = "This is a sample file";

  String CRLF = "\r\n";

 

  public void transform(TransformationInput arg0, TransformationOutput arg1)  throws StreamTransformationException {

 

    InputStream in = arg0.getInputPayload().getInputStream();

    OutputStream out = arg1.getOutputPayload().getOutputStream();

 

 

    try {

      // create the declaration of the MIME parts

      //First part

      String output = "--" + boundary + CRLF

        + "Content-Type: text/plain; charset=UTF-8" + CRLF

        + "Content-Disposition: inline" + CRLF + CRLF

        + mailContent // this should be some more useful text

        + CRLF + CRLF

 

      //Second part

        + "--" + boundary + CRLF

        + "Content-Transfer-Encoding: base64" + CRLF

        + "Content-Type: application/pdf; name=" + attachmentName + CRLF

        + "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;

      out.write(output.getBytes());

 

      // convert InputStream to Byte array

      byte[] input = new byte[in.available()];

      in.read(input);

 

      // convert payload to base64

      output = DatatypeConverter.printBase64Binary(input);

 

      // split lines after 76 rows

      output = addLinefeeds(output);

      out.write(output.getBytes());

 

      // last boundary

      output = CRLF + CRLF +"--" + boundary + "--" + CRLF;

      out.write(output.getBytes());

    } catch (IOException e) {

      throw new StreamTransformationException(e.getMessage());

    }

  }

 

  public String addLinefeeds(String str) {

 

    StringBuffer result = new StringBuffer(str);

    int n = 76; // split by 76 characters (maximum of numbers in lines)

    int l = str.length();

    int i = n;

    while (l > n) {

      result.insert(i, CRLF);

      i = i + n + 2;

      l = l - n;

    }

    return result.toString();

  }

}

 

The Java Mapping will create two MIME parts. The first part is plain text, the second part is a binary, therefore we encode it to base64 and divide it into lines with 76 rows (which is the allowed maximum according to MIME protocol). The result will look like this:

 

Sample output of Java mapping

----AaZz

Content-Type: text/plain; charset=UTF-8

Content-Disposition: inline

 

 

This is a sample file

 

 

----AaZz

Content-Transfer-Encoding: base64

Content-Type: application/pdf; name=file.pdf

Content-Disposition: attachment; filename=file.pdf

 

 

PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGNmZGk6Q29tcHJvYmFudGUg

cnRlPSIxNjA4Ni4xMyI+PC9jZmRpOlRyYXNsYWRvPjwvY2ZkaTpUcmFzbGFkb3M+PC9jZmRpOklt

cHVlc3Rvcz48Y2ZkaTpDb21wbGVtZW50bz48L2NmZGk6Q29tcGxlbWVudG8+PC9jZmRpOkNvbXBy

b2JhbnRlPg==

 

 

----AaZz--

 

This scenario requires special settings of the Mail adapter channel.

First of all, It is very important that the mail attribute Use Mail Package is not checked,Content Encoding is set to None and Keep Attachments is not checked.


Furthermore, we need to set a special Content-Type multipart/mixed; boundary="--AaZz"

The boundary declaration in the Content-Type must be identical with the boundary used in the Java mapping, otherwise the mail will just be the whole MIME stream as plain text.


We set the Content-Type with the MessageTransformBean in the Processing Sequence under tab Module like this:


 

ModuleTypeModule Key
AF_Modules/MessageTransformBeanLocal Enterprise BeanContentType
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBeanLocal Enterprise Beanmail


 

Module KeyParameter NameParameter Value
ContentTypeTransform.ContentTypemultipart/mixed; boundary="--AaZz"

 

If you want to know, how the MIME parameters Content-Type and Content-Transfer-Encoding work, and what other parameters can be used, then you can look in RFC 1341 about MIME (Multipurpose Internet Mail Extensions): http://www.w3.org/Protocols/rfc1341/0_TableOfContents.html

Signing the request message using Certificates and Encoding the message using Base64 - Bouncy Castle API Format

$
0
0

All of you, once in your PI career would have worked on the integration with Bank scenarios. I have worked on 3 scenarios in a career of 3 years and trust me Bank guys are very stubborn and expecting an slightest of change also from them is like asking someone to lend 1 million dollars

 

Intention of writing this blog post is to help those people who are looking for a signing method which can be done in mapping and who specifically look for CMS standards and here i am signing the message using Bouncy Castle API

 

There are many other standard methods available for signing the request message like the below ones -

 

1. PGP Encryption method, where you can turn off the Encryption part and just sign the message using your private key and the same message can be verified at the receiver end using the Public key. You can find below the blog from Shabarish Vijaya kumar and William Li for the detailed steps to perform PGP signing.

 

PGPEncryption Module: A Simple How to Guide

 

Using PGP in Process Integration

 

2. Signing using WSSE - This is the standard Web service security provided in SOAP receiver channel to sign the message. Even in this method we can either go for only signing or only encryption or both signing and encryption. The detailed steps have been listed out very nicely by Rajendra in the below blog. You can refer it if you are looking for this method of signing.

 

http://people/rajendra.badi/blog/2011/08/24/configuring-wsse-digital-signing-and-encryption-using-sap-pi-711-aae-soap-ad…

 

In my case, i tried all the above mentioned methods and they were working perfectly and without any issue. But the issue came up when Bank came up into the picture, they started rejecting the above methods for the reason they don't use web-service at their end and they do not expect SOAP envelope in the message. Signing using WSSE works only with SOAP envelope. Hence 2nd method was rejected. For the 1st method, i used ASCII armored keys (.asc) and Bank told we want you to sign only using a private key and we can verify it only using your public i.e, your X509 certificates.

 

Hence, i came up with the Idea of writing a Java code for the Signing and additional part was to encode the signing using Base64 encoding.

 

Here you can find the complete code of signing your request message using Bouncy Castle API. Please note i have used Private key (.pfx or .p12) of the SAP PI system to sign the message.

 

And i am not so great at Java, so please excuse me for redundancy or irregular method declaration or unnecessary import of libraries Trust me this is a very simple code because an amateur like me in Java could write this code

 

 

Java code for Signing and encoding of PI message payload

package com.javamapping.signing;

 

 

 

import java.io.File;

import java.io.FileInputStream;

import java.io.InputStream;

import java.security.KeyStore;

import java.security.PrivateKey;

import java.security.Security;

import java.security.cert.CertStore;

import java.security.cert.CollectionCertStoreParameters;

import java.security.cert.X509Certificate;

import java.util.ArrayList;

import java.util.Enumeration;

 

 

import org.apache.commons.codec.binary.Base64;

import org.bouncycastle.cms.CMSProcessableByteArray;

import org.bouncycastle.cms.CMSSignedData;

import org.bouncycastle.cms.CMSSignedDataGenerator;

import org.bouncycastle.jce.provider.BouncyCastleProvider;

 

 

import com.sap.aii.mapping.api.AbstractTransformation;

import com.sap.aii.mapping.api.StreamTransformationException;

import com.sap.aii.mapping.api.TransformationInput;

import com.sap.aii.mapping.api.TransformationOutput;

import com.sap.aii.utilxi.core.io.IOUtil;

 

 

 

 

public class SigningBouncyCastle extends AbstractTransformation {

 

  public void transform(TransformationInput input, TransformationOutput output)

  throws StreamTransformationException {

  String finalString = "";

  String pass = "";

 

  try {

 

 

  InputStream ins = input.getInputPayload().getInputStream();

 

 

 

 

  String input_data = IOUtil.copyToString(ins, "UTF-8");

  finalString = signRequest(input_data, pass);

 

 

  output.getOutputPayload().getOutputStream().write(

  finalString.getBytes());

 

  } catch (Exception ie) {

  // do nothing

  }

  }

 

  private String signRequest(String strPaymentRequest, String strPassword) {

 

 

  X509Certificate cert = null;

  PrivateKey priv = null;

 

  try {

  // Below we are using BouncyCastle classes to sign the Request Message.

  Security.addProvider(new BouncyCastleProvider());

 

 

 

  String pass = "Your Private Key Password";

  File file = new File("Path of the SAP Application where Private key is stored");

       InputStream stream = new FileInputStream(file);

       KeyStore store = KeyStore.getInstance("PKCS12");

       store.load(stream, pass.toCharArray());

       PrivateKey key = (PrivateKey)store.getKey("Your Private Key File name", pass.toCharArray());

 

 

 

  Enumeration e = store.aliases();

  String name = "";

 

 

  if (e != null) {

  while (e.hasMoreElements()) {

  String n = (String) e.nextElement();

  if (store.isKeyEntry(n)) {

  name = n;

  }

  }

  }

 

 

  // Get the private key and the certificate

  priv = key;

  cert = (X509Certificate) store.getCertificate(name);

 

 

  java.security.cert.Certificate[] certChain = store.getCertificateChain(name);

 

 

  ArrayList certList = new ArrayList();

  CertStore certs = null;

  for (int i = 0; i < certChain.length; i++)

  certList.add(certChain[i]);

  certs = CertStore.getInstance("Collection",new CollectionCertStoreParameters(certList), "BC");

 

 

  // Encrypt data

  CMSSignedDataGenerator sgen = new CMSSignedDataGenerator();

 

 

  // What digest algorithm i must use? SHA1? MD5? RSA?...

  // In our case we are using SHA1 algorithm

  // CMSSignedDataGenerator.DIGEST_SHA1 = "1.3.14.3.2.26"

  sgen.addSigner(priv, (X509Certificate) cert,CMSSignedDataGenerator.DIGEST_SHA1);

 

 

  sgen.addCertificatesAndCRLs(certs);

 

 

  // Convert the message to UTF8 encoding

 

 

  byte[] utf8 = strPaymentRequest.getBytes("UTF-8");

 

 

  // Initialize signer object using UTF8 encoded string, detached =

  // true, and //Bouncy Castle provider (BC).

  // The 2nd parameter need to be true (detached form) we need to

  // attach //original message to signed message

  CMSSignedData csd = sgen.generate(new CMSProcessableByteArray(utf8), true, "BC");

  // Get signed message

  byte[] signedData = csd.getEncoded();

  // Get base 64 representation of signed message

  byte[] signedDataB64 = Base64.encodeBase64(signedData);

  String str = new String(signedDataB64);

  //output.getOutputPayload().getOutputStream().write(str.getBytes());

  // Write Base64 encoded message to file - If needed

  // FileWriter fw = new FileWriter("Base64Encoded.txt", false);

  // fw.write(signedDataB64);

  // fw.flush();

  // fw.close();

  // FileOutputStream out = new FileOutputStream("Signed.txt");

  // out.write(signedData);

  // out.close();

 

 

  return str;

  } catch (Exception ex) {

  System.out.println("Error signing payment request. Please verify the certificate.");

  ex.printStackTrace();

  return "";

  }

 

  }

}

 

You can also test the above code by writing simple few lines in your Main class -

 

Main Class

public static void main(String[] args) throws FileNotFoundException {

  

     try {

       InputStream in = new FileInputStream(new File("Your Input File Path")); //Make Sure this is the Workspace path where your Java code is running.

  

  

       OutputStream out = new FileOutputStream(new File("Your Output File Path"));

 

       SigningBouncyCastle bouncyCastle = new SigningBouncyCastle();

  

  

       bouncyCastle.transform(in, out);

     } catch (Exception e) {

       e.printStackTrace();

     }

   }

 

Once you are done with the testing. Successfully build your Java code and export the java code as JAR file and import it as Imported Archive and use it in your Operation Mapping.

 

 

One more point where i faced difficulty was in searching for the right jar files. Getting the matching JDK versions JAR file was an uphill task. I have attached all the Jar files used in this Java Mapping to make it easy for you. Please note the JAR files attached are for JDK version 1.6.

 

 

This is my first blog on Java Mapping, i would like to know the feedback from all the SCN members out there..

Import integration content from SAP HCI Web-UI to Eclipse

$
0
0

In this blog I’m going to discuss how to download the Artifacts from SAP HCI web-UI and import into Eclipse [Developer workbench].

 

Introduction


We may get requirements to customize the existing integration content to meet the business needs. In those cases we cannot directly customize the objects in SAP HCI Web-UI,we use Eclipse UI [Developer workbench] to customize the integration content.

 

SAP HANA Cloud Integration web tool provides you a web based interface for accessing and managing integrationsc onfigured in HCI. You can access and use the prepackaged integration content from the catalogue or import them to the workspace from the system you are accessing HCI. You can use the artifacts available in integration packages to achieve the integration scenario. Optionally, you can also import integration package from your local folder and use them.

 

Integration flow, one of the artifacts in integration packages, are used to achieve the integration scenarios along with other artifacts like value mappings, data flows, files and URLs. You can use the integration flows available in packages by configuring and deploying them. You can also edit the integration flows by adding or removing elements, before you configure and deploy them.

 

To customize the integration content objects we should download the integration content locally and import it into Eclipse workspace.

 

Configuration

 

  1. Access the Web-UI URL which is assigned to your organization.test.png

2)  Click on Catalog

test2.png

3) Select the required package from the available on your tenant by using Discover option.

test3.png

4)  In this example I have choose the package “eDocument: Electronic invoicing for Chile”

test4.png

5) Click on the package it will gives the brief description of the package as below

test5.png

 

It will show the list of available artifacts under this package.

test6.png

6)  Click on the button under Actions to download the artifact to your local system.

test7.png

7) Zip file will be created in our local system.

test8.png

 

8) Extract the Zip file.

 

HCI Configuration to Import the artifacts into Eclipse

 

Open integration designer perspective

 

1) Go to Menu --> File --> import

test9.png

 

2) Select the option general --> Existing projects into workspace --> Next

 

test10.png

Browse for the directory where you extracted the zip files.

test11.png

Now the artifacts imported into eclipse workspace succesfully.

test12.png

Reference:

 

https://proddps.hana.ondemand.com/dps/d/preview/93810d568bee49c6b3d7b5065a30b0ff/2015.06_CORR/en-US/frameset.html?2fb0aa4dc5194b589adcd1c5534901e3.html

 

https://help.sap.com/cloudintegration

Dynamic File Name in Multimapping - Standard Solution

$
0
0

Fellow SCNers,

 

All of us at one point of time in our career as SAP PO consultants would have have faced a requirement needing multimapping and to go with it a need for dynamic file name after multimapping. And at the same time, we would have realized that we cannot assign ASMA using a UDF in case of multimapping.

 

This blog does not intend to showcase any hidden functionality which makes it possible as it is still not possible to do a 1:N multimapping without using custom solutions. One such solution has been brilliantly showcased by my friend Praveen Gujjeti in A new approach: Multi-mapping Dynamic Configuration using a generic custom module

 

However, it is possible to do multimapping and Dynamic Configuration in cases of 1:N multimapping if the value of N is known and fixed. I have achieved this to Dynamically assign ASMA values to child messages in case of a 1:5 split.

 

I would like to mention our colleague and guru Stefan Grube whose blog Unknown use case of DynamicConfigurationBean: Store file name to JMS header without mapping showed me the light for the approach.

 

Solution:

 

In your multimapping program, insert a UDF having the below code snippet. Please note that the you can increase the number of DynamicConfigurationKey objects based on the number of messages you have in your target.

 

public String putFileName(String inputFileName1, String inputFileName2, String inputFileName3, String inputFileName4, String inputFileName5, Container container) throws StreamTransformationException{

try {

  DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

  DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Test","Message1");

  DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Test","Message2");

  DynamicConfigurationKey key3 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Test","Message3");

  DynamicConfigurationKey key4 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Test","Message4");

  DynamicConfigurationKey key5 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Test","Message5");

  conf.put(key1,inputFileName1);

  conf.put(key2,inputFileName2);

  conf.put(key3,inputFileName3);

  conf.put(key4,inputFileName4);

  conf.put(key5,inputFileName5);

  return "";

}

catch(Exception e){

return "Could not write filename";

}

 

And then, in your receiver communication channels(Assuming you will have different communication channels to process each of the split messages) you need to maintain the below entries in the module tab.

 

ModuleList.JPG

 

With the below settings in Module Configuration.

 

ModuleConfig.JPG

And that's it!!! The above example pick the value assigned to Dynamic Configuration Key Message3 from mapping to DCJMSMessageProperty0 attribute of the JMS adapter. Similar thing can be done for the attributes of File adapter to dynamically name the files at receiver end.

Viewing all 676 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>