Figaf IRT now supports API management

Over the last couple of weeks, we have been making transports easier for SAP CPI. Now the turn has come to SAP API management. As I understand from APIGEE the normal way is to have a build server that allows you to transport and test scripts. It does require some time and skill in setting up such a server. From the last roadmap session SAP was planing to relase some CTS+ integration in Q3 if I recall correct.

We are using the same approach to document changes of APIProxies. So you can see which Proxy part has been updated, or which script was changed. This makes it a lot easier to document what is going on and why something was changed. You will therefore know what is changed in each release.

We also allows users to make transports based on the business requirements. It is therefore easier to document changes made to the proxy, and link all changes to a business reason.

You can try it out your self at Figaf IRTCloud and see how it performs in your landscape.

With Figaf IRT you have one enviorment that allow you to document all your SAP Integrations in just one application.

We are going to add other functions to monitor your API management, so you can get some more detailed alerts about what is going on in your landscape.

New Monitor for SAP CPI

After working with SAP CPI for some period of time, I did find it a little difficult to monitor the application. So we decided that we could add a better way to monitor the application and include it into the Figaf IRT application. Because the purpose is to make your usage of SAP Integration easier.

We are reusing the tile concept from SAP CPI, that allows you to create different tiles with different concepts. So you in one screen can see multiply overviews of what is happing on your system. We are using the OData monitoring service that allow us to give users access to data. IRT just work as a proxy and perform the query in real time without saving anything to the Figaf IRT application. We also have the other option and it is really useful for triggering alerts or restart messages.


Up can edit the tiles and write what you want to see in it. You do have the option to select multiply iflows in just one screen, different periods and status. Based on the name IRT then creates two roles on that can view the metadata of the message and one that can view the payloads. It mean that you can give access to tiles for business users. So the people from finace will be able to see all tiles related to finance but not monitor HR. Admins can still monitor everything.

Once you open the monitor you then have the option to view multiply rows in and relavant data in the overview screen. This allow you to search a lot easier for messages with some application id or Receiver.
You can also do filtering in the iflow you have access to already. This way users can only see the data they need.

Check out the easy way of monitoring your SAP CPI flow.

I do believe that this will make it a lot easier to monitor your SAP CPI system. And give access to other users to monitor what is going on in your processes.

You can view my video presentation of it here.

You can try it out IRT/Cloud soon. You can signup already now and start using all the other function there to help improve your SAP CPI development flow. There is a free 30 day trial that you can try for your organisation.

A different way to restart SAP CPI content

It is pretty difficult to restart SAP CPI messages from any external applications. There is just two ways that include either the Enterprise Messaging/JMS or the Datastore. Some times this can create some complex scenarios for the user to develop.

We wanted to make some of the development a little easier. It requires just one groovy script and two script steps in your iflow. We will show a different way that allows you to restart messages in an external application and setup rules for how often it can be reprocessed. We leverage that the Figaf IRT application is able to download messages that have a specific filter like Receiver is LOG. Then the message will be downloaded and you can apply some rules to it like it should be reprocessed 3 times. There is also the option to send notifications to emails or systems like Jira.

Check out the video where you can see how simple it is to restart a SAP CPI message.

We currently do not know how this will affect count of connections on your SAP CPI system, so use with caution.

You can try out Figaf IRT on your own system. We have both a cloud and an on-prem version to deploy the application.

You can see the code below, it will be updated so you can find a more uptodate version in the IRT application.

package com.figaf.irt
import com.sap.gateway.ip.core.customdev.util.Message
import org.apache.camel.converter.stream.InputStreamCache
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def Message initalSave(Message message) {
    try {
        //Body
        def body = message.getBody(java.lang.String)
        def base64 = body.bytes.encodeBase64().toString()
        Map map = message.getHeaders()
        map.put("body", base64)
        message.getHeaders()
        def json = JsonOutput.toJson(map)
        def cache = new InputStreamCache(json.bytes)
        // we save the json as a property, so we can restore it in the pipeline
        message.setProperty("IRTSAVE", cache)
    } catch (Exception ex) {
        try {
            def messageLog = messageLogFactory.getMessageLog(message)
            messageLog.setStringProperty("CustomLog", ex.getClass().getName() + ":" + ex.getMessage())
        } catch (Exception ignored) {}
    }
    return message
}
/**
 * An error have occurred then save the payload as an attachement
 * @param message
 * @return
 */
