mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added missing annotation to WorkFlowService
Fixed incorrect workflow URL reference Added authentication to test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3685 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -77,7 +77,7 @@ public class StartWorkflowActionExecuterTest extends BaseSpringTest
|
|||||||
{
|
{
|
||||||
// Execute the action
|
// Execute the action
|
||||||
ActionImpl action = new ActionImpl(null, GUID.generate(), StartWorkflowActionExecuter.NAME, null);
|
ActionImpl action = new ActionImpl(null, GUID.generate(), StartWorkflowActionExecuter.NAME, null);
|
||||||
action.setParameterValue(StartWorkflowActionExecuter.PARAM_WORKFLOW_NAME, "jbpm://wf:review");
|
action.setParameterValue(StartWorkflowActionExecuter.PARAM_WORKFLOW_NAME, "jbpm$wf:review");
|
||||||
action.setParameterValue(WorkflowModel.PROP_REVIEW_DUE_DATE.toPrefixString(namespaceService), new Date());
|
action.setParameterValue(WorkflowModel.PROP_REVIEW_DUE_DATE.toPrefixString(namespaceService), new Date());
|
||||||
NodeRef reviewer = personService.getPerson("admin");
|
NodeRef reviewer = personService.getPerson("admin");
|
||||||
action.setParameterValue(WorkflowModel.ASSOC_REVIEWER.toPrefixString(namespaceService), reviewer);
|
action.setParameterValue(WorkflowModel.ASSOC_REVIEWER.toPrefixString(namespaceService), reviewer);
|
||||||
|
@@ -18,6 +18,7 @@ package org.alfresco.repo.workflow;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||||
import org.alfresco.service.ServiceRegistry;
|
import org.alfresco.service.ServiceRegistry;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
@@ -42,6 +43,10 @@ public class WorkflowServiceImplTest extends BaseSpringTest
|
|||||||
{
|
{
|
||||||
workflowService = (WorkflowService)applicationContext.getBean(ServiceRegistry.WORKFLOW_SERVICE.getLocalName());
|
workflowService = (WorkflowService)applicationContext.getBean(ServiceRegistry.WORKFLOW_SERVICE.getLocalName());
|
||||||
nodeService = (NodeService)applicationContext.getBean(ServiceRegistry.NODE_SERVICE.getLocalName());
|
nodeService = (NodeService)applicationContext.getBean(ServiceRegistry.NODE_SERVICE.getLocalName());
|
||||||
|
|
||||||
|
// authenticate
|
||||||
|
AuthenticationComponent auth = (AuthenticationComponent) applicationContext.getBean("authenticationComponent");
|
||||||
|
auth.setSystemUserAsCurrentUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetWorkflowDefinitions()
|
public void testGetWorkflowDefinitions()
|
||||||
|
@@ -111,6 +111,7 @@ public interface WorkflowService
|
|||||||
* @param workflowName workflow name e.g. jbpm://review
|
* @param workflowName workflow name e.g. jbpm://review
|
||||||
* @return the deployed workflow definition
|
* @return the deployed workflow definition
|
||||||
*/
|
*/
|
||||||
|
@Auditable(parameters = {"workflowName"})
|
||||||
public WorkflowDefinition getDefinitionByName(String workflowName);
|
public WorkflowDefinition getDefinitionByName(String workflowName);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user