forked from liferay/liferay-portal
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn://svn.liferay.com/repos/public/portal/trunk@2017 05bdf26c-840f-0410-9ced-eb539d925f36
- Loading branch information
1 parent
8209022
commit 515c1a2
Showing
29 changed files
with
571 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project name="jbpm-web" basedir="." default="war"> | ||
<path id="web-lib.classpath"> | ||
</path> | ||
|
||
<import file="../build-common-web.xml" /> | ||
|
||
<property name="war.file" value="${ant.project.name}" /> | ||
</project> |
54 changes: 54 additions & 0 deletions
54
jbpm-web/docroot/WEB-INF/src/com/liferay/jbpm/WorkflowComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Copyright (c) 2000-2006 Liferay, LLC. All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package com.liferay.jbpm; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
/** | ||
* <a href="WorkflowComponent.java.html"><b><i>View Source</i></b></a> | ||
* | ||
* @author Charles May | ||
* | ||
*/ | ||
public class WorkflowComponent { | ||
|
||
public String process(HttpServletRequest req, HttpServletResponse res) { | ||
String cmd = req.getParameter("cmd"); | ||
|
||
String results = ""; | ||
|
||
if (cmd.equals("deployXml")) { | ||
results = "<results><definitionId>1</definitionId></results>"; | ||
} | ||
else if (cmd.equals("getDefinitions")) { | ||
results = "<results />"; | ||
} | ||
else if (cmd.equals("getDefinitionsSize")) { | ||
results = "<results><size>0</size></results>"; | ||
} | ||
|
||
return results; | ||
} | ||
|
||
} |
72 changes: 72 additions & 0 deletions
72
jbpm-web/docroot/WEB-INF/src/com/liferay/jbpm/servlet/JBPMServlet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/** | ||
* Copyright (c) 2000-2006 Liferay, LLC. All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package com.liferay.jbpm.servlet; | ||
|
||
import com.liferay.jbpm.WorkflowComponent; | ||
import com.liferay.portal.kernel.log.Log; | ||
import com.liferay.portal.kernel.log.LogFactoryUtil; | ||
import com.liferay.portal.kernel.util.StackTraceUtil; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletOutputStream; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
/** | ||
* <a href="JBPMServlet.java.html"><b><i>View Source</i></b></a> | ||
* | ||
* @author Charles May | ||
* | ||
*/ | ||
public class JBPMServlet extends HttpServlet { | ||
|
||
public void service(HttpServletRequest req, HttpServletResponse res) | ||
throws IOException, ServletException { | ||
|
||
WorkflowComponent workflowComponent = new WorkflowComponent(); | ||
|
||
String result = workflowComponent.process(req, res); | ||
|
||
res.setContentType("text/xml"); | ||
|
||
ServletOutputStream out = res.getOutputStream(); | ||
|
||
try { | ||
if (!res.isCommitted()) { | ||
out.print(result); | ||
} | ||
} | ||
catch (Exception e) { | ||
_log.warn(StackTraceUtil.getStackTrace(e)); | ||
} | ||
finally { | ||
out.flush(); | ||
out.close(); | ||
} | ||
} | ||
|
||
private static Log _log = LogFactoryUtil.getLog(JBPMServlet.class); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> | ||
|
||
<web-app> | ||
<servlet> | ||
<servlet-name>JBPMServlet</servlet-name> | ||
<display-name>JBPMServlet</display-name> | ||
<servlet-class>com.liferay.jbpm.servlet.JBPMServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet-mapping> | ||
<servlet-name>JBPMServlet</servlet-name> | ||
<url-pattern>/servlet/*</url-pattern> | ||
</servlet-mapping> | ||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0"?> | ||
|
||
<project name="servicemix-web" basedir="." default="war"> | ||
<path id="web-lib.classpath"> | ||
<fileset dir="../lib/portal" includes="jmx-ri.jar,xml-apis.jar" /> | ||
</path> | ||
|
||
<import file="../build-common-web.xml" /> | ||
|
||
<property name="war.file" value="${ant.project.name}" /> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0"?> | ||
|
||
<beans xmlns="http://xbean.org/schemas/spring/1.0" xmlns:spring="http://xbean.org/schemas/spring/1.0" xmlns:servicemix="http://servicemix.org/config/1.0" xmlns:liferay="http://www.liferay.com/servicemix/"> | ||
<servicemix:container spring:id="jbi" rootDir="../wdir" useMBeanServer="true" createMBeanServer="true" installationDirPath="../install" deploymentDirPath="../deploy" monitorInstallationDirectory="true" dumpStats="true" statsInterval="10" transactionManager="#transactionManager"> | ||
<servicemix:activationSpecs> | ||
<servicemix:activationSpec componentName="httpInOutBinding" service="liferay:httpInOutBinding" destinationService="liferay:workflow"> | ||
<servicemix:component> | ||
<bean class="com.liferay.jbi.util.HttpInOutBinding" /> | ||
</servicemix:component> | ||
</servicemix:activationSpec> | ||
<servicemix:activationSpec componentName="workflow" service="liferay:workflow"> | ||
<servicemix:component> | ||
<bean class="com.liferay.jbi.util.URLTransformComponent"> | ||
<property name="url" value="http://localhost:8080/jbpm-web/servlet" /> | ||
</bean> | ||
</servicemix:component> | ||
</servicemix:activationSpec> | ||
</servicemix:activationSpecs> | ||
</servicemix:container> | ||
<bean id="transactionManager" class="org.jencks.factory.TransactionManagerFactoryBean" /> | ||
</beans> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+240 KB
servicemix-web/docroot/WEB-INF/lib/backport-util-concurrent-2.0_01_pd.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
99 changes: 99 additions & 0 deletions
99
...icemix-web/docroot/WEB-INF/src/com/liferay/jbi/components/workflow/WorkflowComponent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/** | ||
* Copyright (c) 2000-2006 Liferay, LLC. All rights reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package com.liferay.jbi.components.workflow; | ||
|
||
import java.util.Map; | ||
|
||
import javax.jbi.messaging.MessagingException; | ||
|
||
/** | ||
* <a href="WorkflowComponent.java.html"><b><i>View Source</i></b></a> | ||
* | ||
* @author Charles May | ||
* | ||
*/ | ||
public interface WorkflowComponent { | ||
|
||
public String deployDefinition(String xml) throws MessagingException; | ||
|
||
public String getCurrentTasks( | ||
String instanceId, String userId, String tokenId) | ||
throws MessagingException; | ||
|
||
public String getDefinitions( | ||
String definitionId, String name, String start, String end) | ||
throws MessagingException; | ||
|
||
public String getDefinitionsSize(String definitionId, String name) | ||
throws MessagingException; | ||
|
||
public String getInstances( | ||
String definitionId, String instanceId, String workflowName, | ||
String workflowVersion, String gtStartDate, String ltStartDate, | ||
String gtEndDate, String ltEndDate, String hideEndedTasks, | ||
String andSearch, String start, String end) | ||
throws MessagingException; | ||
|
||
public String getInstancesSize( | ||
String definitionId, String instanceId, String workflowName, | ||
String workflowVersion, String gtStartDate, String ltStartDate, | ||
String gtEndDate, String ltEndDate, String hideEndedTasks, | ||
String andSearch) | ||
throws MessagingException; | ||
|
||
public String getTaskFormParameters(String taskId) | ||
throws MessagingException; | ||
|
||
public String getTaskTransitions(String taskId) throws MessagingException; | ||
|
||
public String getTokenChildren(String instanceId) throws MessagingException; | ||
|
||
public String getUserTasks( | ||
String instanceId, String userId, String taskName, | ||
String workflowName, String assignedTo, String gtCreateDate, | ||
String ltCreateDate, String gtStartDate, String ltStartDate, | ||
String gtEndDate, String ltEndDate, String hideEndedTasks, | ||
String andSearch, String start, String end) | ||
throws MessagingException; | ||
|
||
public String getUserTasksSize( | ||
String instanceId, String userId, String taskName, | ||
String workflowName, String assignedTo, String gtCreateDate, | ||
String ltCreateDate, String gtStartDate, String ltStartDate, | ||
String gtEndDate, String ltEndDate, String hideEndedTasks, | ||
String andSearch) | ||
throws MessagingException; | ||
|
||
public String signalInstance(String instanceId) throws MessagingException; | ||
|
||
public String signalToken(String instanceId, String tokenId) | ||
throws MessagingException; | ||
|
||
public String startWorkflow(String definitionId, String userId) | ||
throws MessagingException; | ||
|
||
public String updateTask( | ||
String taskId, String userId, String transition, Map parameterMap) | ||
throws MessagingException; | ||
|
||
} |
Oops, something went wrong.