mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged 1.4 to HEAD (More workflow)
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4166 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4167 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4183 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4184 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4206 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4207 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4215 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4216 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4301 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4302 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4534 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1197,6 +1197,7 @@ reassign_task_desc=This dialog allows you to reassign a task.
|
|||||||
reassign_select_user=Select the user to assign the task to, then press OK.
|
reassign_select_user=Select the user to assign the task to, then press OK.
|
||||||
error_reassign_task=Unable to reassign the task due to system error:
|
error_reassign_task=Unable to reassign the task due to system error:
|
||||||
part_of_workflow=Part of Workflow
|
part_of_workflow=Part of Workflow
|
||||||
|
workflow_outline=Workflow Outline
|
||||||
initiated_by=Initiated by
|
initiated_by=Initiated by
|
||||||
started_on=Started on
|
started_on=Started on
|
||||||
add_resource=Add Resource
|
add_resource=Add Resource
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
* JBoss, Home of Professional Open Source
|
|
||||||
* Copyright 2005, JBoss Inc., and individual contributors as indicated
|
|
||||||
* by the @authors tag. See the copyright.txt in the distribution for a
|
|
||||||
* full listing of individual contributors.
|
|
||||||
*
|
|
||||||
* This 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 2.1 of
|
|
||||||
* the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This software 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 this software; if not, write to the Free
|
|
||||||
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
||||||
*/
|
|
||||||
package org.alfresco.web.app.servlet;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.OutputStream;
|
|
||||||
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServlet;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.jbpm.JbpmContext;
|
|
||||||
import org.jbpm.graph.def.ProcessDefinition;
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// TODO: DC: Tidy up
|
|
||||||
//
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class JBPMProcessImageServlet extends HttpServlet {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
protected void doGet(HttpServletRequest request, HttpServletResponse response)
|
|
||||||
throws ServletException, IOException {
|
|
||||||
long processDefinitionId = Long.parseLong( request.getParameter( "definitionId" ) );
|
|
||||||
JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
|
|
||||||
ProcessDefinition processDefinition = jbpmContext.getGraphSession().loadProcessDefinition(processDefinitionId);
|
|
||||||
byte[] bytes = processDefinition.getFileDefinition().getBytes("processimage.jpg");
|
|
||||||
OutputStream out = response.getOutputStream();
|
|
||||||
out.write(bytes);
|
|
||||||
out.flush();
|
|
||||||
|
|
||||||
// leave this in. it is in case we want to set the mime type later.
|
|
||||||
// get the mime type
|
|
||||||
// String contentType = URLConnection.getFileNameMap().getContentTypeFor( fileName );
|
|
||||||
// set the content type (=mime type)
|
|
||||||
// response.setContentType( contentType );
|
|
||||||
}
|
|
||||||
}
|
|
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005 Alfresco, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Mozilla Public License version 1.1
|
||||||
|
* with a permitted attribution clause. You may obtain a
|
||||||
|
* copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.alfresco.org/legal/license.txt
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
* either express or implied. See the License for the specific
|
||||||
|
* language governing permissions and limitations under the
|
||||||
|
* License.
|
||||||
|
*/
|
||||||
|
package org.alfresco.web.app.servlet;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.http.HttpServlet;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import org.alfresco.service.ServiceRegistry;
|
||||||
|
import org.alfresco.service.cmr.workflow.WorkflowException;
|
||||||
|
import org.alfresco.service.cmr.workflow.WorkflowService;
|
||||||
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
|
import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Render Workflow Definition Image
|
||||||
|
*/
|
||||||
|
public class WorkflowDefinitionImageServlet extends HttpServlet
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
|
||||||
|
*/
|
||||||
|
protected void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||||
|
throws ServletException, IOException
|
||||||
|
{
|
||||||
|
// retrieve workflow definition id
|
||||||
|
String uri = request.getRequestURI();
|
||||||
|
uri = uri.substring(request.getContextPath().length());
|
||||||
|
StringTokenizer t = new StringTokenizer(uri, "/");
|
||||||
|
if (t.countTokens() != 2)
|
||||||
|
{
|
||||||
|
throw new WorkflowException("Workflow Definition Image servlet does not contain workflow definition id : " + uri);
|
||||||
|
}
|
||||||
|
t.nextToken(); // skip servlet name
|
||||||
|
String workflowDefinitionId = t.nextToken();
|
||||||
|
|
||||||
|
// retrieve workflow definition image
|
||||||
|
WebApplicationContext wc = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
|
||||||
|
WorkflowService workflowService = (WorkflowService)wc.getBean(ServiceRegistry.WORKFLOW_SERVICE.getLocalName());
|
||||||
|
byte[] definitionImage = workflowService.getDefinitionImage(workflowDefinitionId);
|
||||||
|
|
||||||
|
// stream out through response
|
||||||
|
OutputStream out = response.getOutputStream();
|
||||||
|
out.write(definitionImage);
|
||||||
|
out.flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -471,6 +471,16 @@ public class ManageTaskDialog extends BaseDialogBean
|
|||||||
public WorkflowInstance getWorkflowInstance()
|
public WorkflowInstance getWorkflowInstance()
|
||||||
{
|
{
|
||||||
return this.workflowInstance;
|
return this.workflowInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the URL to the Workflow Definition Image of the current task
|
||||||
|
*
|
||||||
|
* @return the url
|
||||||
|
*/
|
||||||
|
public String getWorkflowDefinitionImageUrl()
|
||||||
|
{
|
||||||
|
return "/workflowdefinitionimage/" + this.workflowInstance.definition.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -390,7 +390,7 @@ public class StartWorkflowWizard extends BaseWizardBean
|
|||||||
{
|
{
|
||||||
return selectedWorkflow;
|
return selectedWorkflow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the selected workflow
|
* Sets the selected workflow
|
||||||
*
|
*
|
||||||
|
@@ -230,6 +230,11 @@
|
|||||||
<load-on-startup>5</load-on-startup>
|
<load-on-startup>5</load-on-startup>
|
||||||
</servlet>
|
</servlet>
|
||||||
|
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>workflowDefinitionImageServlet</servlet-name>
|
||||||
|
<servlet-class>org.alfresco.web.app.servlet.WorkflowDefinitionImageServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>JBPMDeployProcessServlet</servlet-name>
|
<servlet-name>JBPMDeployProcessServlet</servlet-name>
|
||||||
<servlet-class>org.alfresco.web.app.servlet.JBPMDeployProcessServlet</servlet-class>
|
<servlet-class>org.alfresco.web.app.servlet.JBPMDeployProcessServlet</servlet-class>
|
||||||
@@ -300,6 +305,11 @@
|
|||||||
<url-pattern>/jbpm/deployprocess</url-pattern>
|
<url-pattern>/jbpm/deployprocess</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>workflowDefinitionImageServlet</servlet-name>
|
||||||
|
<url-pattern>/workflowdefinitionimage/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
<session-config>
|
<session-config>
|
||||||
<session-timeout>60</session-timeout>
|
<session-timeout>60</session-timeout>
|
||||||
</session-config>
|
</session-config>
|
||||||
|
@@ -113,7 +113,7 @@
|
|||||||
<h:commandButton value="#{msg.cancel}" actionListener="#{DialogManager.bean.cancelAddPackageItems}" />
|
<h:commandButton value="#{msg.cancel}" actionListener="#{DialogManager.bean.cancelAddPackageItems}" />
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
|
|
||||||
</a:panel>
|
</a:panel>
|
||||||
|
|
||||||
<h:outputText id="padding2" styleClass="paddingRow" value=" " escape="false" />
|
<h:outputText id="padding2" styleClass="paddingRow" value=" " escape="false" />
|
||||||
@@ -123,4 +123,13 @@
|
|||||||
|
|
||||||
<r:workflowSummary id="workflow-summary" value="#{DialogManager.bean.workflowInstance}" styleClass="workflowSummary" />
|
<r:workflowSummary id="workflow-summary" value="#{DialogManager.bean.workflowInstance}" styleClass="workflowSummary" />
|
||||||
|
|
||||||
</a:panel>
|
</a:panel>
|
||||||
|
|
||||||
|
<h:outputText id="padding2" styleClass="paddingRow" value=" " escape="false" />
|
||||||
|
|
||||||
|
<a:panel rendered="false" id="workflow-outline" label="#{msg.workflow_outline}" progressive="true" expanded="false"
|
||||||
|
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle">
|
||||||
|
|
||||||
|
<h:graphicImage value="#{DialogManager.bean.workflowDefinitionImageUrl}"/>
|
||||||
|
|
||||||
|
</a:panel>
|
||||||
|
@@ -128,9 +128,15 @@
|
|||||||
<h:commandButton value="#{msg.cancel}" actionListener="#{WizardManager.bean.cancelAddPackageItems}" />
|
<h:commandButton value="#{msg.cancel}" actionListener="#{WizardManager.bean.cancelAddPackageItems}" />
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
</h:panelGrid>
|
</h:panelGrid>
|
||||||
|
|
||||||
</a:panel>
|
</a:panel>
|
||||||
|
|
||||||
|
<h:outputText id="padding" styleClass="paddingRow" value=" " escape="false" />
|
||||||
|
|
||||||
|
<a:panel rendered="false" id="workflow-outline" label="#{msg.workflow_outline}" progressive="true" expanded="false"
|
||||||
|
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" styleClass="mainSubTitle">
|
||||||
|
|
||||||
|
<h:graphicImage value="#{DialogManager.bean.workflowDefinitionImageUrl}"/>
|
||||||
|
|
||||||
|
</a:panel>
|
||||||
|
|
Reference in New Issue
Block a user