Using Tokens

このトピックは、ArcEditor および ArcInfo にのみ適用されます。

Tokens are placeholder text for dynamic properties that will be placed in at run time. For example, if you want to define an e-mail message that will be sent automatically at certain times and you want to date stamp the message, you can put a placeholder token that will be swapped out at run time with the correct date. Workflow Manager provides a mechanism for defining messages and strings using tokens, and they will automatically be parsed and updated before being used. Some of the elements in Workflow Manager that use tokens are the following:

Tokens are categorized into specific parsers. There are six parsers that are included in Workflow Manager:

  1. Job parser—Responsible for swapping out job properties
  2. Extended parser—Responsible for swapping out extended job properties (1-1 only)
  3. System parser—Responsible for swapping out system properties, such as current date/user
  4. Function parser—Responsible for carrying out certain functions on specified text, such as getting the e-mail of a user
  5. Spatial Notification parser—Responsible for swapping out properties related to spatial notifications
  6. Environment Variable parser—Responsible for swapping out environment variables, such as the TEMP folder

These parsers are, by default, parsed in the above order. This is important because some parsers may rely on the output of previous parsing to work correctly. For example, the following string contains two tokens:

Please contact the current user at

[EMAILOF([SYS:CUR_LOGIN])]

The first is a function parser token and the second is a system parser token. The EMAILOF token requires an input parameter that is the result of another parsing; therefore, the system parser must run first.

Each parser may contain any number of tokens. Here is a list of the currently supported tokens and the parser to which each belongs:

Parser

Token

Description

Example input

Example output

Job

[JOB:ID]

Job ID

[JOB:ID]

1642

[JOB:PARENT_VERSION]

Parent version for the job version

[JOB:PARENT_VERSION]

SDE.Default

[JOB:VERSION]

Version name

[JOB:VERSION]

Workflow Manager_1642

[JOB:TYPE_ID]

Job type ID

[JOB:TYPE_ID]

4

[JOB:TYPE_NAME]

Job type name

[JOB:TYPE_NAME]

TRANS

[JOB:OWNED_BY]

Job owner

[JOB:OWNED_BY]

jbloggs

[JOB:CREATED_BY]

User who created the job

[JOB:CREATED_BY]

fjones

[JOB:NAME]

Name of the job

[JOB:NAME]

JOB_TRANS_1642

[JOB:STATUS_ID]

Job status ID

[JOB:STATUS_ID]

12

[JOB:STATUS_NAME]

Job status name

[JOB:STATUS_NAME]

Created

[JOB:STAGE_ABBRV]

Job stage name (short)

[JOB:STAGE_ABBRV]

W

[JOB:STAGE_NAME]

Job stage name (long)

[JOB:STAGE_NAME]

Working

[JOB:ASSIGNED_TO]

Who the job is assigned to

[JOB:ASSIGNED_TO]

fjones

[JOB:ASSIGNED_TYPE]

Assigned to group or user

[JOB:ASSIGNED_TYPE]

User

[JOB:ATTACHMENTS]

List of attachments

[JOB:ATTACHMENTS]

manifest.txt input_map.pdf

[JOB:STARTED_DATE]

Date the job was started

[JOB:STARTED_DATE]

12/8/04

[JOB:END_DATE]

Date the job was completed

[JOB:END_DATE]

12/20/04

[JOB:START_DATE]

Date the job was due to start

[JOB:START_DATE]

12/6/04

[JOB:DUE_DATE]

Date the job is due to end

[JOB:DUE_DATE]

12/17/04

[JOB:NOTES]

Job notes

[JOB:NOTES]

Charge to 78943

[JOB:DESCRIPTION]

Job description

[JOB:DESCRIPTION]

Update streets

[JOB:PRIORITY]

Job priority (integer)

[JOB:PRIORITY]

2

[JOB:PRIORITY_NAME]

Job priority name

[JOB:PRIORITY_NAME]

MEDIUM

[JOB:PARENT_JOB]

Parent job ID

[JOB:PARENT_JOB]

1454

[JOB:PARENT_JOB_NAME]

Parent job name

[JOB:PARENT_JOB_NAME]

JOB_TRANS_1454

[JOB:AOI_ENVELOPE]

Coordinates of the AOI envelope

[JOB:AOI_ENVELOPE]

–118.54, 35.54, 34.36, –117.56

[JOB:WORKSPACE_ALIAS]

The alias of the job's active data workspace

[JOB:WORKSPACE_ALIAS]

ProductionDB

[JOB:WORKSPACE_ID]

The ID of the job's active data workspace

[JOB:WORKSPACE_ID]

