HI all

 Another day another service ... not quite what I had imagined, but I hope it helps.

 This service is quite a tricky one.  Basically the idea is to expose all SmartObjects as services. Get it Here

Why:

 

The Reason I wrote this is that with the exception of pure smartbox SmO it is not possible (I am open to correction but the SCUK TS’s could not figure out how) to uses a SmO as an input to another SmO. 

Essentially this gives the ability to create a new Smart Object which can inherit from multiple Smart Objects.  As we all become more excited about k2 connect and once the implementation of multiple k2 connect adapters into multiple systems becomes more and more common place this SmO inheritance can become very powerful as organisations start to create a SmO hierarchy ... this almost sounds like SOA - well the truth is, that it actually is.

 

K2 SmartObject exposed as services to be consumed by other SmartObjects, where the original SmartObject composition has no bearing on the final SmO.  So let’s have a look at what its all about!

 

Once you have installed the Dynamic SmO the SmartObjects are exposed in both the ServiceObject servers and SmartObject Servers dropdowns in the K2 Object browser.

 

As you will see there are quite a few created, you will recognise the inclusion of the process SmartObjects.  I have however excluded the reporting SmO’s (a configuration parameter).

 

One omission I should mention – I completely forgot to implement Parameters – oops, sorry.  The source is available for you to do this, or I will implement it when I have time or desperately need it – whichever comes first.

 

So when would we use it?

 

Here is an example:

 

Using the Utilities functions I have just posted on BlackMarket.  I wanted a Smart Object which returned the value 7 days in the future from today, where day, month and Year are all held in separate strings.

 

A SmO method can now be created with the following steps:

·         Result =  ConcatWithSpace (month, Year)

·         Result =   ConcatWithSpace(Day,Result)

·         ResultDate =  ToDate(Result)

·         DateAdd(ResultDate,Day,7)

 

Ok so admittedly I could have done this with the service that where created without wrapping them as SmartObjects, then exposing the SmO as a service and using that service in a new SmO.  But had I done that I would not be creating a hierarchy of services.  SO WHAT .... So what indeed, it was an example.

 

Here is possibly a better one:

 

SmO 1: An Employee Entity containing:

·         Personal Details (AD)

·         Salary Details (SAP)

·         Personal interests (SmartBox)

SmO 2: An HR Entity containing:

·        Employee Information (Employee Entity)

·        Leave Days (HR LOB System)

·        Disciplinary Action Details (HR LOB System)

 

 SmO 3: An Employee CRM Entity containing:

·        Employee Information (Employee Entity)

·        Client Details (SAP)

·        Client Interests (MS CRM 4)

·        Current Client Projects (MS Project Server)

·        Opportunities (Seibel)

Hopefully this shows slightly better how the Hierarchy of SmO’s might be useful.

 

Have fun