Can not create Java action

0
I'm trying to create a Java action to split a string based on the example from this GitHub repository. However, I'm encountering an error where I cannot import the proxy as shown in the image below. How can I resolve these issues and successfully use the Java action?  
asked
1 answers
0

Hi Toan,

 

The code you are using has a dependency with the Community Commons module, available in the Marketplace. Actually, the StringSplit java action is provided in this module already and is ready to use:

image.png

 

So you don't have to write your own Java action, which I would recommend to improve maintainability.

If you really want to solve the errors in the Java code, you should remove any references to community commons (starting with the import) and introduce your own entity to return the list of split items. As this requires hard-coding the entity name and attribute name, it's prone to errors when renaming the entity or attribute. Therefore, I recommend to use the CommunityCommons solution.

 

Good luck!

Johan

 

answered