mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merge WOLF-1 to HEAD
108132: UTF-30 Fix version of share, built in Share codebase Fix version of share-po, built in Share codebase 108130: UTF-30 Fix version of artifacts built in Share codebase + package alfresco-platform and share-services AMP instead of share-enabled alfresco war 108128: UTF-30 Fix version of artifacts built in Share codebase + package alfresco-platform and share-services AMP instead of share-enabled alfresco war 107846: EOL-10: Remove JBPM bootstrap. Removed the JBPM boostrap bean ("workflowScheduler") and the schema validation from bootstrap-context.xml 107842: EOL-4 : Remove JBPM schema bootstrap reference. 107839: EOL-8 : Remove JBPMWorkflowTestSuite and re-instate InviteServiceTest 107823: Temp remove InviteServiceTest 107820: EOL-9: Remove workflow definitions for JBPM workflows 107813: EOL-6: Remove jBPM from MBeans SVN ignore settings 107810: EOL-8 : Attempt to update Invite service test to use activity. 107794:EOL-5: Remove jBPM from Admin Console 107790: EOL-8 : Remove JBPM Tests EOL-8 : more JBPM tests removed. EOL-8 : Remove JBPM tests from Workflow Test Suite EOL-8 : Remove JBPMEngineTest AIRWOLF - more enterprise pom work. UTF-143 - add the update tool JAR to the enterprise distribution. Airwolf - need to separate dependency.share.version EOL-8 - Remove system.workflow.engine.jbpm.enabled git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@108654 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -52,7 +52,6 @@ import org.alfresco.repo.web.scripts.tagging.TaggingServiceTest;
|
|||||||
import org.alfresco.repo.web.scripts.thumbnail.ThumbnailServiceTest;
|
import org.alfresco.repo.web.scripts.thumbnail.ThumbnailServiceTest;
|
||||||
import org.alfresco.repo.web.scripts.transfer.TransferWebScriptTest;
|
import org.alfresco.repo.web.scripts.transfer.TransferWebScriptTest;
|
||||||
import org.alfresco.repo.web.scripts.workflow.ActivitiWorkflowRestApiTest;
|
import org.alfresco.repo.web.scripts.workflow.ActivitiWorkflowRestApiTest;
|
||||||
import org.alfresco.repo.web.scripts.workflow.JBPMWorkflowRestApiTest;
|
|
||||||
import org.alfresco.repo.web.scripts.workflow.WorkflowModelBuilderTest;
|
import org.alfresco.repo.web.scripts.workflow.WorkflowModelBuilderTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,7 +94,6 @@ public class WebScriptTestSuite extends TestSuite
|
|||||||
suite.addTestSuite( TransferWebScriptTest.class );
|
suite.addTestSuite( TransferWebScriptTest.class );
|
||||||
suite.addTestSuite( WorkflowModelBuilderTest.class );
|
suite.addTestSuite( WorkflowModelBuilderTest.class );
|
||||||
suite.addTestSuite( ActivitiWorkflowRestApiTest.class );
|
suite.addTestSuite( ActivitiWorkflowRestApiTest.class );
|
||||||
suite.addTestSuite( JBPMWorkflowRestApiTest.class );
|
|
||||||
suite.addTestSuite( PublishingRestApiTest.class );
|
suite.addTestSuite( PublishingRestApiTest.class );
|
||||||
suite.addTestSuite( SOLRWebScriptTest.class );
|
suite.addTestSuite( SOLRWebScriptTest.class );
|
||||||
suite.addTestSuite( SubscriptionServiceRestApiTest.class );
|
suite.addTestSuite( SubscriptionServiceRestApiTest.class );
|
||||||
|
@@ -38,7 +38,6 @@ import org.alfresco.repo.site.SiteModel;
|
|||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||||
import org.alfresco.repo.web.scripts.BaseWebScriptTest;
|
import org.alfresco.repo.web.scripts.BaseWebScriptTest;
|
||||||
import org.alfresco.repo.workflow.jbpm.JBPMEngine;
|
|
||||||
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;
|
||||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||||
@@ -92,7 +91,7 @@ public class InviteServiceTest extends BaseWebScriptTest
|
|||||||
// can be removed in the tearDown() method
|
// can be removed in the tearDown() method
|
||||||
private List<String> inviteeEmailAddrs;
|
private List<String> inviteeEmailAddrs;
|
||||||
|
|
||||||
private static final String WF_DEFINITION_INVITE = WorkflowModelNominatedInvitation.WORKFLOW_DEFINITION_NAME;
|
private static final String WF_DEFINITION_INVITE = WorkflowModelNominatedInvitation.WORKFLOW_DEFINITION_NAME_ACTIVITI;
|
||||||
|
|
||||||
private static final String USER_INVITER = "InviterUser";
|
private static final String USER_INVITER = "InviterUser";
|
||||||
private static final String USER_INVITER_2 = "InviterUser2";
|
private static final String USER_INVITER_2 = "InviterUser2";
|
||||||
@@ -165,14 +164,14 @@ public class InviteServiceTest extends BaseWebScriptTest
|
|||||||
{
|
{
|
||||||
public Object doWork() throws Exception
|
public Object doWork() throws Exception
|
||||||
{
|
{
|
||||||
// redeploy invite process definition in case it has been modified
|
// // redeploy invite process definition in case it has been modified
|
||||||
WorkflowDefinition inviteWfDefinition = workflowService.getDefinitionByName(
|
// WorkflowDefinition inviteWfDefinition = workflowService.getDefinitionByName(
|
||||||
"jbpm$" + WorkflowModelNominatedInvitation.WF_PROCESS_INVITE.toPrefixString(namespaceService));
|
// "jbpm$" + WorkflowModelNominatedInvitation.WF_PROCESS_INVITE.toPrefixString(namespaceService));
|
||||||
workflowService.undeployDefinition(inviteWfDefinition.id);
|
// workflowService.undeployDefinition(inviteWfDefinition.id);
|
||||||
ClassPathResource inviteWfResource = new ClassPathResource(
|
// ClassPathResource inviteWfResource = new ClassPathResource(
|
||||||
"alfresco/workflow/invitation-nominated_processdefinition.xml");
|
// "alfresco/workflow/invitation-nominated_processdefinition.xml");
|
||||||
workflowService.deployDefinition(
|
// workflowService.deployDefinition(
|
||||||
JBPMEngine.ENGINE_ID, inviteWfResource.getInputStream(), MimetypeMap.MIMETYPE_XML);
|
// JBPMEngine.ENGINE_ID, inviteWfResource.getInputStream(), MimetypeMap.MIMETYPE_XML);
|
||||||
|
|
||||||
// Create new invitee email address list
|
// Create new invitee email address list
|
||||||
inviteeEmailAddrs = new ArrayList<String>();
|
inviteeEmailAddrs = new ArrayList<String>();
|
||||||
|
@@ -1,131 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
|
||||||
*
|
|
||||||
* This file is part of Alfresco
|
|
||||||
*
|
|
||||||
* Alfresco is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Alfresco is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.web.scripts.workflow;
|
|
||||||
|
|
||||||
import org.alfresco.repo.workflow.jbpm.JBPMEngine;
|
|
||||||
import org.json.JSONArray;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
import org.springframework.extensions.webscripts.Status;
|
|
||||||
import org.springframework.extensions.webscripts.TestWebScriptServer.GetRequest;
|
|
||||||
import org.springframework.extensions.webscripts.TestWebScriptServer.Response;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Nick Smith
|
|
||||||
* @author Frederik Heremans
|
|
||||||
* @since 3.4.e
|
|
||||||
*/
|
|
||||||
public class JBPMWorkflowRestApiTest extends AbstractWorkflowRestApiTest
|
|
||||||
{
|
|
||||||
private static final String ADHOC_WORKFLOW_DEFINITION_NAME = "jbpm$wf:adhoc";
|
|
||||||
private static final String ADHOC_WORKFLOW_DEFINITION_TITLE = "Adhoc Workflow (JBPM)";
|
|
||||||
private static final String ADHOC_WORKFLOW_DEFINITION_DESCRIPTION = "Assign arbitrary task to colleague using JBPM workflow engine";
|
|
||||||
private static final String REVIEW_WORKFLOW_DEFINITION_NAME = "jbpm$wf:review";
|
|
||||||
private static final String REVIEW_POOLED_WORKFLOW_DEFINITION_NAME = "jbpm$wf:reviewpooled";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getAdhocWorkflowDefinitionName()
|
|
||||||
{
|
|
||||||
return ADHOC_WORKFLOW_DEFINITION_NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getAdhocWorkflowDefinitionTitle()
|
|
||||||
{
|
|
||||||
return ADHOC_WORKFLOW_DEFINITION_TITLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getAdhocWorkflowDefinitionDescription()
|
|
||||||
{
|
|
||||||
return ADHOC_WORKFLOW_DEFINITION_DESCRIPTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getReviewWorkflowDefinitionName()
|
|
||||||
{
|
|
||||||
return REVIEW_WORKFLOW_DEFINITION_NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getReviewPooledWorkflowDefinitionName()
|
|
||||||
{
|
|
||||||
return REVIEW_POOLED_WORKFLOW_DEFINITION_NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void approveTask(String taskId) throws Exception
|
|
||||||
{
|
|
||||||
String transition = "approve";
|
|
||||||
checkTransitionExists(transition, taskId);
|
|
||||||
|
|
||||||
// Take transition
|
|
||||||
workflowService.endTask(taskId, transition);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void rejectTask(String taskId) throws Exception
|
|
||||||
{
|
|
||||||
String transition = "reject";
|
|
||||||
checkTransitionExists(transition, taskId);
|
|
||||||
|
|
||||||
// Take transition
|
|
||||||
workflowService.endTask(taskId, transition);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void checkTransitionExists(String transitionName, String taskId) throws Exception
|
|
||||||
{
|
|
||||||
// Transition to "Approve", check if transition is available
|
|
||||||
Response response = sendRequest(new GetRequest(URL_TASKS + "/" + taskId), Status.STATUS_OK);
|
|
||||||
String jsonStr = response.getContentAsString();
|
|
||||||
JSONObject json = new JSONObject(jsonStr);
|
|
||||||
JSONObject result = json.getJSONObject("data");
|
|
||||||
assertNotNull(result);
|
|
||||||
|
|
||||||
JSONObject definition = result.getJSONObject("definition");
|
|
||||||
assertNotNull(definition);
|
|
||||||
JSONObject node = definition.getJSONObject("node");
|
|
||||||
assertNotNull(node);
|
|
||||||
JSONArray transitions = node.getJSONArray("transitions");
|
|
||||||
assertNotNull(transitions);
|
|
||||||
|
|
||||||
boolean found = false;
|
|
||||||
// Find approve transition
|
|
||||||
for (int i=0; i < transitions.length(); i++)
|
|
||||||
{
|
|
||||||
String name = transitions.getJSONObject(i).getString("id");
|
|
||||||
if (name.equals("approve"))
|
|
||||||
{
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assertTrue("Transition 'Approve' not found", found);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testNothing() throws Exception
|
|
||||||
{
|
|
||||||
//NOOP
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected String getEngine()
|
|
||||||
{
|
|
||||||
return JBPMEngine.ENGINE_ID;
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user