Versions Compared

Key

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

...

I tried fetching the Participant Name and Process Id/Def Id from the Participant plugin's getActivityAssignments method with the below logic but Im not able to fetch the details rather its returning Null all the time,

public Collection<String> getActivityAssignments(Map properties) {
    try{
 PluginManager pluginManager = (PluginManager) properties.get("pluginManager");  
 WorkflowAssignment wfAssignment = (WorkflowAssignment) properties.get("workflowAssignment");
 WorkflowManager workflowManager = (WorkflowManager) pluginManager.getBean("workflowManager");
 String psDefId = wfAssignment.getProcessDefId();
 WorkflowProcess process = workflowManager.getProcess(psDefId);
 String psId = process.getId();
 String psName = process.getName();
 Map<String, WorkflowParticipant> partMap = workflowManager.getParticipantMap("WFParticipant#1#newpkg1_wp1");
 Iterator it = partMap.entrySet().iterator();
 while (it.hasNext()) {
  Map.Entry pairs = (Map.Entry)it.next();
  WorkflowParticipant partcpnt =(WorkflowParticipant) pairs.getValue();
  String partId = partcpnt.getId();
  String partName = partcpnt.getName();  
 }

/Will have my logic for invoking a web service to return the user/users list/

 Collection result = new ArrayList();

 /for testing/
 result.add("xyz");
 result.add("abc");
 return result;
    }catch (Exception e) {
 e.printStackTrace();
 Logger.getLogger(getClass().getName()).log(Level.WARNING, "Error executing plugin", e);
 return null;
    }
{color:#0000ff}}

But I had tried the same logic inside an Application plugin and was able to fetch the Process and Participant details from the execute method of it.

Kindly help me whether any other way is there to fetch these details in a Participant plugin? or Please provide me pointers for fetching these details.

Thanks,

Vignesh