mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
84671: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 84518: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.4) 84351: Merged DEV to V4.1-BUG-FIX (4.1.10) 79271 : MNT-11522 : Document modified date is being updated by Workflow - Fix bug. Change create a workflow package for the attached items and add them. Add Behavior Filter. 81662 : MNT-11522 : Document modified date is being updated by Workflow - Create Unit test. 83496 : MNT-11522 : Document modified date is being updated by Workflow - Change unit test. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@84685 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -140,6 +140,36 @@ public class ActivitiWorkflowServiceIntegrationTest extends AbstractWorkflowServ
|
||||
}
|
||||
}
|
||||
|
||||
public void testReviewAndPooledNotModifiedDate()
|
||||
{
|
||||
authenticationComponent.setSystemUserAsCurrentUser();
|
||||
|
||||
Map<QName, Serializable> props = new HashMap<QName, Serializable>();
|
||||
props.put(ContentModel.PROP_NAME, "MNT-11522-testfile.txt");
|
||||
final ChildAssociationRef childAssoc = nodeService.createNode(companyHome, ContentModel.ASSOC_CONTAINS,
|
||||
QName.createQName(NamespaceService.CONTENT_MODEL_PREFIX, "MNT-11522-test"), ContentModel.TYPE_CONTENT, props);
|
||||
NodeRef node = childAssoc.getChildRef();
|
||||
Date lastDate = new Date();
|
||||
nodeService.setProperty(node, ContentModel.PROP_MODIFIED, lastDate);
|
||||
WorkflowDefinition definition = deployDefinition(getPooledReviewDefinitionPath());
|
||||
|
||||
assertNotNull(definition);
|
||||
|
||||
// Create workflow parameters
|
||||
Map<QName, Serializable> params = new HashMap<QName, Serializable>();
|
||||
NodeRef wfPackage = workflowService.createPackage(null);
|
||||
params.put(WorkflowModel.ASSOC_PACKAGE, wfPackage);
|
||||
|
||||
ChildAssociationRef childAs = nodeService.addChild(wfPackage, node, WorkflowModel.ASSOC_PACKAGE_CONTAINS, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI,
|
||||
QName.createValidLocalName((String)nodeService.getProperty(node, ContentModel.PROP_NAME))));
|
||||
|
||||
WorkflowPath startTask = workflowService.startWorkflow(definition.getId(), params);
|
||||
assertNotNull(startTask);
|
||||
String startTaskId = startTask.getId();
|
||||
assertEquals(lastDate, nodeService.getProperty(node, ContentModel.PROP_MODIFIED));
|
||||
workflowService.endTask(startTaskId, null);
|
||||
}
|
||||
|
||||
public void testGetWorkflowTaskDefinitionsWithMultiInstanceTask()
|
||||
{
|
||||
// Test added to validate fix for ALF-14224
|
||||
|
Reference in New Issue
Block a user