JuanAntonio
Apprentice

Import Excel rows to SmartObject

Jump to solution

Good afternoon,

 

Anyone could help me with this issue.

 

I need to import data rows to a SmartObject to start a Workflow with the row data.

 

Each row will be one instance of the Workflow, but i need to assign them to a SmartObject automatically with some function.

 

Thank you

 

Juan Antonio

Reply
7 Replies
K2Expert1
Apprentice

Re: Import Excel rows to SmartObject

Jump to solution
Hi Juan,

I will help you on import smart object . in each row and create instance for each row and store the data in k2 smart object.

Regards,

Arvind kumar
Reply
JohanL
Apprentice

Re: Import Excel rows to SmartObject

Jump to solution

Hi,

 

In the market there is a custom service broker which can be used to import data into a smartobject from an Excel File.

I think it is calle ExcelImportService.

 

You will need to register this service broker and then look at the documentation for the service broker on how to use it.

I've used it before and it works for most data types.

 

Once you have your data imported, you can use the for each rule action in K2 smartforms to start a workflow for each row of data.

 

Hope this helps!

Regards,

JohanL

Reply
Rao
Novice

Re: Import Excel rows to SmartObject

Jump to solution

Hi

 

I have posted a question on this before.

When I was trying to import the Date from Excel to date field in SQL table through the ExcelImportService service broker....all other fields import file except the DATE.

 

Have anyone experienced this before?

 

Thanks

Rao

Reply
Neville1
Novice

Re: Import Excel rows to SmartObject

Jump to solution

Hi All 

 

I have download the ver 1.0.3 . My issue first was that the document attahced to add the smartobject did not want to load the service with the samr objects tester tool. i did further research and foudn another way by doing this by using the way given by another user usign the steps

 

The deployment process of customer service is

 

  1. Stop the K2 service
  2. Open "<K2 Instillation Drive>:Program FilesK2 blackpearlServiceBrokerBrokerManagement.exe".
  3. Click on “Configure Services”
  4. Configure Service Type: Right click on services and select “Register New Service Type” and enter values for service name. Select Assembly path from your local path.
  5. Configure Service Instance: right click on just created Service Type and select “Register New Service Instance” to create New Service Instance.
  6. Service Instance Configuration: Press “Save” Button to continue to next step.( this is the configuration section , where you can change the configuration of service ex: Database connection, SharePoint url , log file path etc…)
  7. Enter service instance details and click “Ok” to create service instance.
  8. Restart the K2 service.

http://community.k2.com/t5/K2-blackpearl/Deployment-of-Custom-SmartObject-Service/td-p/40637 

 

After this was done I was able to continue with the doc on the Excell importer and add the testting smart obect in k2 Designer. Now the problem came that when I wanted to test and execute the smartobject service I got the follwing error as per screenshot below. 

 

4634i53F818E1C46DA0E1.png

 

I then tried to open the sourcecode provided and to rebuild the app in visualstudio after I made changes and got the error each time below. The errors are even with no changes and the solution is rebuild so that the dll file is updted to use in the service broker

 

 Error 1 'SourceCode.SmartObjects.Client.PropertyType' does not contain a definition for 'Date' C:WorkspaceHotel Stay K2Hotel Stay K2HotelStayExcelImportServiceExcelImportServiceDataExcelImportService.cs 301 107 ExcelImportService

Error 2 'SourceCode.SmartObjects.Client.PropertyType' does not contain a definition for 'Time' C:WorkspaceHotel Stay K2Hotel Stay K2HotelStayExcelImportServiceExcelImportServiceDataExcelImportService.cs 306 107 ExcelImportService

 

Can anybody tell em what is wrong 

0 Kudos
Reply
Neville1
Novice

Re: Import Excel rows to SmartObject

Jump to solution

I unblocked both the ddl file and the file to import on their proberties to unblock the file,  i was then abel to reload the service objects in the smartobjects tool as per document on solution.  Now just to test

 

 

0 Kudos
Reply
Neville1
Novice

Re: Import Excel rows to SmartObject

Jump to solution

Hi J

 

I have used the custom service broker and I have it workig now that it imports my data from a excell file to the SmrtObject service into a table in SQL.

My questions is when I Import data rows to a SmartObject to start a Workflow with the row data.

 

Each row will be one instance of the Workflow, but i need to assign them to a SmartObject automatically with some function"

 

As per other comment from JohanL

 

"Once you have your data imported, you can use the for each rule action in K2 smartforms to start a workflow for each row of data."

 

When referign to the each rule action whcih rule is this as I cant seem to see or find it.

0 Kudos
Reply
rest
Novice

Re: Import Excel rows to SmartObject

Jump to solution

Hi ,

 

Excellent solution, how about associated objects, did anyone tried importing it, can give me a example , i'm trying to utilize this import service.Please let me know if any details required

0 Kudos
Reply