padv.util.TokenStringsResolver
Access information about current task iteration and token information
Description
A padv.util.TokenStringsResolver object represents a resolver
that can resolve tokenized strings. For your custom tokens, you can use the resolver object to
access information about the current task iteration and token information.
The resolvePath method of padv.Task uses the resolver to
handle dynamic information in paths. Tokens act as placeholders for dynamic information, which
tasks can resolve at task runtime. For example, you can use the built-in token
$TIMESTAMP$ to represent the current date and time in filenames and
paths.
Creation
You do not need to create this object directly. During task runtime, the
padv.util.TokenStringsResolver object is available to provide information
about the current task iteration artifact and general token information.
When you add a custom token by using the addToken function,
you can pass the padv.util.TokenStringsResolver object to your token
resolution function by using the anonymous function syntax
@(.
The argument obj)anonymous_function(obj)obj represents padv.util.TokenStringsResolver
object that is available at task runtime. Inside the resolution function definition, you can
use the padv.util.TokenStringsResolver object functions like
getIterationArtifact get information about the current task iteration
artifact.
To resolve your tokenized strings, use the resolvePath method of
padv.Task. The built-in tasks automatically resolve tokenized task properties
such as OutputDirectory, ReportPath, and
ReportName by using the resolvePath method
inside the run and dryRun methods of the task
definition.
Object Functions
| Object Function | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
getIterationArtifact | Returns the current task iteration artifact at task runtime getIterationArtifact(resolver) | ||||||||||||||||||
getTokens | Returns the list of acceptable tokens getTokens(resolver) The built-in tokens are:
To add custom tokens to the process model, use
| ||||||||||||||||||
getTokenMap | Returns the mapping of tokens to their resolution functions getTokenMap(resolver) |