5. The net.arsretia.jawflow.util Package
   5.1 Dos2UnixActivity
   5.2 Unix2DosActivity
   5.3 ExternalCommandActivity
   5.4 FileCopyActivity
   5.5 MailActivity
   5.6 MainWrapperActivity
   5.7 MoveFileActivity
   5.8 RegexpReplacerActivity
   5.9 ScriptActivity
   5.10 ZipActivity
   5.11 UnzipActivity
 5. The net.arsretia.jawflow.util Package
In the net.arsretia.jawflow.util package there are many activites ready to be used
 5.1 Dos2UnixActivity
This activity converts a DOS file in a UNIX File (CRLF -> CR conversion)

<ExtendedAttribute Name="DosFile" Value="<dosfile>"/> <ExtendedAttribute Name="DosFileDir" Value="<dosfiledir>"/> <ExtendedAttribute Name="UnixFileOutDir" Value="<unixfileoutdir>"/> <ExtendedAttribute Name="DosFileSuffix" Value="<dosfilesuffix>"/> <ExtendedAttribute Name="UnixFileSuffix" Value="<unixfilesuffix>"/> <ExtendedAttribute Name="errorVariable" Value="<errorVariable>"/> <ExtendedAttribute Name="errorValue" Value="<errorValue>"/>

  Var DescriptionMandatory
  dosfile  Name of the dos file (without suffix)  
  dosfiledir  Directory where the dos file is  
  unixfileoutdir  Directory in cui scrivere il file unix  
  dosfilesuffix  Dos file Extension  
  unixfilesuffix  Unix File Extension (default=".unix")  
  errorVariable  Name of the error variable to be set in case of error  
  errorValue  Value of the error Variable in case of error  
 5.2 Unix2DosActivity
This Activity converts an UNIX file to a DOS one (CR -> CRLF)

<ExtendedAttribute Name="UnixFile" Value="<unixfile>"/> <ExtendedAttribute Name="UnixFileDir" Value="<unixfiledir>"/> <ExtendedAttribute Name="DosFileOutDir" Value="<dosfileoutdir>"/> <ExtendedAttribute Name="DosFileSuffix" Value="<dosfilesuffix>"/> <ExtendedAttribute Name="UnixFileSuffix" Value="<unixfilesuffix>"/> <ExtendedAttribute Name="errorVariable" Value="<errorVariable>"/> <ExtendedAttribute Name="errorValue" Value="<errorValue>"/>

  Var DescriptionMandatory
 unixfile Unix file name (no suffix)  
 unixfiledir Unix file dir  
 dosfileoutdir DOS File dir  
 dosfilesuffix Dos File Suffix  
 unixfilesuffix Unix File Suffix (default=.unix)  
 errorVariable  Name of the error variable to be set in case of error  
 errorValue Valore della variabile di errore in caso di errore  
 5.3 ExternalCommandActivity
This activity executes an external command

<ExtendedAttribute Name="command" Value="<command>"/> <ExtendedAttribute Name="errorVariable" Value="<errorVariable>"/> <ExtendedAttribute Name="errorValue" Value="<errorValue>"/>

  Var DescriptionMandatory
 command Complete Command  
 errorVariable  Name of the error variable to be set in case of error  
 errorValue Valore della variabile di errore in caso di errore  
 5.4 FileCopyActivity
File copy

<ExtendedAttribute Name="OriginalFile" Value="<originalfile>"/> <ExtendedAttribute Name="OriginalFileDir" Value="<originalfiledir>"/> <ExtendedAttribute Name="OriginalFileSuffix" Value="<origfilesuffix>"/> <ExtendedAttribute Name="CopiedFile" Value="<copiedfile>"/> <ExtendedAttribute Name="CopiedFileDir" Value="<copiedfiledir>"/> <ExtendedAttribute Name="CopiedFileSuffix" Value="<copiedfilesuffix>"/> <ExtendedAttribute Name="NameChanges" Value="<namechanges>"/> <ExtendedAttribute Name="errorVariable" Value="<errorVariable>"/> <ExtendedAttribute Name="errorValue" Value="<errorValue>"/>

  Var DescriptionMandatory
 originalfile Name of the original file (without suffix)  
 originalfiledir Directory where the file is  
 originalfilesuffix Original file suffix  
 CopiedFile Copied file name  
 CopiedFileDir Copied file dir  
 CopiedFileSuffix Copied file Suffix  
 NameChanges
Can be:
LeaveAsItIs no changes
ToUpperCase copied file name is uppercase
ToLowerCase copied file name is lowercase
 
 errorVariable  Name of the error variable to be set in case of error  
 errorValue Valore della variabile di errore in caso di errore  
 5.5 MailActivity
Sends an email

