Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Hi Tiensoon,

I have seen one of your post for fetching the workflow variable and you have mentioned that it can be achieved using Java api and provided the below code snippet,

Code Block
import java.util.*;
import org.joget.workflow.model.service.*;

Collection list = new ArrayList();
WorkflowManager workflowManager = (WorkflowManager) pluginManager.getBean("workflowManager");
String usernames = workflowManager.getProcessVariable(workflowActivity.getProcessId(), "abc"); // get workflow variable value using Java API

String delimeter = "|";
StringTokenizer str = new StringTokenizer(usernames, delimeter);
while(str.hasMoreTokens()){
	String temp = str.nextToken();
	//System.out.println(temp);
	list.add(temp);
}
return list;

In the above code, i have a doubt

  • While creating the WorkflowManager object you mentined like getting the bean from pluginManager, what does this pluginManager refers to and what value do we need to pass to the method? is it another class available in the API?

Please provide me the above clarification asap, so that it would be of very much helpful for completing a POC.