Can you declare a class in a script task?

I try but I get errors every time, even with a basic class for testing.

Like 0

Like

4 comments

Dear Jordan,

In order to use your custom class in the business process please do the following:

- Firstly create your class using source code schema in the system configuration. The class is written using C# language, more about creating custom source code schema you can find in the article:

https://academy.bpmonline.com/documents/technic-sdk/7-13/source-code-de…

- Secondly, add your custom class to the Usings of business process and refer to it in the Script Task element of the process. 

http://prntscr.com/m2vboo

Hope you will find it helpful.

Regards,

Anastasia

Anastasia Botezat,

Thanks thats perfect!

Jordan Kincer,

I have a custom package and, in it, a schema with a custom class. What is the naming convention for declaring it in the 'Usings' list of a Business Process?

Jordan Kincer,

There is no difference from which package the class will be. Treat it as a usual using. Please see the example below for adding the Terrasoft.Configuration namespace and indicate the name of your class based on the screenshot,.

 

Regards,

Anastasia

Show all comments