Hi all,
I'm working on a workflow and this may be trivial, but I'm confused on how to parse two of these types of information.
1. I retrieve the security of a file by performing
Any help and advice would be greatly appreciated!
I'm working on a workflow and this may be trivial, but I'm confused on how to parse two of these types of information.
1. I retrieve the security of a file by performing
Code: Select all
However, when I get this information it comes out looking like this String mySecurityUsers = OKMAuth.getInstance().getGrantedUsers(systemToken, thisPath).toString();
Code: Select all
My question is: is there an easier way to pull out each username and security rights other than parsing the string using a .split() method? I'm currently doing {okmAdmin=15, user1=3}
Code: Select all
2. If I'm retrieving information from a folder input in a workflow form element, what is the best way to retrieve the actual path from that form element. I'm currently doing this with my form List<String> items = Arrays.asList(mySecurityUsers.split("(=)|(\\{)|(,\\s)|(\\})"));
for (int i = 1 ; i < items.size() ; i += 2){
System.out.println(items.get(i) + " gets security " + items.get(i+1));
}
Code: Select all
and then doing this with my workflow <input name="folderName" label="Folder" type="folder">
<validator type="req" />
</input>
Code: Select all
however, there's no good way to get the path that I can see other than doing a .split method as well. I'm sure there must be a more elegant solution for both of these! Object folderVar = executionContext.getContextInstance().getVariable("folderName");
Any help and advice would be greatly appreciated!
Last edited by alexwgordon on Thu Dec 01, 2016 7:22 am, edited 1 time in total.