Workflow Loader Utility for SAS 9.4

Loads existing workflow templates (a single file or a directory of templates) directly into the content repository. The utility can also activate the uploaded templates.

Syntax

java
-Dhost=hostname
-Dport=nnnn
-Dprotocol=protocol
com.sas.workflow.util.checkin.WorkflowLoader
user-ID
password
path
-outputDir directory-name
<-replace>
<-activate>

Required Arguments

-Dhost=hostname

is the host name of the server where the SAS middle tier is deployed.

-Dport=nnnn

is the port number of the SAS middle tier.

-Dprotocol=protocol

is the protocol used by the middle tier. You must specify this property if the middle tier is configured to use HTTPS. The default protocol is HTTP.

Note This parameter is supported by the first maintenance release of SAS 9.4 and later releases.

-outputDir directory-name

specifies the directory where the modified XML is written if any data types are fixed. The utility automatically fixes any invalid data types by mapping them to appropriate supported types (for example, Short Text). A new file with the corrected data type is created in the directory specified, and the new file is automatically loaded into the content repository.

password

is the password for the specified user.

path

is the fully qualified location of the workflows to load. If a single filename is specified, then the content from that single workflow template file is loaded. If the path resolves to a directory, then the contents of all the files in that directory are loaded.

user-ID

is the ID of a user who is authorized to load content. See Managing Workflow Template Authorization for more information.

Optional Arguments

-activate

activates the template after it is loaded into the repository. If you specify this option, the workflow loader utility uploads the workflow definition to the run-time platform.

-replace

replaces the activated workflow definitions if they already exist in the platform. In the SAS Content Server, this option updates the template version.

Examples

Example 1: BAT File for SAS 9.4 on Windows

Before running this utility, set the path to the local environment file, the user ID, the password, and the port number to the correct values for your site.
@echo off

: /*--------------------------------------------------------------------\
: | Script for executing the WorkflowLoader Utility                     |
: |                                                                     |
: \--------------------------------------------------------------------*/

setlocal

REM Update the following path to your local_env.bat file

call "~dp0..\..\level_env.bat"

REM Define needed environment variables

set SASINSTALLHOME=C:\Program Files\SASHome
set USERID=user
set PASSWORD=password
set PORT=port

if NOT "%1"=="" set WFTEMPLATE=%1
 
if "%1"=="" echo "No template argument supplied"

: Get our hostname value
FOR /F "usebackq" %%i in (`hostname`) DO SET HOST=%%i
set HOST=%HOST%.domain.com

set LAUNCHERJAR=%SASVJR_HOME%\eclipse\plugins\sas.launcher.jar

set UTILITIESDIR=%LEVEL_ROOT%\Web\Utilities
set PICKLISTS=%SASINSTALLHOME%\SASWebInfrastructurePlatform\9.4\Picklists\wars\sas.workflow\**\picklist
set CLASSPATH=%UTILITIESDIR%;%LAUNCHERJAR%
 
REM Run the query test
 "%JAVA_JRE_COMMAND%" ^
  -classpath "%CLASSPATH%"  ^
  -Djava.system.class.loader=com.sas.app.AppClassLoader -Dsas.app.launch.config="%PICKLISTS%" ^
  -Dsas.app.repository.path="%SASVJR_REPOSITORYPATH%" ^
  -Dsas.app.class.path="%UTILITIESDIR%" ^
  -Djava.security.auth.login.config=..\Common\login.config^
  -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false ^
  -Xms64m -Xmx64m -Dhost=%HOST% -Dport=%PORT% ^
  com.sas.workflow.util.checkin.WorkflowLoader %USERID% %PASSWORD% -verify
 %*
 
REM Run the upload test
 "%JAVA_JRE_COMMAND%" ^
  -classpath "%CLASSPATH%"  ^
  -Djava.system.class.loader=com.sas.app.AppClassLoader -Dsas.app.launch.config="%PICKLISTS%" ^
  -Dsas.app.repository.path="%SASVJR_REPOSITORYPATH%" ^
  -Dsas.app.class.path="%UTILITIESDIR%" ^
  -Djava.security.auth.login.config=..\Common\login.config^
  -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false ^
  -Xms64m -Xmx64m -Dhost=%HOST% -Dport=%PORT% ^
  com.sas.workflow.util.checkin.WorkflowLoader %USERID% %PASSWORD% %WFTEMPLATE% -outputDir "%UTILITIESDIR%" -replace -activate
 %*
 
endlocal
if [%2] EQU [exit] exit %ERRORLEVEL%

Example 2: Shell Script for SAS 9.4 on Linux

Before running this utility, set the path to the local environment file, the user ID, the password, the host, and the port to the correct values for you site.
#!/bin/sh -p
#
# WorkflowLoader.sh
#
# Update the following path to your local_env.sh script
#
. `dirname $0`/../../level_env.sh

