You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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,

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.

  • No labels