Author: pramirez
Date: Thu Nov 17 07:09:31 2011
New Revision: 1203084

URL: http://svn.apache.org/viewvc?rev=1203084&view=rev
Log:
OODT-120 Finish off integration of workflow into RADiX. Workflow Manager now 
starts and stops correctly

Modified:
    
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/distribution/src/main/resources/bin/env.sh
    
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/assembly/assembly.xml
    
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr
    
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr-client
    
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/etc/workflow.properties

Modified: 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/distribution/src/main/resources/bin/env.sh
URL: 
http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/distribution/src/main/resources/bin/env.sh?rev=1203084&r1=1203083&r2=1203084&view=diff
==============================================================================
--- 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/distribution/src/main/resources/bin/env.sh
 (original)
+++ 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/distribution/src/main/resources/bin/env.sh
 Thu Nov 17 07:09:31 2011
@@ -121,8 +121,8 @@ if [ -z "$CRAWLER_PORT" ]; then
   CRAWLER_PORT=9100
 fi 
 
-if [ -z "$WORKFLOWMGR_PORT" ]; then
-  WORKFLOWMGR_PORT=9200
+if [ -z "$WORKFLOW_PORT" ]; then
+  WORKFLOW_PORT=9200
 fi
 
 if [ -z "$RESMGR_PORT" ]; then

Modified: 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/assembly/assembly.xml
URL: 
http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/assembly/assembly.xml?rev=1203084&r1=1203083&r2=1203084&view=diff
==============================================================================
--- 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/assembly/assembly.xml
 (original)
+++ 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/assembly/assembly.xml
 Thu Nov 17 07:09:31 2011
@@ -23,7 +23,7 @@
     </fileSet>
     <fileSet>
       <directory>target</directory>
