Calling REST Services to create Smartobject to use in K2 Form / Workflow

  • 17 March 2020
  • 5 replies
  • 12 views

I am very new to consuming REST and converting it to Smartobjects, so I can use it in K2 Forms or Workflow

Hence I wanted to know if I am on the correct track, Is this the way to go about Registering the REST service.

 

I am very new to something like this. Am I doing it correctly??

 

13081iBC60639F9BD18D87.png


5 replies

Badge +7

Hello  @Gozni ,


 


K2 allows you to interact with REST endpoints by using the REST SmartObject Broker to expose a particular REST endpoint as a service instance, create SmartObjects that utilize the service objects exposed by the service instance, and then optionally build SmartWizards (K2 blackpearl only) that exposes these SmartObjects as wizards so that workflow designers can easily drag and drop methods from the REST-based SmartObjects into their workflows.


 


You can use SmartObjects to integrate K2 with other systems and technologies. For example, you may want to expose employee data stored in a Microsoft SQL database as a SmartObject, so that employee data can easily be used by designers when they build their forms, Reports and workflows.


 


Please also have a look at the following path: https://community.k2.com/t5/K2-Five/Expose-Smart-Object-method-through-a-REST-API/td-p/108490


 


@KagisoMasha wrote:

Hello  @Gozni ,

 

K2 allows you to interact with REST endpoints by using the REST SmartObject Broker to expose a particular REST endpoint as a service instance, create SmartObjects that utilize the service objects exposed by the service instance, and then optionally build SmartWizards (K2 blackpearl only) that exposes these SmartObjects as wizards so that workflow designers can easily drag and drop methods from the REST-based SmartObjects into their workflows.

 

You can use SmartObjects to integrate K2 with other systems and technologies. For example, you may want to expose employee data stored in a Microsoft SQL database as a SmartObject, so that employee data can easily be used by designers when they build their forms, Reports and workflows.

 

Please also have a look at the following path: https://community.k2.com/t5/K2-Five/Expose-Smart-Object-method-through-a-REST-API/td-p/108490

 


The screenshot I showed is this the correct way to Convert a REST Service to SmartObject?

 

Hi,

I think that where you indicated "URL for Rest" should be the location of your descriptor file.If indeed it is the location then everything should be fine.

Have a look on the following link for a depth explanation on creating Rest service instance and smart object.
https://community.k2.com/t5/How-To-Videos/Create-a-REST-Service-Instance-and-SmartObject/ta-p/105067

?? if it helps

Regards
Huli

@HulisaniN wrote:
Hi,

I think that where you indicated "URL for Rest" should be the location of your descriptor file.If indeed it is the location then everything should be fine.

Have a look on the following link for a depth explanation on creating Rest service instance and smart object.
https://community.k2.com/t5/How-To-Videos/Create-a-REST-Service-Instance-and-SmartObject/ta-p/105067

?? if it helps

Regards
Huli

What if its on a URL, how do I convert it to an SMO, i need a step by step tutorial on how to do that

Hi there  @Gozni 


 


If the location of the descriptor file is on a URL then you provide the URL of that descriptor file and  still follow the same steps provided on video to create the SmartObjects.


 


note  with k2 cloud the location of descriptor file  is URL only.


          with k2 five  the location of descriptor file can be on the local hard drive of server or  aURL


I took a screen shot from the video i gave you previously, In the video they are using a descriptor file that is in a URL location.


 


let me know if this help!


 


Regards


HulisaniN


Reply