# Define environment variables

SASINSTALLHOME=/install/cfgsas1/SASHome
USERID=user
PASSWORD=password
HOST=host_name
PORT=port

if [ -z "$1" ]
  then
    echo "No template argument supplied"
  else
    WFTEMPLATE=$1
fi

LAUNCHERJAR=$SASVJR_HOME/eclipse/plugins/sas.launcher.jar

UTILITIESDIR=$LEVEL_ROOT/Web/Utilities
PICKLISTS=$SASINSTALLHOME/SASWebInfrastructurePlatform/9.4/Picklists/wars/sas.workflow/**/picklist
CLASSPATH=$UTILITIESDIR:$LAUNCHERJAR

"$JAVA_JRE_COMMAND" \
-classpath  "$CLASSPATH" \
-Djava.system.class.loader=com.sas.app.AppClassLoader -Dsas.app.launch.config="$PICKLISTS" \
-Dsas.app.repository.path="$SASVJR_REPOSITORYPATH" \
-Dsas.app.class.path="$UTILITIESDIR" \
-Dconfig.lev.web.appserver.logs.dir=/install/cfgsas1/config/Lev1/Web/Logs/SASServer1_1 \
-Djava.security.auth.login.config=../Common/login.config \
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false \
-Dhost=$HOST -Dport=$PORT \
com.sas.workflow.util.checkin.WorkflowLoader $USERID $PASSWORD -verify

"$JAVA_JRE_COMMAND" \
-classpath  "$CLASSPATH" \
-Djava.system.class.loader=com.sas.app.AppClassLoader -Dsas.app.launch.config="$PICKLISTS" \
-Dsas.app.repository.path="$SASVJR_REPOSITORYPATH" \
-Dsas.app.class.path="$UTILITIESDIR" \
-Dconfig.lev.web.appserver.logs.dir=/install/cfgsas1/config/Lev1/Web/Logs/SASServer1_1 \
-Djava.security.auth.login.config=../Common/login.config \
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false \
-Dhost=$HOST -Dport=$PORT \
com.sas.workflow.util.checkin.WorkflowLoader $USERID $PASSWORD $WFTEMPLATE -outputDir "$UTILITIESDIR" -replace -activate

exit 0

Example 3: Shell Script for SAS 9.4 on AIX

Before running this utility, set the path to the local environment file, the user ID, the host, the port number, and the password to the correct values for you site.
#!/bin/sh -p
#
# WorkflowLoader.sh
#
# Update the following path to your local_env.sh script
#
. `dirname $0`/../../level_env.sh

# Define environment variables

SASINSTALLHOME=/install/cfgsas1/SASHome
USERID=user
PASSWORD=password
HOST=host_name
PORT=port

if [ -z "$1" ]
  then
    echo "No template argument supplied"
  else
    WFTEMPLATE=$1
fi

LAUNCHERJAR=$SASVJR_HOME/eclipse/plugins/sas.launcher.jar

UTILITIESDIR=$LEVEL_ROOT/Web/Utilities
PICKLISTS=$SASINSTALLHOME/SASWebInfrastructurePlatform/9.4/Picklists/wars/sas.workflow/**/picklist
CLASSPATH=$UTILITIESDIR:$LAUNCHERJAR

"$JAVA_JRE_COMMAND" \
-Dsas.ext.config="$SASINSTALLHOME/sas.java.ext.config" \
-classpath  "$CLASSPATH" \
-Djava.system.class.loader=com.sas.app.AppClassLoader -Dsas.app.launch.config="$PICKLISTS" \
-Dsas.app.repository.path="$SASVJR_REPOSITORYPATH" \
-Dsas.app.class.path="$UTILITIESDIR" \
-Djava.security.auth.login.config=../Common/login.config \
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false \
-Dhost=$HOST -Dport=$PORT \
com.sas.workflow.util.checkin.WorkflowLoader $USERID $PASSWORD -verify

"$JAVA_JRE_COMMAND" \
-Dsas.ext.config="$SASINSTALLHOME/sas.java.ext.config" \
-classpath  "$CLASSPATH" \
-Djava.system.class.loader=com.sas.app.AppClassLoader -Dsas.app.launch.config="$PICKLISTS" \
-Dsas.app.repository.path="$SASVJR_REPOSITORYPATH" \
-Dsas.app.class.path="$UTILITIESDIR" \
-Djava.security.auth.login.config=../Common/login.config \
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false \
-Dhost=$HOST -Dport=$PORT \
com.sas.workflow.util.checkin.WorkflowLoader $USERID $PASSWORD $WFTEMPLATE -outputDir "$UTILITIESDIR" -replace -activate
exit 0
Last updated: March 5, 2020