-      <outputDirectory>filemgr/logs</outputDirectory>
+      <outputDirectory>workflow/logs</outputDirectory>
       <excludes>
         <exclude>**/*</exclude>
       </excludes>
@@ -38,9 +38,7 @@
     <fileSet>
       <directory>${basedir}/src/main/resources/etc</directory>
       <outputDirectory>workflow/etc</outputDirectory>
-      <includes>
-        <include>**.properties</include>
-      </includes>
+      <includes/>
     </fileSet>
     <fileSet>
       <directory>${basedir}/src/main/resources/policy</directory>

Modified: 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr
URL: 
http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr?rev=1203084&r1=1203083&r2=1203084&view=diff
==============================================================================
--- 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr
 (original)
+++ 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr
 Thu Nov 17 07:09:31 2011
@@ -44,20 +44,21 @@ PRGDIR=`dirname "$PRG"`
 # Only set OODT_HOME if not already set
 [ -z "$OODT_HOME" ] && OODT_HOME=`cd "$PRGDIR/../../.." ; pwd`
 
+# Get OODT environment set up
+if [ -r "$OODT_HOME"/bin/env.sh ]; then
+  . "$OODT_HOME"/bin/env.sh
+fi
+
 # Only set WORKFLOW_HOME if not already set
 if [ -z "$WORKFLOW_HOME" ]; then
   WORKFLOW_HOME="$OODT_HOME"/components/workflow
+  export WORKFLOW_HOME
 fi
 
 if [ -z "$WORKFLOW_PID" ]; then
   WORKFLOW_PID="$WORKFLOW_HOME"/run/cas.workflow.pid
 fi
 
-# Get OODT environment set up
-if [ -r "$OODT_HOME"/bin/env.sh ]; then
-  . "$OODT_HOME"/bin/env.sh
-fi
-
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin; then
   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
@@ -75,14 +76,16 @@ if [ "$1" = "start" ]; then
     fi
   fi
 
-  touch "$OODT_OUT"
+  # In case this script was run from somewhere else cd to this directory
+  cd "$WORKFLOW_HOME"/bin
+
   "$_RUNJAVA" $JAVA_OPTS $OODT_OPTS \
     -Djava.endorsed.dirs="$WORKFLOW_HOME"/lib \
     -Djava.util.logging.config.file="$WORKFLOW_HOME"/etc/logging.properties \
-    
-Dorg.apache.oodt.cas.workflow.properties="$WORKFLOW_HOME"/etc/filemgr.properties
 \
+    
-Dorg.apache.oodt.cas.workflow.properties="$WORKFLOW_HOME"/etc/workflow.properties
 \
     -Djava.io.tmpdir="$OODT_TMPDIR" \
     org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManager \
-    --portNum $WORKFLOW_PORT 2>&1 &
+    --portNum "$WORKFLOW_PORT" 2>&1 &
 
   if [ ! -z "$WORKFLOW_PID" ]; then
     echo $! > $WORKFLOW_PID
@@ -112,7 +115,7 @@ elif [ "$1" = "stop" ]; then
   fi
 
   if [ ! -z "$WORKFLOW_PID" ]; then
-    if [ -f "$WORLFLOW_PID" ]; then
+    if [ -f "$WORKFLOW_PID" ]; then
       kill `cat $WORKFLOW_PID` >/dev/null 2>&1
       if [ $? -eq 1 ]; then
         echo "PID file ($WORKFLOW_PID) found but no matching process was 
found. Stop aborted."

Modified: 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr-client
URL: 
http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr-client?rev=1203084&r1=1203083&r2=1203084&view=diff
==============================================================================
--- 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr-client
 (original)
+++ 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/bin/wmgr-client
 Thu Nov 17 07:09:31 2011
@@ -1,26 +1,73 @@
 #!/bin/sh
+
 # Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE.txt 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
+# 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.    
+# 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.
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+darwin=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+Darwin*) darwin=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
 
+# Only set OODT_HOME if not already set
+[ -z "$OODT_HOME" ] && OODT_HOME=`cd "$PRGDIR/../../.." ; pwd`
+
+# Get OODT environment set up
+if [ -r "$OODT_HOME"/bin/env.sh ]; then
+  . "$OODT_HOME"/bin/env.sh
+fi
+
+# Only set WORKFLOW_HOME if not already set
+if [ -z "$WORKFLOW_HOME" ]; then
+  WORKFLOW_HOME="$OODT_HOME"/components/workflow
+  export WORKFLOW_HOME
+fi
 
-if [ -z $JAVA_HOME ] ; then
-       JAVA_HOME=/path/to/java/home
-else
-       JAVA_HOME=${JAVA_HOME}
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
+  [ -n "$OODT_HOME" ] && OODT_HOME=`cygpath --unix "$OODT_HOME"`
+  [ -n "$OODT_BASE" ] && OODT_BASE=`cygpath --unix "$OODT_BASE"`
+  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
 fi
 
-export JAVA_HOME
+# In case this script was run from somewhere else cd to this directory
+cd "$WORKFLOW_HOME"/bin
 
-$JAVA_HOME/bin/java -Djava.ext.dirs=../lib 
-Djava.util.logging.config.file=../etc/logging.properties 
org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient $*
+"$_RUNJAVA" $JAVA_OPTS $OODT_OPTS \
+  -Djava.endorsed.dirs="$WORKFLOW_HOME"/lib \
+  -Djava.util.logging.config.file=../etc/logging.properties \
+  org.apache.oodt.cas.workflow.system.XmlRpcWorkflowManagerClient "$@"

Modified: 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/etc/workflow.properties
URL: 
http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/etc/workflow.properties?rev=1203084&r1=1203083&r2=1203084&view=diff
==============================================================================
--- 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/etc/workflow.properties
 (original)
+++ 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/workflow/src/main/resources/etc/workflow.properties
 Thu Nov 17 07:09:31 2011
@@ -33,7 +33,7 @@ org.apache.oodt.cas.workflow.engine.unli
 org.apache.oodt.cas.workflow.engine.preConditionWaitTime=10
 
 # set this if you want the workflow manager to submit jobs through the 
resource mgr
-org.apache.oodt.cas.workflow.engine.resourcemgr.url=
+org.apache.oodt.cas.workflow.engine.resourcemgr.url=[RESMGR_URL]
 
 # if you use the resource mgr submission, you can specify how many seconds the 
 # workflow manager should wait inbetween checking to see if a job is complete
@@ -44,23 +44,23 @@ org.apache.oodt.cas.workflow.engine.reso
 org.apache.oodt.cas.workflow.instanceRep.pageSize=20
 
 # lucene workflow instance repository properties
-org.apache.oodt.cas.workflow.instanceRep.lucene.idxPath=/path/to/index
+org.apache.oodt.cas.workflow.instanceRep.lucene.idxPath=[OODT_HOME]/data/workflow
 
 # data source workflow instance repository properties
-org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.url=jdbc:url
-org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.user=user
-org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.pass=pass
-org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.driver=your.jdbc.Driver
-org.apache.oodt.cas.workflow.instanceRep.datasource.quoteFields=false
+# org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.url=jdbc:url
+# org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.user=user
+# org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.pass=pass
+# 
org.apache.oodt.cas.workflow.instanceRep.datasource.jdbc.driver=your.jdbc.Driver
+# org.apache.oodt.cas.workflow.instanceRep.datasource.quoteFields=false
 
 # XML workflow repository properties
-org.apache.oodt.cas.workflow.repo.dirs=file:///path/to/your/repo1, 
file:///path/to/your/repo2
+org.apache.oodt.cas.workflow.repo.dirs=file://[WORKFLOW_HOME]/policy
 
 # wengine-style packaged workflow repo properties
-org.apache.oodt.cas.workflow.wengine.packagedRepo.dir.path = 
/path/to/wengine/workflow/files
+#org.apache.oodt.cas.workflow.wengine.packagedRepo.dir.path = 
/path/to/wengine/workflow/files
 
 # data source workflow repository properties
-org.apache.oodt.cas.workflow.repo.datasource.jdbc.url=jdbc:url
-org.apache.oodt.cas.workflow.repo.datasource.jdbc.user=user
-org.apache.oodt.cas.workflow.repo.datasource.jdbc.pass=pass
-org.apache.oodt.cas.workflow.repo.datasource.jdbc.driver=your.jdbc.Driver
+# org.apache.oodt.cas.workflow.repo.datasource.jdbc.url=jdbc:url
+# org.apache.oodt.cas.workflow.repo.datasource.jdbc.user=user
+# org.apache.oodt.cas.workflow.repo.datasource.jdbc.pass=pass
+# org.apache.oodt.cas.workflow.repo.datasource.jdbc.driver=your.jdbc.Driver


Reply via email to