<ExtendedAttribute Name="address" Value="<address>"/> <ExtendedAttribute Name="text" Value="<text>"/> <ExtendedAttribute Name="smtp" Value="<smtp>"/> <ExtendedAttribute Name="from" Value="<from>"/> <ExtendedAttribute Name="subject" Value="<subject>"/> <ExtendedAttribute Name="attachment" Value="<attachment>"/>

  Var DescriptionMandatory
 Address Address (many addresses can be inserted)  
 Smtp SMTP Server  
 From From address  
 Text Text. If the variable is prepended by a '@' is the url of a valid file containing the text  
 Subject Subject  
 Attachment Attachment file url (many attachments can be inserted)  

In the text and the subject it is possible to use the variable substitution using the $ prefix.
 5.6 MainWrapperActivity
This activity executes a java class with the method:
public static void main(String argv[])
<ExtendedAttribute Name="runnable.class" Value="<class>"/> <ExtendedAttribute Name="runnable.class.path" Value="<classpath>"/> <ExtendedAttribute Name="runnable.param" Value="<param>"/> <ExtendedAttribute Name="errorVariable" Value="<errorvar>"/> <ExtendedAttribute Name="errorValue" Value="<errorval>"/>

  Var DescriptionMandatory
Class Class Name  
Classpath Execution Classpath  
Param Main class parameters (many parameters can be inserted)  
Errorvar Name of the variable to be set in case of errors  
Errorval Value of the variable to be set in case of errors  
 5.7 MoveFileActivity
This activity moves a file. It can be configured in the same way as the FileCopyActivity.
 5.8 RegexpReplacerActivity
This activity performs a regular expression substitution in a given file

<ExtendedAttribute Name="OriginalFile" Value="<originalfile>"/> <ExtendedAttribute Name="OriginalFileDir" Value="<originalfiledir>"/> <ExtendedAttribute Name="OriginalFileSuffix" Value="<origfilesuffix>"/> <ExtendedAttribute Name="ReplacedFile" Value="<repfile>"/> <ExtendedAttribute Name="ReplacedFileDir" Value="<repfiledir>"/> <ExtendedAttribute Name="ReplacedFileSuffix" Value="<repfilesuffix>"/> <ExtendedAttribute Name="RemoveEmptyLines" Value="<removeemptylines>"/> <ExtendedAttribute Name="Regexp" Value="<regexp>"/> <ExtendedAttribute Name="Replacestring" Value="<rreplacestring>"/> <ExtendedAttribute Name="errorVariable" Value="<errorvar>"/> <ExtendedAttribute Name="errorValue" Value="<errorval>"/>

  Var DescriptionMandatory
originalfile Original File Name (without suffix)  
originalfiledir Original File Dir  
Originalfilesuffix Original File suffix  
ReplacedFile Substituted file name  
ReplacedFileDir Substituted file dir  
ReplacedFileSuffix Substituted file suffix  
RemoveEmptyLines It it is true, empty lines are removed  
Regexp Regular expression  
ReplaceString String to be inserted  
Errorvar Name of the variable to be set in case of errors  
Errorval Value of the variable to be set in case of errors  
 5.9 ScriptActivity
This activity executes a script writtine in a language supported by BSF. The Script MUST return one of the codes before mentioned for the Java Activity

<ExtendedAttribute Name="language" Value="<language>"/> <ExtendedAttribute Name="script" Value="<script>"/>

  Var DescriptionMandatory
Language Language  
Script File containing the script  
 5.10 UnzipActivity
This Activity unzips a file

<ExtendedAttribute Name="ZipInputFile" Value="<zipinputfile>"/> <ExtendedAttribute Name="ZipInputFileDir" Value="<zipinputfiledir>"/> <ExtendedAttribute Name="ExtractDir" Value="<extractdir>"/> <ExtendedAttribute Name="PreserveTree" Value="<preservetree>"/> <ExtendedAttribute Name="errorVariable" Value="<errorVariable>"/> <ExtendedAttribute Name="errorValue" Value="<errorValue>"/>

  Var DescriptionMandatory
Zipinputfile Name of the zip file (without .zip)  
zipinputfiledir Zip File Dir  
Extractdir Output Dir  
Preservetree True if you want to preserve the original dir struct  
errorVariable Name of the error variable to be set in case of error  
errorValue Value of the error Variable in case of error  
 5.11 ZipActivity
This activity zips a list of files

<ExtendedAttribute Name="ZipDir" Value="<zipDir>"/> <ExtendedAttribute Name="ZipFileOutDir" Value="<zipfileoutdir>"/> <ExtendedAttribute Name="ZipFileName" Value="<zipfilename>"/> <ExtendedAttribute Name="Extension" Value="<extension>"/> <ExtendedAttribute Name="errorVariable" Value="<errorVariable>"/> <ExtendedAttribute Name="errorValue" Value="<errorValue>"/>

  Var DescriptionMandatory
ZipfileName Name of the zip file (without .zip)  
Zipfileoutdir Zip File Dir  
ZipDir Directory where the files to be compressed are  
Extension Extensions of the files to be compressed (many extensions can be inserted)  
errorVariable Name of the error variable to be set in case of error  
errorValue Value of the error Variable in case of error  
Chapter 4 Contents Chapter 6