mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- Fix WCM-205
- Add help for 'show my pooled' to Workflow Interpreter - Remove unnecessary code added earlier for pooled task support git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4786 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -175,6 +175,10 @@ ok> show my completed
|
||||
|
||||
List tasks completed by the currently selected user.
|
||||
|
||||
ok> show my pooled
|
||||
|
||||
List tasks in a pool for the currently selected user.
|
||||
|
||||
ok> show tasks [<pathId>]
|
||||
|
||||
List tasks associated with the specified workflow <pathId>. If <pathId> is
|
||||
|
@@ -1747,7 +1747,7 @@ public class JBPMEngine extends BPMEngine
|
||||
if (isMany)
|
||||
{
|
||||
// convert single node ref to list of node refs
|
||||
JBPMNodeList values = new JBPMNodeList(serviceRegistry);
|
||||
JBPMNodeList values = new JBPMNodeList();
|
||||
values.add(new JBPMNode((NodeRef)value, serviceRegistry));
|
||||
value = (Serializable)values;
|
||||
}
|
||||
@@ -1760,7 +1760,7 @@ public class JBPMEngine extends BPMEngine
|
||||
{
|
||||
if (isMany)
|
||||
{
|
||||
JBPMNodeList values = new JBPMNodeList(serviceRegistry);
|
||||
JBPMNodeList values = new JBPMNodeList();
|
||||
for (NodeRef nodeRef : (List<NodeRef>)value)
|
||||
{
|
||||
values.add(new JBPMNode(nodeRef, serviceRegistry));
|
||||
|
@@ -17,12 +17,6 @@
|
||||
package org.alfresco.repo.workflow.jbpm;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.namespace.NamespacePrefixResolver;
|
||||
import org.alfresco.service.namespace.QNameMap;
|
||||
|
||||
|
||||
/**
|
||||
@@ -34,79 +28,4 @@ public class JBPMNodeList extends ArrayList<JBPMNode>
|
||||
{
|
||||
private static final long serialVersionUID = 1376915749912156471L;
|
||||
|
||||
protected ServiceRegistry services;
|
||||
|
||||
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @param nodeRef node reference
|
||||
* @param services services
|
||||
*/
|
||||
public JBPMNodeList(ServiceRegistry services)
|
||||
{
|
||||
super();
|
||||
this.services = services;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accessor to retrieve a named property on all nodes in the list
|
||||
*
|
||||
* @param propertyName the name of the property to retrieve
|
||||
* @return a collection of property name values
|
||||
*/
|
||||
public Map<String, Collection<Object>> getValues(String propertyName)
|
||||
{
|
||||
ValuesMap<String, Collection<Object>> values = new ValuesMap<String, Collection<Object>>(null);
|
||||
|
||||
for (int i = 0; i < JBPMNodeList.this.size(); i++)
|
||||
{
|
||||
JBPMNode node = JBPMNodeList.this.get(i);
|
||||
Map<String, Object> nodeValues = node.getProperties();
|
||||
for (String key : nodeValues.keySet())
|
||||
{
|
||||
values.put(key, null);
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
|
||||
public class ValuesMap<K, V> extends QNameMap<K, V>
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -6463958742416258009L;
|
||||
|
||||
|
||||
public ValuesMap(NamespacePrefixResolver resolver)
|
||||
{
|
||||
super(resolver);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object get(Object key)
|
||||
{
|
||||
Collection<Object> values = null;
|
||||
if (containsKey(key))
|
||||
{
|
||||
values = new ArrayList<Object>(this.size());
|
||||
|
||||
for (int i = 0; i < JBPMNodeList.this.size(); i++)
|
||||
{
|
||||
JBPMNode node = JBPMNodeList.this.get(i);
|
||||
Object value = node.getProperties().get(key);
|
||||
values.add(value);
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -83,7 +83,7 @@ public class NodeListConverter extends SerializableToByteArrayConverter
|
||||
BeanFactoryReference factory = jbpmFactoryLocator.useBeanFactory(null);
|
||||
ServiceRegistry serviceRegistry = (ServiceRegistry)factory.getFactory().getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
|
||||
JBPMNodeList nodes = new JBPMNodeList(serviceRegistry);
|
||||
JBPMNodeList nodes = new JBPMNodeList();
|
||||
for (NodeRef nodeRef : nodeRefs)
|
||||
{
|
||||
nodes.add(new JBPMNode(nodeRef, serviceRegistry));
|
||||
|
Reference in New Issue
Block a user