Parsing can be used in workflows just as easily as in any other JAMS Jobs source. You can access Variables, Parameters, and Job properties. The most noteworthy part about parsing in workflows is that you will use {} instead of << >>. (NOTE: {} will also work when parsing UNIX/LINUX scripts). This difference in syntax does not affect the functionality of parsing within workflows. For example, to call a variable called "variable1" use {variable1} instead of <<variable1>>. See parsing Parameters and Variables documentation and parsing Job Properties Documentation for more details on the various values you can obtain with parsing. Within activities in a workflow you can use parsing to access Job properties or JAMS Variable values. This can be useful for obtaining a path to a file or putting recovery instructions into an email.
The example below shows how you can use parsing within the "WaitForFile" activity. FileName is a JAMS Variable that contains a path to a file and by using the format "{variableName}" the value of the Variable is used as the FileName criteria. This allows you to have the Job tied to a Variable instead of a static value, allowing you to change the Variable; then when the Job is submitted it receives the most up to date value.
Another place where parsing can be useful is using a "SendEmail" activity. The example below shows that you can use parsing within the email to get the properties of the Job definition with {JAMS.Job.PropertyName} and the current Job entry with {JAMS.PropertyName}. As described above, it is also possible to get the value of a Variable with the format {VariableName} or a Parameter using the format {ParameterName}. The email sent wouild use the subject: the Job's name. The body of the email would contain the Job's name, description, the entries current step, and the value of the FileName Variable.
Note: When using parsing to enter a value as a VB expression surround it in quotes, for example "{JAMS.PropertyName}" |
These are only two examples of activities using parsing; there are many other activities that can be used to meet your requirements.
Click here for a downloadable sample.