To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.
How to return an array of strings in a plugin
Hello Community.
Is there a possibility to return the values of String[] array in a Plugin, with the result that all values are displayed together in ProM?
The "problem" is, that the length of the array is not clear from the beginning, but first when the program is executed.
Here is some code for more comprehension
****************
****************
public class Method {
@Plugin(name = "MyPlug", parameterLabels = {}, returnLabels = {"AnyName"},
returnTypes = {String[].class}, userAccessible = true, help = "Method to calc anything..")
@UITopiaVariant(affiliation = "Research Lab of ....", author = "...", email = "")
public static String[] main(PluginContext context) {
return method(input);
}
..
..
private static String[] method(Input input) {..} // this Method creates a String array, where the length depends on the input
************
************
When executing this, Prom creates a String[] Object but no output in the "View".
What configuratoin has to be changed to solve my problem? The output should be something like this.
Value 1: String[0]
Value 2: String[1]
.
.
Value n: String[n]
Thank you in advance!
Michael
Is there a possibility to return the values of String[] array in a Plugin, with the result that all values are displayed together in ProM?
The "problem" is, that the length of the array is not clear from the beginning, but first when the program is executed.
Here is some code for more comprehension
****************
****************
public class Method {
@Plugin(name = "MyPlug", parameterLabels = {}, returnLabels = {"AnyName"},
returnTypes = {String[].class}, userAccessible = true, help = "Method to calc anything..")
@UITopiaVariant(affiliation = "Research Lab of ....", author = "...", email = "")
public static String[] main(PluginContext context) {
return method(input);
}
..
..
private static String[] method(Input input) {..} // this Method creates a String array, where the length depends on the input
************
************
When executing this, Prom creates a String[] Object but no output in the "View".
What configuratoin has to be changed to solve my problem? The output should be something like this.
Value 1: String[0]
Value 2: String[1]
.
.
Value n: String[n]
Thank you in advance!
Michael
Answers
-
Dear Michael,
You can do this by creating a specific visualizer for String[].
There is ongoing work on working with arrays of objects in ProM but this is still in early testing.
Joos Buijs
Senior Data Scientist and process mining expert at APG (Dutch pension fund executor).
Previously Assistant Professor in Process Mining at Eindhoven University of Technology -
Thank you for your fast reply.
I'll try this out.
regards Michael
Howdy, Stranger!
Categories
- 1.6K All Categories
- 45 Announcements / News
- 225 Process Mining
- 6 - BPI Challenge 2020
- 9 - BPI Challenge 2019
- 24 - BPI Challenge 2018
- 27 - BPI Challenge 2017
- 8 - BPI Challenge 2016
- 68 Research
- 1K ProM 6
- 394 - Usage
- 288 - Development
- 9 RapidProM
- 1 - Usage
- 7 - Development
- 54 ProM5
- 19 - Usage
- 187 Event Logs
- 32 - ProMimport
- 75 - XESame