Ashsince97
Scholar

Add Button using other programming language.

Hi All,

 

I am new to the field of k2 so please have some patience with me. 

 

My requirement is to add a button on to K2 form and this button is made using other programming language such as .NET  etc.

The purpose of this button is to start scanning of documents and get the resultant documents onto K2 form. 

In short I need to integrate the scanner with K2.

 

I hope my query is clear and kindly do provide help on this requirement.

 

Thanks 

Labels: (1)
0 Kudos
Reply
7 Replies
paulk
Scout

Re: Add Button using other programming language.

You can use the endpoints assembly to call into .NET code - https://help.nintex.com/en-US/k2five/userguide/5.0/default.htm#ServiceBrokers/EndPoints/EndPoints_As... and then just call a SmartObject method from a normal K2 button.

 

But again all of this will be running on the server and not the end users machine.

 

Cheers

Reply
Ashsince97
Scholar

Re: Add Button using other programming language.

Hi,

Thankyou for the help. I have created an application using .NET and it starts scanning and saves the document.
But now the challenge or rather the issue I face is that I am not able to create the Endpoint Assembly SmartObject instance.
"ValidationThe System cannot find the file specified. (Exception from HRESULT: 0x80070002)" - this is I what i get.

If you have a solution for this kindly do provide.

Thank you.
0 Kudos
Reply
paulk
Scout

Re: Add Button using other programming language.

If you have a .NET app then you can start a workflow using C# code on the client side, no need to have an endpoint assembly.

 

https://help.nintex.com/en-US/k2five/devref/5.0/Default.htm#Runtime/WF-Client/Start_Instance.html

 

Cheers

0 Kudos
Reply
Ashsince97
Scholar

Re: Add Button using other programming language.

Hi,

I am sorry now I am confused a bit more.
Please correct me if I am wrong - so now we have to enter the K2 configurations into the .NET code in order to start the workflow instance.

Thanks
0 Kudos
Reply
paulk
Scout

Re: Add Button using other programming language.

If I understand you correctly, you have created a win form app that runs on the users PC?  As this is a different approach you can use a different solution.

 

In this scenario you don't need to use a service broker and can instead reference the K2 client API in your app, passing it the name of the server and the process you want to start. You could store the k2 server name and process name in the app.config and point to your dev / prod server as appropriate.

 

Cheers 

0 Kudos
Reply
Ashsince97
Scholar

Re: Add Button using other programming language.

Hi,
For now yeah, it runs on user's (my pc) pc but later on we have to implement in such a way that users of other department could use it by just a click on the K2 form.
If that's the case then we have to use the service broker right.

Thanks.
0 Kudos
Reply
paulk
Scout

Re: Add Button using other programming language.

The thing is though you won't be able to run that client app on the server so unless the app scans across the network I don't think it'll do what you want.

 

Also if you take a look at the assembly endpoint documentation you'll see that you can only consume static methods in static classes in a dll only so the winform thing cannot be used in that manner.

 

Cheers 

0 Kudos
Reply