mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- Example group / pooled workflow definitions
- Fix to workflow javascript when writing multiple variables back to process git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4893 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,19 +16,12 @@
|
||||
*/
|
||||
package org.alfresco.repo.workflow.jbpm;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.jscript.Node;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.service.cmr.security.AuthorityType;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowException;
|
||||
import org.dom4j.Element;
|
||||
import org.jbpm.graph.exe.ExecutionContext;
|
||||
import org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator;
|
||||
import org.jbpm.taskmgmt.def.AssignmentHandler;
|
||||
import org.jbpm.taskmgmt.exe.Assignable;
|
||||
import org.springframework.beans.factory.BeanFactory;
|
||||
|
||||
|
@@ -255,17 +255,22 @@ public class AlfrescoJavaScript extends JBPMSpringActionHandler
|
||||
*/
|
||||
private static VariableAccess getWritableVariable(List<VariableAccess> variableAccesses)
|
||||
{
|
||||
VariableAccess writable = null;
|
||||
if (variableAccesses != null)
|
||||
{
|
||||
for (VariableAccess variableAccess : variableAccesses)
|
||||
{
|
||||
if (variableAccess.isWritable())
|
||||
{
|
||||
return variableAccess;
|
||||
if (writable != null)
|
||||
{
|
||||
throw new WorkflowException("AlfrescoJavaScript supports only one writable variable");
|
||||
}
|
||||
writable = variableAccess;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return writable;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user