{B979F9DC-EB7A-4A1D-A389-0C19D2869C6C}

[JOB:PERCENT_COMPLETE]

The job's percent complete value

[JOB:PERCENT_COMPLETE]

73

Extended Properties

[JOBEX:TABLENAME.FIELDNAME]

Extended property value

[JOBEX:JOB_PROPS.EST_HRS]

40

System

[SYS:CUR_LOGIN]

Current Windows login

[SYS:CUR_LOGIN]

jbloggs

[SYS:CUR_DATE]

Current date

[SYS:CUR_DATE]

9/25/05

[SYS:CUR_TIME]

Current time

[SYS:CUR_TIME]

7:02PM

[SYS:MACHINE_NAME]

Current machine name

[SYS:MACHINE_NAME]

GIS_EDITOR1

[SYS:CUR_DATABASE]

Current Workflow Manager database (SQL Server)

[SYS:CUR_DATABASE]

sde

[SYS:CUR_SERVER]

Current Workflow Manager database server

[SYS:CUR_SERVER]

WorkflowManager_DB1

[SYS:CUR_INSTANCE]

Current Workflow Manager database instance

[SYS:CUR_INSTANCE]

5151

[SYS:CUR_JTX_USER]

Current Workflow Manager database user

[SYS:CUR_JTX_USER]

Workflow Manager

[SYS:CUR_DATA_USER]

Current Workflow Manager database data user

[SYS:CUR_DATA_USER]

editor1

[SYS:INSTALLDIR]

Current Workflow Manager installation folder

[SYS:INSTALLDIR]

C:\Program Files\WMX

[SYS:REPOSITORY_NAME]

Current Workflow Manager repository's name

[SYS:REPOSITORY_NAME]

WorkflowManager_DB

Function

[EMAILOF(username)]

E-mail of the Workflow Manager user specified

[EMAILOF(jbloggs)]

jbloggs@email.com

[FULLNAMEOF(username)]

Full name of the Workflow Manager user specified

[FULLNAMEOF(jbloggs)]

Joe Bloggs

[PHONEOF(username)]

Phone number of the Workflow Manager user specified

[PHONEOF(jbloggs)]

489-555-7249

[FAXOF(username)]

Fax number of the Workflow Manager user specified

[FAXOF(jbloggs)]

489-555-7241

[GROUPIDSOF(username)]

Group ID list of the Workflow Manager user specified

[GROUPIDSOF(jbloggs)]

12, 15, 19

[GROUPNAMESOF(username)]

Group name list of the Workflow Manager user specified

[GROUPNAMESOF(username)]

Managers, QA/QC, Editors

Spatial Notification

[SN:MATCH_ID]

ID of the match record in the database

[SN:MATCH_ID]

{714A1592-59CC-459E-8D7D-3CC6C90AAF10}

[SN:MATCH_RULE_ID]

ID of the rule triggering the notification

[SN:MATCH_RULE_ID]

{1F5D4B75-DD29-4F53-8AA1-29E90DDE9B24}

[SN:MATCH_RULE_NAME]

Name of the change rule triggering the notification

[SN:MATCH_RULE_NAME]

Airports Edited

[SN:MATCH_RULE_DESC]

Description of the change rule triggering the notification

[SN:MATCH_RULE_DESC]

Notify cartographic team when critical changes are made.

[SN:CHANGE_DATABASE_ID]

Data workspace ID where the edit was made

[SN:CHANGE_DATABASE_ID]

{7541ED02-A61D-4347-B46E-86BDEFB17F93}

[SN:CHANGE_DATABASE_NAME]

Data workspace name in which the edit was made

[SN:CHANGE_DATABASE_NAME]

AeroData

[SN:CHANGE_DATASET]

Dataset name in which the edit was made

[SN:CHANGE_DATASET]

AERODATA.AIRPORTS

[SN:CHANGE_TIME]

Time the edit was made

[SN:CHANGE_TIME]

6/26/2008

[SN:CHANGE_TYPE]

Type of edit made

[SN:CHANGE_TYPE]

Add

[SN:CHANGE_JOB_ID]

Job ID edit associated with

[SN:CHANGE_JOB_ID]

8893

[SN:CHANGE_FEATURE_ID]

Feature GFID (if it exists) or Object ID

[SN:CHANGE_FEATURE_ID]

{3DCFC6FD-E867-4855-8FCB-04F9622B9DE1}

Environment Variable

[ENV:VARIABLE_NAME]

Environment variable value

[ENV:TEMP]

C:\temp

Supported tokens and the parser to which they belong

9/16/2010