def Message savePayload(Message message) {
    try {
        def messageProperties = message.getProperties()
        def ex = messageProperties.get("CamelExceptionCaught")
        if (ex == null) {
            return message
        }
        def irtpayload = message.getProperty("IRTSAVE")
        JsonSlurper jsonSlurper = new JsonSlurper()
        def map = jsonSlurper.parseText(irtpayload.getText())
        map.put("Cause", ex.getClass().getName() + ":" + ex.getMessage())
        irtpayload = new InputStreamCache(JsonOutput.toJson(map).bytes)
        ByteArrayOutputStream bytesOut = new ByteArrayOutputStream()
        irtpayload.writeTo(bytesOut)
        def messageLog = messageLogFactory.getMessageLog(message)
        messageLog.addAttachmentAsString("IRTSAVE", new String(bytesOut.toByteArray()), "application/json")
        message.setHeader("SAP_Receiver", "LOG")
    } catch (Exception ex) {
        try {
            def messageLog = messageLogFactory.getMessageLog(message)
            messageLog.setStringProperty("CustomLog", ex.getClass().getName() + ":" + ex.getMessage())
        } catch (Exception ignored) {}
    }
    return message
}

Doing SAP CPI Transports with IRT

Once I started to make my first SAP CPI transports I did not like that you needed to transport the full package. I wanted just to transport a single Iflow and log what was changed with it, then I knew what was being changed. But it was a rather difficult process to make sure you did correctly. So I thought we could optimize the process to make it easier to apply transports for single iflows.

So we have created a flow for developers where they will make the normal changes.

  1. Save it as a version in the development CPI system after normal development
  2. Syncronize the IRT with the CPI system (by clicking the button or wait for the scheduled synchronization job)
  3. Create a ticket and assign the object version to the ticket. A ticket can correspond to a Service Request or Incident. It is possible to update the version if you have multiple attempts to fix the problems
  4. From the ticket, you then create transport with one of the Iflow on the systems
  5. IRT can then import that QA/production system. It will delete the existing iflow and upload the new version.

I have recorded a demonstration video you can see how it works

The following are we working on before it will be released.

  • Fix some of the few bugs we have seen in our test environment
  • Have a way to get the configuration in a global table, so once you import an iflow on QA it will apply the configured configuration from IRT
  • Investigate if we can upload the new iflow without removing the old version.

There may also be other ways we can integrate this both with our testing application part and make a flow that better fits with a DevOps focus of development.

We expect this functionality to be released within the next few weeks both in our cloud application as well as the on-prem deployment of IRT.

Want to try it on your own system

Try out IRT

Try IRT Cloud

SAP CPI course

Over the time I have gotten a lot of request for a SAP Cloud Platform Integration / Hana Cloud Integration (SAP CPI/HCI) course. I have always wanted to help solve clients needs but did not have the experience of creating integrations in SAP CPI self. It is first the last half year that I have really been involved in projects and I have learned a lot about how to create integrations. I did struggle a lot of times to understand how I should build my integrations the best way, and what it really is about.

I am happy to announce that I have put a lot of effort and energy in developing a brand new CPI course, which I am sure will be very valuable for you.

My goal

My goal has been to make a course that takes you thru the process of designing iflows without having to do as much research as I had to go thru to understand the basics of
building good integration. In the course, I’ll not go into details about all elements because it is a lot easier to find it directly in the manual.

Why take the SAP CPI Course?

Learning SAP Cloud Platform Integration (CPI aka HCI) can be pretty difficult. I was struggling when creating my first projects with on CPI. It was pretty easy to get started. In the design part, I ran into multiple problems, that I did not understand how to solve. It was all of the challenges the course will cover.

Why Cloud Integration?

Customers are moving to the cloud and also want easy to use the tool in the cloud All the competitors have a cloud product and if SAP customers are moving away from SAP
it is not a good thing. SAP needs to make it easier to integrate all their application, so customers will buy the full intelligent enterprise from SAP and not mix it. Cheap to get started with (Compared to SAP PI)

Modules in the course

In the CPI course I will take you through the following modules:

  • Getting started
  • Building
  • Communication
  • Advanced
  • (Bonus)

All the modules of the CPI course are not yet published. But they will be in a short
while. I also plan to do a Question and Answer-session.

Prize

The prize for the full course will be 147 euro, but if you buy no later than February 15., 2019 you will get a 50 euro discount, so your prize will be only 97 euro.

Do you want to learn more about the SAP CPI course?

If you have any comments or questions regarding the CPI course do not hesitate to contact me.