svn commit: r903938 - in /ofbiz/trunk: framework/common/src/org/ofbiz/common/ specialpurpose/workflow/ specialpurpose/workflow/servicedef/ specialpurpose/workflow/src/org/ofbiz/workflow/client/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r903938 - in /ofbiz/trunk: framework/common/src/org/ofbiz/common/ specialpurpose/workflow/ specialpurpose/workflow/servicedef/ specialpurpose/workflow/src/org/ofbiz/workflow/client/

lektran
Author: lektran
Date: Thu Jan 28 02:01:47 2010
New Revision: 903938

URL: http://svn.apache.org/viewvc?rev=903938&view=rev
Log:
Moved some workflow related test services out of common and into the workflow component.

Added:
    ofbiz/trunk/specialpurpose/workflow/servicedef/services_test.xml   (with props)
Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java
    ofbiz/trunk/specialpurpose/workflow/ofbiz-component.xml
    ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/client/WorkflowServices.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java?rev=903938&r1=903937&r2=903938&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/CommonServices.java Thu Jan 28 02:01:47 2010
@@ -134,12 +134,6 @@
         return CommonServices.testService(dctx, context);
     }
 
-    public static Map<String, Object> testWorkflowCondition(DispatchContext dctx, Map<String, ?> context) {
-        Map<String, Object> result = FastMap.newInstance();
-        result.put("evaluationResult", Boolean.TRUE);
-        return result;
-    }
-
     public static Map<String, Object> testRollbackListener(DispatchContext dctx, Map<String, ?> context) {
         ServiceXaWrapper xar = new ServiceXaWrapper(dctx);
         xar.setRollbackService("testScv", context);

Modified: ofbiz/trunk/specialpurpose/workflow/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/workflow/ofbiz-component.xml?rev=903938&r1=903937&r2=903938&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/workflow/ofbiz-component.xml (original)
+++ ofbiz/trunk/specialpurpose/workflow/ofbiz-component.xml Thu Jan 28 02:01:47 2010
@@ -22,12 +22,16 @@
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
     <resource-loader name="main" type="component"/>
+
     <classpath type="dir" location="dtd"/>
     <classpath type="jar" location="build/lib/*"/>
+
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
 
     <entity-resource type="data" reader-name="seed" loader="main" location="data/WorkFlowSecurityData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/WorkFlowTypeData.xml"/>
     <entity-resource type="data" reader-name="demo" loader="main" location="data/OrderProcessWorkflow.xml"/>
+
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
+    <service-resource type="model" loader="main" location="servicedef/services_test.xml"/>
 </ofbiz-component>

Added: ofbiz/trunk/specialpurpose/workflow/servicedef/services_test.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/workflow/servicedef/services_test.xml?rev=903938&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/workflow/servicedef/services_test.xml (added)
+++ ofbiz/trunk/specialpurpose/workflow/servicedef/services_test.xml Thu Jan 28 02:01:47 2010
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+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.
+-->
+
+<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
+
+    <service name="testWorkflow" engine="workflow" location="TEST-PKG" invoke="TestWorkflow">
+        <attribute name="orderId" type="String" mode="IN"/>
+        <attribute name="partyId" type="String" mode="IN"/>
+        <attribute name="orderStatusId" type="String" mode="OUT"/>
+    </service>
+    <service name="testWorkflowCondition" engine="java"
+            location="org.ofbiz.common.CommonServices" invoke="testWorkflowCondition">
+        <attribute name="serviceName" type="String" mode="IN" optional="true"/>
+        <attribute name="evaluationResult" type="Boolean" mode="OUT"/>
+    </service>
+</services>

Propchange: ofbiz/trunk/specialpurpose/workflow/servicedef/services_test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/specialpurpose/workflow/servicedef/services_test.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/specialpurpose/workflow/servicedef/services_test.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/client/WorkflowServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/client/WorkflowServices.java?rev=903938&r1=903937&r2=903938&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/client/WorkflowServices.java (original)
+++ ofbiz/trunk/specialpurpose/workflow/src/org/ofbiz/workflow/client/WorkflowServices.java Thu Jan 28 02:01:47 2010
@@ -23,6 +23,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javolution.util.FastMap;
+
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.UtilDateTime;
 import org.ofbiz.base.util.UtilMisc;
@@ -511,5 +513,11 @@
         return null;
     }
 
+    public static Map<String, Object> testWorkflowCondition(DispatchContext dctx, Map<String, ?> context) {
+        Map<String, Object> result = FastMap.newInstance();
+        result.put("evaluationResult", Boolean.TRUE);
+        return result;
+    }
+
 }