[JWF][DOC] COM Object Library Reference

Adobe® Workflow Server

Version 6.2

COM Object Library Reference

© 2003 Adobe Systems Incorporated. All rights reserved.

Adobe® Workflow Server 6.2 COM Object Library Reference for Microsoft® Windows®

August 2003

As of April 12, 2002, Accelio Corporation (formerly JetForm Corporation) was purchased by Adobe Systems

Incorporated. As of that date, any reference to JetForm or Accelio shall be deemed to refer to Adobe Systems

Incorporated.

If this guide is distributed with software that includes an end user agreement, this guide, as well as the software

described in it, is furnished under license and may be used or copied only in accordance with the terms of such license.

Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or

transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written

permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law

even if it is not distributed with software that includes an end user license agreement.

The content of this guide is furnished for informational use only, is subject to change without notice, and should not be

construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or

liability for any errors or inaccuracies that may appear in the informational content contained in this guide.

Please remember that existing artwork or images that you may want to include in your project may be protected under

copyright law. The unauthorized incorporation of such material into your new work could be a violation of the rights of

the copyright owner. Please be sure to obtain any permission required from the copyright owner.

Any references to company names in sample templates are for demonstration purposes only and are not intended to

refer to any actual organization.

Adobe and the Adobe logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United

States and/or other countries.

ActiveX, Microsoft, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the

United States and/or other countries.

All other trademarks are the property of their respective owners.

This software is based in part on the work of the Independent JPEG group. Portions © 1995-1996 Access Softek Inc. All

rights reserved.

This software is based in part on the work of the FreeType team.

Software included in this program may contain an implementation of the LZW algorithm licensed under U.S. Patent

4,558,302.

Portions copyright 1992-1995 Summit Software Company.

Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.

Notice to U.S. Government End Users. The Software and Documentation are “Commercial Items,” as that term is

defined at 48 C.F.R. §2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software

Documentation,” as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48

C.F.R. §12.212 or 48 C.F.R. §§227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software and

Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as

Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and

conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Systems

Incorporated, 345 Park Avenue, San Jose, CA 95110-2704, USA. For U.S. Government End Users, Adobe agrees to

comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as

amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section

503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and

60-741. The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by

reference.

Contents

Contents ................................................................................................................................... 3

Introduction .............................................................................................................................. 9

About This Book....................................................................................................................................... 9

Other Workflow Server Documentation.................................................................................................. 9

1 Object Reference .....................................................................................................................10

Overview of Objects................................................................................................................................ 10

Creating Objects ............................................................................................................................... 11

Include Files ...................................................................................................................................... 11

Common Properties .......................................................................................................................... 11

ActiveConnection....................................................................................................................... 12

Common Methods ............................................................................................................................ 12

Close............................................................................................................................................ 12

Open............................................................................................................................................ 12

Action Object .......................................................................................................................................... 13

Properties .......................................................................................................................................... 13

ActionName................................................................................................................................ 13

ActionType ................................................................................................................................. 13

IsActionUserDriven .................................................................................................................... 14

IsValid ......................................................................................................................................... 14

IsValidAction.............................................................................................................................. 15

IsValidParticipant....................................................................................................................... 15

Participant .................................................................................................................................. 15

Actions Object......................................................................................................................................... 15

Methods ............................................................................................................................................ 16

Validate ....................................................................................................................................... 16

BinaryData Object .................................................................................................................................. 17

Properties .......................................................................................................................................... 17

Size .............................................................................................................................................. 17

Value ........................................................................................................................................... 17

Methods ............................................................................................................................................ 18

AppendChunk ............................................................................................................................. 18

GetChunk ................................................................................................................................... 18

LoadFromFile .............................................................................................................................. 18

WriteToFile................................................................................................................................. 19

Contents 4

1 Object Reference (Continued)

Connection Object.................................................................................................................................. 19

Properties .......................................................................................................................................... 19

ConnectionString ........................................................................................................................ 19

Errors .......................................................................................................................................... 21

FormPaths................................................................................................................................... 21

Properties.................................................................................................................................... 22

ServerName ................................................................................................................................ 22

State............................................................................................................................................. 23

XMLFormat................................................................................................................................ 23

Methods ............................................................................................................................................ 24

Open............................................................................................................................................ 24

Close............................................................................................................................................ 24

Execute........................................................................................................................................ 24

StartAgent ................................................................................................................................... 25

StopAgent ................................................................................................................................... 25

DateTime Object..................................................................................................................................... 25

Properties .......................................................................................................................................... 26

Value ........................................................................................................................................... 26

Error Object ............................................................................................................................................ 26

Properties .......................................................................................................................................... 26

Description ................................................................................................................................. 26

NativeError ................................................................................................................................. 27

Number....................................................................................................................................... 27

Source.......................................................................................................................................... 27

SQLState...................................................................................................................................... 27

Errors Collection..................................................................................................................................... 28

Properties .......................................................................................................................................... 28

Count .......................................................................................................................................... 28

Methods ............................................................................................................................................ 28

Clear ............................................................................................................................................ 28

Item ............................................................................................................................................. 29

Field Object ............................................................................................................................................. 29

Properties .......................................................................................................................................... 29

Name........................................................................................................................................... 29

Value ........................................................................................................................................... 30

Fields Collection ..................................................................................................................................... 30

Properties .......................................................................................................................................... 30

Count .......................................................................................................................................... 30

Methods ............................................................................................................................................ 31

Item ............................................................................................................................................. 31

FormContent Object ............................................................................................................................... 31

Properties .......................................................................................................................................... 31

Content ....................................................................................................................................... 31

ContentType............................................................................................................................... 32

Type............................................................................................................................................. 32

Contents 5

1 Object Reference (Continued)

FormTypes Collection ............................................................................................................................. 32

Properties .......................................................................................................................................... 33

ContainsOnlyEMailForms......................................................................................................... 33

ContainsWebForms .................................................................................................................... 33

Count .......................................................................................................................................... 33

Methods ............................................................................................................................................ 34

Append........................................................................................................................................ 34

Contains...................................................................................................................................... 34

Item ............................................................................................................................................. 34

Remove ....................................................................................................................................... 35

IFormData Interface ............................................................................................................................... 35

Methods ............................................................................................................................................ 36

GetData ....................................................................................................................................... 36

GetField....................................................................................................................................... 36

GetXML ...................................................................................................................................... 37

SetData ........................................................................................................................................ 37

SetField........................................................................................................................................ 37

SetXML ....................................................................................................................................... 38

JetFormXFAData Object ......................................................................................................................... 38

ProcessInstances Object .......................................................................................................................... 38

Methods ............................................................................................................................................ 39

Terminate.................................................................................................................................... 39

Properties Collection ............................................................................................................................... 39

Properties .......................................................................................................................................... 39

Count .......................................................................................................................................... 39

Methods ............................................................................................................................................ 40

Item ............................................................................................................................................. 40

Property Object....................................................................................................................................... 40

Properties .......................................................................................................................................... 40

Name........................................................................................................................................... 40

Value ........................................................................................................................................... 41

Recordset Object..................................................................................................................................... 41

Properties .......................................................................................................................................... 41

EOF ............................................................................................................................................. 41

Fields ........................................................................................................................................... 42

Source.......................................................................................................................................... 42

Methods ............................................................................................................................................ 42

Open............................................................................................................................................ 42

Close............................................................................................................................................ 43

Collect ......................................................................................................................................... 43

Move ........................................................................................................................................... 43

MoveNext ................................................................................................................................... 44

Contents 6

1 Object Reference (Continued)

Repository Object ................................................................................................................................... 44

Methods ............................................................................................................................................ 44

Add.............................................................................................................................................. 44

CreateNewVersion ...................................................................................................................... 45

CreateNode................................................................................................................................. 45

Delete .......................................................................................................................................... 46

GetFullObjectPath...................................................................................................................... 46

GetNode...................................................................................................................................... 46

SetApplicationState ..................................................................................................................... 47

RepositoryNode Object ........................................................................................................................... 47

Properties .......................................................................................................................................... 48

DateCreated ................................................................................................................................ 48

DateUpdated............................................................................................................................... 48

FullPath....................................................................................................................................... 48

NodeID ....................................................................................................................................... 48

NodeName.................................................................................................................................. 49

Type............................................................................................................................................. 49

Value ........................................................................................................................................... 49

StartTasks Object .................................................................................................................................... 50

Methods ............................................................................................................................................ 50

CreateProcessInstance................................................................................................................ 50

StatelessWorkItemData Object ............................................................................................................... 51

Methods ............................................................................................................................................ 52

AddAttachment ........................................................................................................................... 52

Begin............................................................................................................................................ 52

Cancel.......................................................................................................................................... 53

Complete..................................................................................................................................... 53

DeleteAttachment....................................................................................................................... 54

UpdateAttachment..................................................................................................................... 54

User Object.............................................................................................................................................. 54

Properties .......................................................................................................................................... 55

DisplayName ............................................................................................................................... 55

UserID......................................................................................................................................... 55

Users Object ............................................................................................................................................ 55

Methods ............................................................................................................................................ 56

Add.............................................................................................................................................. 56

Remove ....................................................................................................................................... 56

SetCustomField ........................................................................................................................... 57

SetCustomFields......................................................................................................................... 57

SetDefaultWorklist ...................................................................................................................... 58

SetDisplayName .......................................................................................................................... 58

SetEMailAddress......................................................................................................................... 58

SetEMailNotification.................................................................................................................. 59

SetLastAccess ............................................................................................................................... 59

SetLink ........................................................................................................................................ 60

SetLogin ...................................................................................................................................... 60

Contents 7

1 Object Reference (Continued)

Users Object (Continued)

Methods (Continued)

SetLoginPassword....................................................................................................................... 61

SetOutOfOffice........................................................................................................................... 61

SetPermission .............................................................................................................................. 62

SetPermissions............................................................................................................................ 62

SetPreferredEMailForms............................................................................................................ 63

SetPreferredWebForms.............................................................................................................. 63

SetSysLogin ................................................................................................................................. 64

SetUserPreferences ...................................................................................................................... 64

Update......................................................................................................................................... 65

WorkItemData Object............................................................................................................................ 65

Methods ............................................................................................................................................ 66

AddAttachment ........................................................................................................................... 66

BeginSubmit ............................................................................................................................... 66

CancelSubmit .............................................................................................................................. 66

DeleteAttachment....................................................................................................................... 67

Submit......................................................................................................................................... 67

UpdateAttachment..................................................................................................................... 68

WorkItems Object .................................................................................................................................. 68

Methods ............................................................................................................................................ 69

GetWebForm.............................................................................................................................. 69

LockWorkItem ............................................................................................................................ 69

MergeWebForm .......................................................................................................................... 70

ProcessWebForm ........................................................................................................................ 71

ResetDeadline .............................................................................................................................. 72

SendEMail................................................................................................................................... 72

UnlockWorkItem....................................................................................................................... 72

WriteWebForm ........................................................................................................................... 73

WorklistShares Object ............................................................................................................................. 74

Methods ............................................................................................................................................ 74

Add.............................................................................................................................................. 74

Remove ....................................................................................................................................... 74

SetUser ........................................................................................................................................ 74

SetWorklist ................................................................................................................................. 75

WWWFormData Object ......................................................................................................................... 75

XMLData Object..................................................................................................................................... 75

Methods ............................................................................................................................................ 76

GetXFAModel............................................................................................................................. 76

SetXFAModel.............................................................................................................................. 76

Contents 8

2 Tables........................................................................................................................................77

Object Library SQL ................................................................................................................................. 77

SQL Syntax Definition...................................................................................................................... 77

Object Library Tables.............................................................................................................................. 79

Actions Table .................................................................................................................................... 79

ActionParticipants Table................................................................................................................... 79

Applications Table............................................................................................................................ 80

Attachments Table............................................................................................................................ 80

Processes Table ................................................................................................................................. 81

ProcessInstances Table ...................................................................................................................... 82

RepositoryTypes Table ...................................................................................................................... 83

Repository Table............................................................................................................................... 84

RoleSets Table ................................................................................................................................... 85

SearchData Table ............................................................................................................................... 85

SearchFields Table ............................................................................................................................. 85

StartTasks Table................................................................................................................................ 86

Users Table........................................................................................................................................ 86

WorkItems Table.............................................................................................................................. 88

WorklistShares Table......................................................................................................................... 92

Agent Errors ............................................................................................................................................ 92

3 Using the Objects ....................................................................................................................94

Using the Workflow Server Query Objects ............................................................................................ 94

Creating and Using a Connection .................................................................................................... 94

Creating and Using a Recordset........................................................................................................ 95

Using the SQL Query Model................................................................................................................... 97

Work Item Queries........................................................................................................................... 97

Using the StartTasks and WorkItemData Objects ................................................................................. 99

Creating a Process Instance............................................................................................................... 99

Retrieving a Work Item................................................................................................................... 100

Work Item Attachments.................................................................................................................. 101

Completing a Work Item ................................................................................................................ 102

Using the Data Management Objects ................................................................................................... 104

Setting User Preferences ........................................................................................................................ 105

4 Web Access .............................................................................................................................106

ASP Source Code .................................................................................................................................. 106

Implementation Structure..................................................................................................................... 106

Startpoint and Menu Bar ................................................................................................................ 106

Authentication ................................................................................................................................ 107

Work Item Queries......................................................................................................................... 107

Process Initiation ............................................................................................................................. 107

Opening and Completing a Work Item ......................................................................................... 107

User Preferences .............................................................................................................................. 107

Logging Out .................................................................................................................................... 107

Language-Specific Content ............................................................................................................. 108

Index......................................................................................................................................109

Introduction

ABOUT THIS BOOK

The Adobe® Workflow Server Object Library exposes the Adobe Workflow Server application

programming interface (API). It is a set of COM objects for use in developing front-end applications for

accessing Adobe Workflow Server Agent capabilities.

The Object Library is the program interface between a Web application, such as Adobe Workflow Server

Web Access, and the Workflow Agent business process services. It resides on the Web server. Through the

Object Library, Web applications interact with Workflow Agent to allow users to initiate and participate

in processes throughout their lifecycle.

You can use the COM objects to build Web front ends or use third-party portal products that integrate

processes, yet are tailored to their specific needs. For example, you can display work lists and forms to

users within a corporate information portal.

Through the Object Library, your applications have access to the Workflow Agent functionality. For

example, you can:

• Initiate a process as a particular user. Workflow Agent processes the data according to the business

rules defined in the process map.

• Retrieve the work list for a particular user. The application can then either display the list so that the

end user can select a work item or act on the item.

• Create new users.

• Search for specific work items and report business process statistics.

• Deploy new applications.

This guide provides reference information on the Workflow Server API objects, methods, and

properties.The guide is intended for developers with a good knowledge of the Workflow Server and the

application development process using Microsoft® Active Server Pages (ASP), HTML, Microsoft

VBScript, and Microsoft JScript.

OTHER WORKFLOW SERVER DOCUMENTATION

Other guides tailored to specific audiences are also available. To locate the complete suite of Workflow

Server documentation, in Microsoft Windows® click Start > Programs > Adobe Workflow Server 6.2 >

Online Documentation.

1 Object Reference

This section provides a complete reference to all of the objects in the Workflow Server Object Library.

OVERVIEW OF OBJECTS

The Workflow Server API contains the following interfaces, objects, and collections:

• Connection and recordset objects and collections:

– Connection Object

– Error Object

– Errors Collection

– Field Object

– Fields Collection

– Property Object

– Properties Collection

– Recordset Object

• Process objects and collection:

– Action Object

– Actions Object

– FormContent Object

– FormTypes Collection

– ProcessInstances Object

– Repository Object

– RepositoryNode Object

– StartTasks Object

– StatelessWorkItemData Object

– Users Object

– WorkItemData Object

– WorkItems Object

– WorklistShares Object

Object Reference Overview of Objects 11

• Field value objects:

– DateTime Object

– User Object

• Data management interface and objects:

– IFormData Interface

– BinaryData Object

– WWWFormData Object

– XMLData Object

Creating Objects

The COM objects are exposed through the EPSDK program identifier. For example, EPSDK.Connection

is the version-independent program identifier for the Connection object. The automation code to create

this object is as follows:

CreateObject("EPSDK.Connection")

Several objects and collections cannot be created this way, because they can only be used as the objects

returned by a property or method. Where this is the case, they are identified with a Note in this guide.

Include Files

The include files ePSDKOLjs.inc for JScript scripts and ePSDKOLvbs.inc for VBScript scripts define the

constants used in the Object Library. The files are located in the installation directory. For backward

compatibility, the files IntegrateOLjs.inc and IntegrateOLvbs.inc are also available.

For example, some of the possible values for the ActionType property of the Action object are:

• -1 - itActionUnknown

• 0 - itActionCustom

• 1 - itActionDelegate

The constants (the alphabetic values) are specified in the include files. Therefore you can use either the

number or the constant to refer to the same value.

Common Properties

The following objects have the common ActiveConnection property: Actions, ProcessInstances,

Repository, StartTasks, StatelessWorkItemData, Users, WorkItemData, WorkItems, and WorklistShares.

Object Reference Overview of Objects 12

ActiveConnection

This is the open Connection object used to access the Workflow Agent. The default value for this property

is null.

Type

Variant

Access

Read-write until opened. Once open, it is read-only.

Common Methods

The following objects have the common methods Open and Close: Actions, ProcessInstances, Repository,

StartTasks, StatelessWorkItemData, Users, WorkItemData, WorkItems, and WorklistShares.

Close

This method closes an open connection to the Workflow Agent.

Syntax

Close()

Return Type

None

Open

This method opens the connection to the Workflow Agent.

Syntax

Open(Variant connect)

Return Type

None

Parameter Description

connect If the connect parameter is a connection string, a Connection object is created and

opened using this string. The object is assigned to the ActiveConnection property.

Object Reference Action Object 13

ACTION OBJECT

The Action object is returned from the Validate method of the Actions object and represents the validated

action for a particular task. If the IsValid property is True, the value of Action.Participant can be used in

the Submit method of the WorkItemData object.

For the consult, delegate, and nominate actions, it also represents the participant for the work item. The

participant can be used in the Submit method of the WorkItemData object.

Note You cannot create this object with the CreateObject method.

Properties

ActionName

ActionType

IsActionUserDriven

IsValid

IsValidAction

IsValidParticipant

Participant

Methods

(none)

Properties

ActionName

This property is the name of the validated action if IsValidAction is True. It is empty when there are no

actions specified for the task and the ActionType is itActionUnknown.

Type

String

Access

Read-only

ActionType

The type of action, one of:

• -1 - itActionUnknown

• 0 - itActionCustom

• 1 - itActionDelegate

• 2 - itActionConsult

• 3 - itActionNominate

Object Reference Action Object 14

Type

ITActionType enumeration

Access

Read-only

IsActionUserDriven

This property is True if the ActionType values are:

• itActionConsult

• itActionDelegate

• itActionNominate

Type

Boolean

Access

Read-only

IsValid

This property is True if this object contains only valid data. It is set according to the following condition:

IsValid = IsValidAction && (IsActionUserDriven ? IsValidParticipant : true)

This condition can also be expressed as follows:

• If IsValidAction is False, make IsValid False.

• If IsValidAction is True and IsActionUserDriven is False, make IsValid True.

• If IsValidAction is True and IsActionUserDriven is True, make IsValid True if IsValidParticipant is

True.

• If IsValidAction is True and IsActionUserDriven is True, make IsValid False if IsValidParticipant is

False.

Type

Boolean

Access

Read-only

Object Reference Actions Object 15

IsValidAction

This property is True if the action name provided to the Validate method of the Actions object was a valid

action for the work item.

Type

Boolean

Access

Read-only

IsValidParticipant

This property is True if the participant provided to the Validate method of the Actions object is a valid

participant for the work item. The property is False if the ActionType value is itActionCustom, a non-user

driven action type.

Type

Boolean

Access

Read-only

Participant

This property is the validated participant for the user-driven action if IsValidParticipant is True.

Type

EPSDK.User

Access

Read-only

ACTIONS OBJECT

The Actions object is used to validate a work item action. For more information, see the Action column in

“Actions Table” on page 79, and the ActionTaken column in “WorkItems Table” on page 88. If the action

is nominate, delegate, or consult, it also validates the participant for the action. For more information, see

the Participant column in “ActionParticipants Table” on page 79.

The Action object returned by the Validate method can be used in the Submit method of the

WorkItemData object.

Object Reference Actions Object 16

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

Properties

ActiveConnection

Methods

Close

Open

Validate

Methods

Validate

This method is called to validate the action for a work item. This method always returns an

EPSDK.Action object. If the IsValid property of the Action object is True, the validation was successful. A

successful validation means that the supplied parameters are sufficient for completing the work item via

the Submit method of the WorkItemData object.

Syntax

Validate(String referenceID [,String actionName] [,Variant participant])

Return Type

EPSDK.Action

Parameter Description

referenceID The reference ID of the work item that the action is being validated against.

actionName Optional. The name of the action to be validated. If an empty string is passed, the

validation can still succeed if there is precisely zero or one possible action. The

validated action can be retrieved from the ActionName property of the Action object.

participant Optional. The participant to validate for a nominate, delegate, and consult action. An

empty string is passed if the ActionName is not a nominate, delegate, or consult action,

or if there is only one possible participant for the action. The validated participant can

be retrieved from the Participant property of the Action object.

This parameter can be one of the following:

• A user identifier.

• A user’s display name. If the display name is not unique, then Action.IsValid will be

False. If you are in an environment using non-unique display names, use another

way to identify users.

• An EPSDK.User object.

Object Reference BinaryData Object 17

BINARYDATA OBJECT

The BinaryData object holds arbitrary binary data, and can read to and from a file. It is used to hold data,

such as work item attachments.

Properties

Size

Value

Methods

AppendChunk

GetChunk

LoadFromFile

WriteToFile

Properties

Size

This property returns the number of bytes in the data.

Type

Long

Access

Read-only

Value

This property returns an array of bytes containing all the data. If the data is large (greater than 32K), use

the AppendChunk and GetChunk methods instead of accessing all the data at once.

Type

Variant

Access

Read-write

Object Reference BinaryData Object 18

Methods

AppendChunk

This method appends a chunk of binary data. To save a large amount of data, call this method repeatedly.

Syntax

AppendChunk(Variant buffer)

Return Type

None

GetChunk

This method returns the next segment of binary data. This method should be called repeatedly to read a

large amount of data in smaller-sized chunks. The method returns the number of bytes of data actually

read. When all the data is read, it returns 0.

Syntax

GetChunk(Long nBytes, Variant buffer)

Return Type

Long

LoadFromFile

This method reads the binary data from a file.

Syntax

LoadFromFile(String fileName)

Return Type

None

Parameter Description

buffer An array of bytes which are appended to the current data value.

Parameter Description

nBytes The number of bytes to read into the buffer.

buffer Up to nBytes of data is read into the buffer as an array of bytes.

Parameter Description

fileName The name of the file containing data to load.

Object Reference Connection Object 19

WriteToFile

This method writes the binary data to a file. The file is automatically created or overwritten.

Syntax

WriteToFile(String fileName)

Return Type

None

CONNECTION OBJECT

This object is used to create a connection for communicating with the Workflow Agent.

Properties

ConnectionString

Errors

FormPaths

Properties

ServerName

State

XMLFormat

Methods

Open

Close

Execute

StartAgent

StopAgent

Properties

ConnectionString

This property is the connection string to use when opening a connection to the Workflow Agent. This

property is read-write when the connection is closed, and read-only when the connection is open. This is

the default property of the Connection object.

The format of the connection string is:

<NAME>=<VALUE>;<NAME>=<VALUE>;...

Parameter Description

fileName The name of the file for writing data.

Object Reference Connection Object 20

where the following are valid names and values:

A semicolon must separate the <NAME>=<VALUE> pairs, therefore semicolon characters must not be in

any of the NAMEs or VALUEs.

Name Value Default and Notes

DSN <data source name> The DSN and DRIVER parameters are mutually

exclusive. They cannot be used in the same

connection string, but the connection string must

contain one of them.

DRIVER {Adobe Workflow Server Driver}

SERVER <server name> SERVER=localhost

If the Workflow Agent is remote and the StartAgent

or StopAgent method will be used, the value must be

set explicitly.

MSLOGON Enabled or Disabled MSLOGON=Enabled (except if UID and PWD are

specified, then MSLOGON=Disabled is assumed)

The MSLOGON=Enabled parameter is mutually

exclusive to the UID and PWD parameters.

UID <Workflow Agent user name>

PWD <Workflow Agent password>

CLASS <classname> A Workflow Agent can belong to one or more classes.

The CLASS attribute allows you to specify access

groupings (classes) to your Workflow Agents.

The built-in class Background identifies Workflow

Agents that are responsible for processing

non-interactive work (with the exception of reading

and writing e-mail).

For example, suppose you also have a class named

Foreground in your Workflow Agent cluster, and the

servers in this class are Server1, Server2, and Server3.

If the connection string specifies

SERVER=Server1;CLASS=Foreground, the ODBC

driver will receive and save the names of the servers in

the Foreground class, and will use only one of these

servers for the connection.

If a Web Farm was configured with Object Library

instances that used connections with CLASS=

Foreground, then only the Workflow Agents in this

class would be used to support the farm. The

Workflow Agents in the Background class would be

left alone to do the internal workflow work.

Note that this is a load control feature, not a security

feature. If this parameter is omitted, then the

connection is made to the Workflow Agent identified

by the SERVER parameter, regardless of the class of

that server.

Object Reference Connection Object 21

Type

String

Access

Read-write

Example

To connect to the “dragon” server as user “Tony” with password “blue”, use the following connection

string:

DRIVER={Adobe Workflow Server Driver};SERVER=dragon;UID=Tony;PWD=blue

Errors

This collection contains EPSDK.Error objects for any errors that occurred during the connection process.

Type

EPSDK.Errors collection

Access

Read-only

FormPaths

This property returns or sets a string that represents the location of form templates for all types of forms.

All forms-related functions require that this property has an assigned value. If there is no value for a type

of form, it is assumed that no forms are available for that type.

Note By default, no value is set for the location of each type of form. You must provide values for this

property to use forms-related functions.

This property requires a string parameter that contains the type of form.

Syntax

Connection.formPaths(String FormType);

FormType can have one of the following values:

FormType Value Description

HTML HTML form.

FormClient Adobe Form Client form.

FormServer Forms that Adobe Form Server generates from templates.

PDF PDF forms.

Object Reference Connection Object 22

Type

String.

Access

Read-write.

Properties

This collection contains EPSDK.Property objects that describe the connection.

The collection is empty until the connection is opened. Then, the collection contains the following

Property objects:

Type

EPSDK.Properties collection

Access

Read-only

ServerName

This property returns the name of the computer on which the Object Library is installed. This may be

different from the Workflow Agent server name.

Object name Description

User EPSDK.User object representing the user currently logged on.

User ID The identifier of the user currently logged on. This identifier is also available from the

UserID property of the User object.

E-Mail Type The type of e-mail system that Workflow Agent is using. This is a string value containing

one of:

• None

• MS Exchange

• Notes

• SMTP/POP3

Agent Version The version of the Workflow Agent that is connected.

Agent State The state of the Workflow Agent that is connected. Only users with system administrator

permissions can query this property. The string value contains one of the following:

• INITIALIZING

• RUNNING

• READONLY

• PEND_READONLY

• STOPPING

Object Reference Connection Object 23

Type

String

Access

Read-only

State

This property shows the current state of the connection. A connection must be open before any

operations can be performed against it, such as executing a query. For more information, see “Execute”

on page 24 and “Open” on page 12.

ITConnectionState is one of:

• 0 - itConnectionStateClosed

• 1 - itConnectionStateOpen

Type

ITConnectionState

Access

Read-only

XMLFormat

This property returns the format of the XML data to be retrieved from the Workitems.XMLData

property. Its value is one of the following:

• 1 - itXMLFormat

• 2 - itXPFFormat (the default)

If it is set to itXMLFormat, then Workitems.XMLData will be in native XML format and contain acwf:

format work item fields.

If it is set to itXPFFormat, then Workitems.XMLData will be in XPF format (the legacy, proprietary XML

format) and contain JFWF_ format work item fields.

Changing this value does not change the format of work items that have already been queried.

To change the format of a work item by changing this property, you must execute the query using the

Connection.Execute method. If you use Recordset.Open, the default format of the work item is used.

Type

Long

Access

Read-write.

Object Reference Connection Object 24

Methods

Open

This method opens the connection to the Workflow Agent:

• If the method is called without parameters, the ConnectionString property is used.

• If the method is called with the connectString parameter, that string is assigned to the

ConnectionString property and is used to establish the connection.

Syntax

Open([String connectString] [,String userID] [,String password])

The semicolon character cannot be in a userID or password because that character is reserved for

separating the <NAME>=<VALUE> pairs in the ConnectionString property.

Return Type

None

Close

This method closes an open connection and releases all resources held by the Connection object.

Syntax

Close()

Return Type

None

Execute

This method executes the query statement and returns a Recordset for that query. The connection must

be open before calling this method.

Syntax

Execute(String query)

Parameter Description

connectString Optional. The connection string to use. The default is the value of the

ConnectionString property.

userID Optional. The name of a user to use for authentication. It overrides the UID parameter

in the ConnectionString property.

password Optional. The password for the user to use for authentication. It overrides the PWD

parameter in the ConnectionString property.

Parameter Description

query The SQL query to execute. See “SQL Syntax Definition” on page 77.

Object Reference DateTime Object 25

Return Type

EPSDK.Recordset

StartAgent

This method starts the Workflow Agent service. If it is successful, it returns True.

You still must open the connection with the Open method.

This method cannot be used if the virtual directory allows anonymous access in your Web environment.

Syntax

StartAgent()

Return Type

Boolean

StopAgent

This method stops the Workflow Agent service. If it is successful, it returns True.

An open connection must exist before calling this method. Calling the method closes the connection

before stopping the service.

This method cannot be used if the virtual directory allows anonymous access in your Web environment.

Syntax

StopAgent()

Return Type

Boolean

DATETIME OBJECT

This object is used for date and time values in the Field objects.

Properties

Value

Methods

(none)

Object Reference Error Object 26

Properties

Value

This property returns the unformatted date/time value. This is the default property of the object.

Type

Date

Access

Read-write

ERROR OBJECT

This object describes a particular Workflow Agent error. For details, see “Agent Errors” on page 91.

Note You cannot create this object with the CreateObject method.

Properties

Description

NativeError

Number

Source

SQLState

Methods

(none)

Properties

Description

This property is a short description of the error.

Type

String

Access

Read-only

Object Reference Error Object 27

NativeError

This property returns a database-specific error code for this Error object.

Type

Long

Access

Read-only

Number

This property returns a unique number identifying this Error object.

Type

Long

Access

Read-only

Source

This property returns the name of the object or application that generated the error.

Type

String

Access

Read-only

SQLState

This property returns the SQL state for this Error object.

Type

String

Access

Read-only

Object Reference Errors Collection 28

ERRORS COLLECTION

This is a collection of errors that occur in the Workflow Agent during the connection process. For details,

see “Agent Errors” on page 91.

This collection supports the COM enumerator method for Automation runtime environments such as

VisualBasic, VBScript, and JScript. This method cannot be directly called from COM Automation.

Note You cannot create this collection with the CreateObject method.

Properties

Count

Methods

Clear

Item

Properties

Count

This property returns the number of items in the collection.

Type

Long

Access

Read-only

Methods

Clear

This method clears the collection and resets the Count property to 0.

Syntax

Clear()

Return Type

None

Object Reference Field Object 29

Item

This method returns a particular Error object from the collection. The collection is 0-based and a runtime

error occurs if an index outside the range of the collection is requested.

Syntax

Item(Long index)

Return Type

EPSDK.Error

FIELD OBJECT

The Field object is used to retrieve data from the Recordset object during rowset navigation. It is usually

more efficient to get the field value using the Collect method of the Recordset object.

Note You cannot create this object with the CreateObject method.

Properties

Name

Value

Methods

(none)

Properties

Name

This property returns the name of the field.

Type

String

Access

Read-only

Parameter Description

index The position within the collection of the particular error to retrieve.

Object Reference Fields Collection 30

Value

This property is the default property of the object. The actual type of the variant depends on the type

definition of the referenced column, as described in “Object Library Tables” on page 79.

Type

Variant

Access

Read-only

FIELDS COLLECTION

This collection defines the set of Field objects that retrieve data from an open Recordset object.

This collection supports the COM enumerator method for Automation run-time environments such as

VisualBasic, VBScript, and JScript. This method cannot be directly called from COM Automation.

Note You cannot create this collection with the CreateObject method.

Properties

Count

Methods

Item

Properties

Count

This property returns the number of Field objects in the collection.

Type

Long

Access

Read-only

Object Reference FormContent Object 31

Methods

Item

This method returns the Field object from the collection as specified by the index parameter. The

collection is zero-based and a run-time error occurs if an index outside the range of the collection is

requested.

Syntax

Item(Variant index)

Return Type

EPSDK.Field

FORMCONTENT OBJECT

This object is returned from the GetWebForm method or the MergeWebForm method of the WorkItems

object and encapsulates the form (with merged work item data) that can be presented to a Web user to

complete the work item.

Note You cannot create this object with the CreateObject method.

Properties

Content

ContentType

Type

Methods

(none)

Properties

Content

This property returns a byte array suitable for use with the ASP Response.BinaryWrite method and the

HTTP Content response.

Parameter Description

index One of the following:

• A long value between 0 and Count - 1.

• The Name property of the Field object.

Object Reference FormTypes Collection 32

Type

IFormData

Access

Read-only

ContentType

This property returns the MIME content type of the form content suitable for use with the ASP

Response.ContentType property and the HTTP Content-Type header tag.

Type

String

Access

Read-only

Type

This property returns the type of form that was generated by the GetWebForm method or the

MergeWebForm method of the WorkItems object:

• HTML - an HTML form.

• FormClient - a Form Client form.

• PDF - a PDF form.

• FormServer - Any valid Form Server form.

Type

Variant

Access

Read-only

FORMTYPES COLLECTION

This collection is returned as the field value from the FormTypes column in the WorkItems table, and the

PreferredWebForms and PreferredEMailForms columns in the Users table.

This collection supports the COM enumerator method for Automation runtime environments such as

Visual Basic, VBScript, and JScript. This method cannot be directly called from COM Automation.

Object Reference FormTypes Collection 33

Properties

ContainsOnlyEMailForms

ContainsWebForms

Count

Methods

Append

Contains

Item

Remove

Properties

ContainsOnlyEMailForms

This property returns True when the collection contains only e-mail form types.

Type

Boolean

Access

Read-only

ContainsWebForms

This property returns True when the collection contains at least one Web form type.

Type

Boolean

Access

Read-only

Count

This property returns the number of form types in the collection.

Type

Long

Access

Read-only

Object Reference FormTypes Collection 34

Methods

Append

This method appends the given formType parameter to the collection.

Syntax

Append(ITFormType formType)

Return Type

None

Contains

This method determines if the given parameter is in the collection. It returns either a 0-based index of the

found formType, or -1 if the formType parameter does not exist in the collection.

Syntax

Contains(ITFormType formType)

Return Type

Long

Item

This default method returns the indicated form type based on its index within the 0-based collection. A

run-time error occurs if an item outside the range in the collection is requested. Possible values are:

• itUnknownForm - 0

• itHTMLForm - 1

• itFormClientForm - 3

• itFormClient4HandheldForm - 6

• itFormServerForm - 7

• itPDFForm - 8

• itNativePDFForm - 9

Parameter Description

formType The form type to append.

Parameter Description

formType The form type to look for in the collection.

Object Reference IFormData Interface 35

The following values are for backward compatibility:

• itFormFlow99Form - 3

• itCaptureClientForm - 3

• itPocketForm - 6

• itCaptureHandheldForm - 6

• itReachForm - 7

• itCaptureWebForm - 7

Syntax

Item(Long index)

Return Type

ITFormType

Remove

This method removes a form type from the collection based on its index within the collection.

Syntax

Remove(Long index)

Return Type

None

IFORMDATA INTERFACE

The IFormData interface defines how the Object Library deals with form data. This interface is

implemented by the following form data objects:

• XMLData for XML data files.

• JetFormXFAData object for XML Forms Architecture (XFA) data files. This object will not be

available in future releases, as it has been replaced by the XMLData object.

• WWWFormData object for data encoded in the MIME format application/x-www-form-urlencoded

data.

Parameter Description

index The index of the form type to return.

Parameter Description

index The index of the form type to remove.

Object Reference IFormData Interface 36

Form fields can be manipulated using the GetField and SetField methods. These methods search for the

first occurrence of the named field in the data, and will search all pages and subforms.

Objects implementing this interface can provide data in its native format using the SetData and GetData

methods, and in XML using the SetXML and GetXML methods. Any object implementing this interface

can be used as the data parameter to the Submit method of the WorkItemData object.

Complex data navigation is achieved using the XFA Data Model. For more information, see “XMLData

Object” on page 75.

Properties

(none)

Methods

GetData

GetField

GetXML

SetData

SetField

SetXML

Methods

GetData

This method returns a BinaryData object containing the native format of the data.

Syntax

GetData()

Return Type

BinaryData

GetField

This method gets the value of the named data field. Returns either the string value of the field, or null if

the field is not found.

Syntax

GetField(String name)

Parameter Description

name The name of the field to find in the data.

Object Reference IFormData Interface 37

Return Type

Variant

GetXML

This method gets the XML representation of the data.

Syntax

GetXML()

Return Type

Variant

SetData

This method sets the native data.

Syntax

SetData(EPSDK.BinaryData data)

Return Type

None

SetField

This method sets the value of the named data field to the supplied data value. If the field does not exist,

then it is added.

Syntax

SetField(String name, String value)

Return Type

None

Parameter Description

data A BinaryData object containing the native format of the data.

Parameter Description

name The name of the field.

value The value to set.

Object Reference JetFormXFAData Object 38

SetXML

This method sets the XML data.

Syntax

SetXML(String data)

Return Type

None

JETFORMXFADATA OBJECT

This object implements the IFormData interface. It is used when processing XML Forms Architecture

(XFA) data files. The object is returned by the XMLData column in the WorkItems table, and can be used

as the data parameter to the Submit method of the WorkItemData object.

This object has no methods or properties of its own.

Note This object is being phased out and will not be available in future releases. Use XMLData instead.

PROCESSINSTANCES OBJECT

This object is used to manipulate process instances. For more information, see “ProcessInstances Table”

on page 82, and the “CreateProcessInstance” on page 50.

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

Properties

ActiveConnection

Methods

Close

Open

Terminate

Parameter Description

data The XML data to set as a string.

Object Reference Properties Collection 39

Methods

Terminate

This method is used to terminate process instances.

Syntax

Terminate(Variant instanceID)

Return Type

None

PROPERTIES COLLECTION

This collection contains all the Property objects for a connection.

This collection supports the COM enumerator method for Automation run time environments such as

VisualBasic, VBScript, and JScript. This method cannot be directly called from COM Automation.

Note You cannot create this collection with the CreateObject method.

Properties

Count

Methods

Item

Properties

Count

This property returns the number of Property objects contained in the Properties collection.

Type

Long

Access

Read-only

Parameter Description

instanceID The process instances to terminate:

• An instance ID. For more information, see the InstanceID column in

“ProcessInstances Table” on page 82, and in “WorkItems Table” on page 88.

• An array of instance identifiers.

Object Reference Property Object 40

Methods

Item

This default method returns the Property object referenced by index.

Syntax

Item(Variant index)

Return Type

EPSDK.Property

PROPERTY OBJECT

This object represents the dynamic characteristics of the Connection object.

Note You cannot create this object with the CreateObject method.

Properties

Name

Value

Methods

(none)

Properties

Name

This property identifies the object. The Name property can index the Item method of the Properties

collection.

Type

String

Access

Read-only

Parameter Description

index Select the appropriate member of the collection, which can be one of the following:

• A long value representing a numeric index into the 0-based collection.

• A string value referring to the name of the Property object. See the description of

the Connection.Properties collection on “Properties” on page 22 for the list of

property names.

Object Reference Recordset Object 41

Value

This property is the object’s default property. It contains the Property setting.

Type

Variant

Access

Read-only

RECORDSET OBJECT

This object is used to navigate a read-only, forward-only recordset.

This object supports the following common property: ActiveConnection. See “Common Properties” on

page 11.

Properties

ActiveConnection

EOF

Fields

Source

Methods

Close

Collect

Move

MoveNext

Open

Properties

EOF

This property value is True if the recordset is positioned at the end.

Type

Boolean

Access

Read-only

Object Reference Recordset Object 42

Fields

This collection retrieves data for each field that is defined in the query statement’s column-list after a

Recordset is open.

Type

EPSDK.Fields

Access

Read-only

Source

This property returns the query statement to execute when the recordset is opened. This property is

read-write until the recordset is opened. When opened, it is read-only. See “Object Library Tables” on

page 79.

Type

String

Access

Read-write

Methods

Open

This method executes a query statement using the specified connection.

Syntax

Open([String query] [,Variant connection])

Return Type

None

Parameter Description

query Optional. The SQL query string to execute. The default is the Source property value.

connection Optional. The Workflow Agent connection to use. One of the following:

• A connection string. For more information, see “ConnectionString” on page 19.

• A Connection object. If the XMLFormat property of a Connection object is used to

query a non-default format of XMLData, that Connection object must be

specified.

Object Reference Recordset Object 43

Close

This method closes an open Recordset.

Syntax

Close()

Return Type

None

Collect

This method provides an efficient way to retrieve the value of a field from the Fields collection. The

following two lines of code are equivalent:

value = Recordset.Collect(Index)

value = Recordset.Fields.Item(Index).Value

This methods returns the Value property of the Field object for the referenced field.

Syntax

Collect(Variant index)

Return Type

Variant

Move

This method moves the position to the nth record starting from the current record in the Recordset. For

example, if the Recordset is currently on record 5, then Move(10) will position to record 15.

Syntax

Move(Long nRecords)

Return Type

None

Parameter Description

index Represents a numeric index into the Fields collection or the name of a Field object. The

Fields collection is enumerated with integers, starting at 0.

Parameter Description

nRecords The number of records to move forward in the Recordset.

Object Reference Repository Object 44

MoveNext

This method moves the position to the next record in the Recordset.

Syntax

MoveNext()

Return Type

None

REPOSITORY OBJECT

This object is used to add and retrieve data from the Workflow Agent repository.

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

Properties

ActiveConnection

Methods

Add

Close

CreateNewVersion

CreateNode

Delete

GetFullObjectPath

GetNode

Open

SetApplicationState

Methods

Add

This method saves the specified node in the repository. An open connection must exist before this

method is called.

Object Reference Repository Object 45

Syntax

Add(String parent, RepositoryNode node)

CreateNewVersion

This method creates a new version of an application. It optionally copies a previous version and creates

the new version in the specified location.

Syntax

CreateNewVersion(String fullPath, Boolean copyOldVersion)

Return Type

RepositoryNode object

CreateNode

This method creates a new repository node. An open connection must exist before this method is called.

The node must also be added with the Add method to save it in the repository.

Syntax

CreateNode(String name[, Long type][, BinaryData data])

Return Type

RepositoryNode object

Parameter Description

parent The parent node of the node to be added. One of:

• A repository node identifier.

• The full repository path to a node.

node The node to be added.

Parameter Description

fullPath The complete path name of where the application is to be created.

copyOldVersion If True, the previous version’s contents are copied. If False, the contents are not copied.

Parameter Description

name The name of the object.

type Optional. The type of the object. For more information, see the Type property in

“RepositoryNode Object” on page 47. If not specified, the type is determined from the

extension associated with the name. If the type is not specified and cannot be uniquely

determined from the name, an error occurs.

data Optional. The data to associate with this repository node. If not specified, the data is

empty.

Object Reference Repository Object 46

Delete

This method deletes the specified object. Container objects must be empty before they are deleted.

An error will be generated if the object does not exist, if the object is a container that still has contents, if

the user does not have permissions to perform the operation, or if the object is a process map or roleset

that is being used by active process instances.

Syntax

Delete(String fullPathorID)

GetFullObjectPath

This method creates and returns a pathname from a known path and a relative displacement.

A connection to Workflow Agent must be active before this method is called.

Syntax

GetFullObjectPath(String fullPath, String relativePath)

Return Type

String

Example

Repository.GetFullObjectPath("$/App;l/Test/Folder", "../")

returns:

"$/App;1/Test"

GetNode

This method retrieves an object from the repository. An open connection must exist before this method is

called.

Parameter Description

fullPathorID The node to delete: either a repository node identifier or the full repository path to a

node.

If the node has a local copy saved by Adobe Workflow Server Administrator, the local

copy is not deleted. Only the copy in the database is deleted.

Parameter Description

fullPath The full path to a known object.

relativePath A relative path describing the relative displacement in the repository tree.

Object Reference RepositoryNode Object 47

Syntax

GetNode(String node)

Return Type

RepositoryNode object

SetApplicationState

This method sets the state of the application. There can be only one active version of an application.

Changing the state of an inactive application to active changes the state of the current active version to

inactive. Setting the state of an application version to inactive does not affect other versions of the

application. Setting the state of an active application version to active or inactive application version to

inactive has no effect.

An error occurs if the specified application does not exist or if the user does not have sufficient

permissions to set the state.

Syntax

SetApplicationState(String appFullPath, [Boolean bActivate])

Return Type

None

REPOSITORYNODE OBJECT

This object represents a node in the Workflow Agent repository.

Properties

DateCreated

DateUpdated

FullPath

NodeID

NodeName

Type

Value

Methods

(none)

Parameter Description

node The node to retrieve. One of:

• A repository node identifier.

• A full repository path.

Parameter Description

appFullPath The complete name of the application.

bActivate Optional. Specifies whether to activate or deactivate the application. The default is True

(activate).

Object Reference RepositoryNode Object 48

Properties

DateCreated

This property returns the date the node was created.

Type

Date

Access

Read-only

DateUpdated

This property returns the date the node was last updated.

Type

Date

Access

Read-only

FullPath

This property returns the full repository path to the node.

Type

String

Access

Read-only

NodeID

This property returns the unique identifier for the node.

Type

String

Access

Read-only

Object Reference RepositoryNode Object 49

NodeName

This property returns the name of the node.

Type

String

Access

Read-only

Type

This property returns the repository content type of the object:

• 1 - Application

• 2 - Folder

• 8 - Control

• 9 - Executable

• 10 - HTML file

• 11 - Process Map

• 12 - Roleset Definition

• 13 - Generic

Types 8, 9, 10, and 12 show that you can store any kind of file, for example ActiveX® objects or HTML

files, in the repository. The files can then be accessed by any Workflow Agent in a cluster. Any Object

Library user, with sufficient privileges, can retrieve the files for use with their applications.

Type

Long

Access

Read-only

Value

This property returns the data, depending on the type of node.

Type

BinaryData

Access

Read-only

Object Reference StartTasks Object 50

STARTTASKS OBJECT

Each process definition has at least one start task, which can initiate a process instance.

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

Properties

ActiveConnection

Methods

Close

CreateProcessInstance

Open

Methods

CreateProcessInstance

This method creates a new process instance for the specified process (either a process ID or a process

name), an optional taskName, and an optional formName. The method returns the reference ID of the

initial work item for the process instance.

Syntax

CreateProcessInstance(String process [, String taskName][, String formName] [, String

testModeParticipant][, Variant MergeData])

Parameter Description

process A process ID or a process name. For more information, see the ProcessID column in

“StartTasks Table” on page 85 and the ProcessName column in “Processes Table” on

page 81.

Note If you provide a process ID, you must specify the value inside braces

({Process ID}).

taskName Optional. It is not used unless specified. This parameter must be specified if there is

more than one start task for the given process.

Object Reference StatelessWorkItemData Object 51

Return Type

String

STATELESSWORKITEMDATA OBJECT

This object is used to complete a work item with data and attachments. An open connection must exist

before any of the methods are called.

The StatelessWorkItemData object should be used in applications where the submission of a work item

cannot be completed with a single instance of the WorkItemData object.

In Web Access, submissions require many instances of the StatelessWorkItemData object. If the

submission includes attachments, each attachment is uploaded to the Web server separately, and the

attachment is sent to Workflow Agent as soon as it is uploaded. Therefore, every time an attachment is

uploaded, a StatelessWorkItemData object must be instantiated and the AddAttachment method must be

called.

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

formName Optional. It is not used unless specified. This parameter must be specified if there is

more than one start form for the given start task.

testModeParticipant Optional. This is the userid of the participant being tested or a User object. It

defaults to no specified participant.

In test mode, the work item always returns to the sender.

This parameter must be specified to create an instance in test mode. If the process is

in test mode and a test participant is not specified, the instance is created in regular

mode.

Currently, an error does not occur if the process is in regular mode and a test

participant is specified.

MergeData Optional. Use this parameter to start the new process instance with data from a

completed work item. The data from the work item that you specify is merged with

the form that starts the process instance.

This parameter can be either a value from the ReferenceID column in the WorkItems

table, or an XMLData object:

• If the given value is a String, then it is processed as the RefernceID.

• If the given value is an array of bytes, then it is processed as an XML stream.

An error occurs if the given value is not a String, or is an array of bytes that is not

XML.

Parameter Description

Object Reference StatelessWorkItemData Object 52

Properties

ActiveConnection

Methods

AddAttachment

Begin

Cancel

Close

Complete

DeleteAttachment

Open

UpdateAttachment

Methods

AddAttachment

This method adds an attachment with the given name, permissions, and data. See “Attachments Table” on

page 80 for query information.

Syntax

AddAttachment(String handle, String name, Long permissions, BinaryData data)

Return Type

None

Begin

This method submits a work item to Workflow Agent for the current step in a process. It returns a handle

(string) that is required for subsequent method calls relating to the submission.

The object must be open when you call the Begin method. All the other methods are valid only after the

Begin method is called.

Parameter Description

handle The return value from the Begin method that started the work item.

name The name of the attachment.

permissions The permissions assigned to the attachment. A bitwise combination of:

1 – itAttachPermReadable

2 – itAttachPermUpdateable

4 – itAttachPermDeleteable

data The attachment data.

Object Reference StatelessWorkItemData Object 53

Syntax

Begin (String refID, IFormData data)

Return Type

String

Cancel

This method cancels a work item submission that was started with the Begin method.

Syntax

Cancel(String handle)

Complete

This method completes the work item, causing Workflow Agent to process the submission and send the

work item to the next participants in the process.

Syntax

Complete(String handle[, Variant action][, Variant participant])

Return Type

Null

Parameter Description

refID The reference identifier for the work item.

data Any object that implements the IFormData interface, such as XMLData and

WWWFormData.

Parameter Description

handle The return value from the Begin method that started the work item.

Parameter Description

handle The return value from the Begin method that started the work item.

action Optional. Defaults to the data object specified by the Begin method or in the process

map. One of:

• A valid Action object.

• An action name.

participant Optional. Defaults to no specified participant. One of:

• A user identifier.

• A User object.

Object Reference User Object 54

DeleteAttachment

This method deletes the specified attachment from a work item.

Syntax

DeleteAttachment(String handle, Long attachmentID)

UpdateAttachment

This method updates an existing attachment with new data.

Syntax

UpdateAttachment(String handle, Long attachmentID, BinaryData data)

USER OBJECT

This object is used to describe the identifier and display name of a particular user. The object is returned

as the value of a field that represents a Workflow Server user.

Note You cannot create this object with the CreateObject method.

Properties

DisplayName

UserID

Methods

(none)

Parameter Description

handle The return value from the Begin method that started the work item.

attachmentID The attachment identifier name of the attachment. See ItemNumber in “Attachments

Table” on page 80.

Parameter Description

handle The return value from the Begin method that started the work item.

attachmentID The attachment identifier name of the attachment. See ItemNumber in “Attachments

Table” on page 80.

data The new attachment data.

Object Reference Users Object 55

Properties

DisplayName

This property returns the display name for the user. This is the default property of the object.

Type

String

Access

Read-only

UserID

This property returns the user identifier for the user.

Type

String

Access

Read-only

USERS OBJECT

This object allows you to update data in the Workflow Server User Directory.

Use the Set methods to set the particular data that you want to apply to a user record. Then use the Add

method to apply the data to a new user record, or the Update method to apply the data to an existing user

record. Use the Remove method to remove a user record from the User Directory.

Prior to calling the Add, Update, or Remove methods, you must either open the Users object or set its

ActiveConnection property. The Set methods do not require the Users object to be opened.

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

Properties

ActiveConnection

Object Reference Users Object 56

Methods

Add

Close

Open

Remove

SetCustomField

SetCustomFields

SetDefaultWorklist

SetDisplayName

SetEMailAddress

SetEMailNotification

SetLastAccess

SetLink

SetLogin

SetLoginPassword

SetOutOfOffice

SetPermission

SetPermissions

SetPreferredEMailForms

SetPreferredWebForms

SetSysLogin

SetUserPreferences

Update

Methods

Add

This method can be used to add a new user record with the properties set using the Set methods. If this

method executes successfully, previously set values are cleared and new values can be set to prepare for

another Add or Update method call. Before calling Add, the SetDisplayName method must be run.

This method adds external users to the internal directory. If the linking key specified by the SetLink

method is valid, a linked user is created. Valid linking keys can be found by querying for the

A_LinkSource field with appropriate criteria from the external directory against the Users table. If the

linking key provided by SetLink is not valid, or if the key is already used for another user, an error occurs.

Syntax

Add()

Return Type

None

Remove

This method removes a particular user record or a group of user records.

Object Reference Users Object 57

Syntax

Remove(Variant user)

Return Type

None

SetCustomField

This method sets the value of a specific custom field for the user record.

Syntax

SetCustomField(Long index, String value)

Return Type

None

SetCustomFields

This method sets the application-specific custom fields for this user. There are up to five custom fields.

The first parameter can be an array of up to five strings, or optionally the strings can be individually

specified.

Syntax

SetCustomFields(Variant custom [,String custom2] [,String custom3] [,String custom4] [,String custom5])

Parameter Description

user The user record or a group of user records to update. Specify one of the following:

• A user identifier.

• An EPSDK.User object.

• An array of any of the above.

Parameter Description

index A number from 1 to 5 indicating which custom field to set.

value The value for the field.

Parameter Description

custom One of the following:

• An array of up to five string values.

• A string value to be applied as the first custom string.

custom2, custom3,

custom4, custom5

A string value set for the specified custom field.

Object Reference Users Object 58

Return Type

None

SetDefaultWorklist

This method sets the default worklist that appears when the user logs in to Web Access.

Syntax

SetDefaultWorklist(Variant user)

Return Type

None

SetDisplayName

This method sets the user’s display name that is used by applications to denote the user. This is the

DisplayName property of the User object and the DisplayName column value in the Users table.

The display name does not have to be unique. Users are uniquely identified by the UserID property.

Syntax

SetDisplayName(String name)

Return Type

None

SetEMailAddress

This method sets the value in the EMailAddress column of the Users table to specify the e-mail address to

be used for e-mail notifications.

If validate is False, address is returned. Otherwise, the resolved value for address, determined by the e-mail

system in use, is returned. This value may be different than address. If address cannot be resolved, an error

occurs.

Parameter Description

user The user for whom to set the default worklist. Use one of the following:

• A user ID.

• A display name. If the display name is not unique, an error occurs.

• An EPSDK.User object.

Parameter Description

name The user’s display name.

Object Reference Users Object 59

More than one user can have the same e-mail address, which may be useful if you want to send e-mail

notifications to multiple users. However, Workflow Agent returns an error if it receives an e-mail with a

work item from an e-mail address that has more than user because there is no way to determine who

specifically sent the e-mail.

Syntax

SetEMailAddress(String address [,Boolean validate])

Return Type

String

SetEMailNotification

This method sets the value in the EMailNotification column of the Users table that indicates what, if any,

e-mail notification should be sent to the user for reminders, deadlines, and new work items.

Syntax

SetEMailNotification(Long bitmask)

Return Type

None

SetLastAccess

This method sets the date and time the user last accessed Workflow Agent.

Parameter Description

address A valid e-mail address for the user.

validate If this parameter is True, the given address is validated against the e-mail system being

used by Workflow Agent, specified in Connection.Properties("E-Mail Type"). This may

require the address to be changed to a form suitable for the particular e-mail system.

The default value is False.

Parameter Description

bitmask A set of ITUserEMailNotificationFlags bit values that specify e-mail notification

options:

• 0 - itEMailNone: no e-mail notification for the user.

• 1 - itEMailRemindersAndDeadlines: notify for reminders and deadlines.

• 2 - itEMailWorkItems: notify for work items.

• 4 - itEMailWorkItemAsAttachment: include the work item as an attachment where

applicable.

Object Reference Users Object 60

Syntax

SetLastAccess(Variant date)

Return Type

None

SetLink

This method sets the linking key for the user. It correlates with the A_LinkDest field in the Users table.

Valid values can be found by querying for A_LinkSource using criteria in the external directory.

Syntax

SetLink(String key)

SetLogin

This method sets the login name and password for the user. To update a password, you must supply the

current password unless the current user is a system or user administrator.

Only system or user administrators can set the login name and password for other users. Users can only

change their own password, and only if they provide their current password.

Passwords must not contain semi-colons.

Note This method is deprecated for changing passwords. Instead, use “SetLoginPassword” on page 61.

Parameter Description

date The last date/time that the user accessed Workflow Agent. Use one of the following:

• A VB DATE value.

• An EPSDK.DateTime object.

• A string that can be converted to a date and time value.

Parameter Description

key The unique linking key for the user.

If the value is not unique, an error occurs.

Object Reference Users Object 61

Syntax

SetLogin(String userName, String password [,String currentPassword])

Return Type

None

SetLoginPassword

This method sets the login password for an existing user. If you are adding a user or if you want to change

both the login name and password, use the SetLogin method.

Only system or user administrators can set the login name and password for other users. Users can change

their own password only if they provide their current password.

Do not set a password that contains apostrophes using this method. If you require an apostrophe in a

password, use Administrator to set it.

Passwords must not contain semi-colons.

Syntax

SetLoginPassword(String newPassword [,String currentPassword])

Return Type

None

SetOutOfOffice

This method turns out-of-office on or off and nominates a substitute user to receive work items while

out-of-office is on. The current out-of-office status and the current substitute can be queried from the

Users table.

Parameter Description

userName The login identifier for the user. See the LoginName column in “Users Table” on

page 86.

If the value is not unique, an error occurs.

password The password for the user.

currentPassword Optional. The current password for the user. This parameter is required for verification

purposes. It is not required when the connection (ActiveConnection) was opened by a

user with system or user administration privileges, or when adding a new user record.

Parameter Description

newPassword The new password for the user.

currentPassword The current password for the user.

This parameter is required for verification purposes. It is not required when the

connection (ActiveConnection) was opened by a user with system or user

administration privileges.

Object Reference Users Object 62

Syntax

SetOutOfOffice(Boolean onOrOff [, Variant substituteUser])

Return Type

None

SetPermission

This method sets the given permission bit value on or off for the user.

Syntax

SetPermission(Long permission, Boolean onORoff)

Return Type

None

SetPermissions

This method sets permissions for the user.

Parameter Description

onOrOff Turns out-of-office on (True) or off (False) for the user.

substituteUser Optional. Default is to not set the substitute. The user that will receive work items

while out-of-office mode is turned on for this user. This parameter may be specified

even if the onOrOff parameter is false. However, if the onOrOff parameter is true, the

substitute user must have been set previously.

The value is one of:

• A user id.

• A User object.

Parameter Description

permission The ITUserPermissions bit value of the permission to enable or disable.

onORoff True if the permission should be enabled. False if the permission should be disabled.

Object Reference Users Object 63

Syntax

SetPermissions(Long perms)

Return Type

None

SetPreferredEMailForms

This method sets the ordered list of form types preferred by the user in an e-mail environment.

Syntax

SetPreferredEMailForms(EPSDK.FormTypes eMailForms)

Return Type

None

SetPreferredWebForms

This method sets the ordered list of form types preferred by the user in a Web environment.

Syntax

SetPreferredWebForms(EPSDK.FormTypes webForms)

Parameter Description

perms A bitmask of ITUserPermissions bit values specifying the permissions for this user.

The ITUserPermissions values are:

• 0 - itPermNone: no permissions.

• 1 - itPermEnabled: user is permitted to access Workflow Server.

• 2 - itPermSysAdmin: user is a system administrator.

• 4 - itPermUserAdmin: user is permitted access to all user information.

• 8 - itPermParticipator: user is permitted to participate in process instances.

• 16 - itPermProcessDesigner: user is permitted to submit process maps and role

sets.

• 32 - itPermProcessManager: user is permitted to access all work item data.

Parameter Description

eMailForms The ordered collection of form types that the user prefers to receive in an e-mail

environment. Returned by the PreferredEMailForms column in the Users table.

Parameter Description

webForms The ordered collection of form types that the user prefers to receive in a Web

environment. Returned by the PreferredWebForms column in the Users table.

Object Reference Users Object 64

Return Type

None

SetSysLogin

This method sets the value in the SysLogin column of the Users table.

Syntax

SetSysLogin(String loginName [,Boolean validate])

Return Type

String

SetUserPreferences

This method can be used to set the user preferences.

You can specify multiple user preferences in valid XML that contains multiple elements. When you return

the data (or execute a query that returns the UserPrefs column from the Users table), you can put the field

value in an XMLData object, which can in turn be loaded into an XML DOM to extract the preferences.

For an example, see “Setting User Preferences” on page 105.

Syntax

SetUserPreferences(Variant userPrefs)

Return Type

None

Parameter Description

loginName The Windows login name for the user.

If the value is not unique, an error occurs.

validate An optional parameter. The default is False.

If True, the domain style Windows system login associated with the loginName

(domain or ActiveDirectory style) is returned. If loginName cannot be validated, an

error occurs.

If False, loginName is returned.

Parameter Description

userPrefs The desired user preferences.

Object Reference WorkItemData Object 65

Update

This method updates an existing user record or a group of user records with the properties set using the

Set methods. If this method executes successfully, previously set values are cleared and new values can be

set to prepare for another Add or Update method call.

Syntax

Update(Variant user)

Return Type

None

WORKITEMDATA OBJECT

This object represents the form data and the attachments for a particular work item.

The StatelessWorkItemData object should be used in applications where the submission of a work item

cannot be completed with a single instance of the WorkItemData object. For more information, see

“StatelessWorkItemData Object” on page 51.

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

Properties

ActiveConnection

Methods

AddAttachment

BeginSubmit

CancelSubmit

Close

DeleteAttachment

Open

Submit

UpdateAttachment

Parameter Description

user The user record or a group of user records to update. Specify one of the following:

• A user identifier.

• A user’s display name.

• An EPSDK.User object.

• An array of any of the above.

Object Reference WorkItemData Object 66

Methods

AddAttachment

This method adds an attachment. See “Attachments Table” on page 80 for query information.

Syntax

AddAttachment(String name, Long permissions, EPSDK.BinaryData data)

Return Type

None

BeginSubmit

This method must be called after opening a WorkItemData object when you want to submit a work item

to Workflow Agent for the current step in the process instance. The remaining methods are only valid

after BeginSubmit is called.

Syntax

BeginSubmit(String refID)

Return Type

None

CancelSubmit

This method cancels the work item submission that was started with the BeginSubmit method.

Syntax

CancelSubmit()

Parameter Description

name The name of the attachment.

permissions A bitwise combination of:

• 1 - itAttachPermreadable

• 2 - itAttachPermUpdateable

• 4 - itAttachPermDeleteable

data The attachment data blob.

Parameter Description

refID The reference identifier for the work item.

Object Reference WorkItemData Object 67

Return Type

None

DeleteAttachment

This method deletes the specified attachment.

Syntax

DeleteAttachment(Long attachmentID)

Return Type

None

Submit

This method submits the work item to Workflow Agent. The data parameter is an object that implements

the EPSDK.IFormData interface and contains the data to complete this Workflow Server step. An optional

action and participant (if the action is nominate, delegate, or consult) can be specified, which overrides

any action or participant specified in the data. If the action is not user driven, the value provided for

participant is ignored. The values provided on this method override any values provided in the data.

The return value is reserved for future use and is always null.

Syntax

Submit(EPSDK.IFormData data [,Variant action] [,Variant participant])

Parameter Description

attachmentID The attachment identifier. See the ItemNumber column in “Attachments Table” on

page 80.

Parameter Description

data Any object that implements the IFormData interface, such as XMLData and

WWWFormData.

action Optional. One of:

• A valid EPSDK.Action object.

• An action name.

The default value is no action.

participant Optional. One of:

• A user identifier.

• The display name of a user. If the display name is not unique, the work item stalls.

If you are in an environment where there are non-unique display names, use

another way of identifying users.

• An EPSDK.User object.

The default value is no participant.

Object Reference WorkItems Object 68

Return Type

Variant

UpdateAttachment

This method updates an existing attachment with specified data.

Syntax

UpdateAttachment(Long attachmentID, EPSDK.BinaryData data)

Return Type

None

WORKITEMS OBJECT

This object can be used to manipulate the status of a work item and to retrieve the form merged with the

work item data. See “WorkItemData Object” on page 65 for information on completing a work item.

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

Properties

ActiveConnection

Methods

Close

GetWebForm

LockWorkItem

MergeWebForm

Open

ProcessWebForm

ResetDeadline

SendEMail

UnlockWorkItem

WriteWebForm

Parameter Description

attachmentID The attachment identifier. See the ItemNumber column in “Attachments Table” on

page 80.

data The new attachment data.

Object Reference WorkItems Object 69

Methods

GetWebForm

Note This method is deprecated in this release, and does not support the PDF form type. Use

MergeWebForm instead.

This method gets a Web form that is merged with the work item data. The returned FormContent object

can be written to a browser using the ASP Response.BinaryWrite method.

You must set the FormPaths property of the Connection object before using this method.

Syntax

GetWebForm(String refID [,String formType] [,Variant context] [,String targetURL])

Return Type

EPSDK.FormContent

LockWorkItem

This method locks the specified work item for the specified user. If the user is not specified, it locks the

work item for the user identified by the associated Connection object (ActiveConnection property). The

user is recorded in the LockedBy column of the WorkItems table. A user other than the work item’s owner

can open a work item only if the owner’s worklist is shared with the user.

See “UnlockWorkItem” on page 72 for information on releasing a locked work item.

Parameter Description

refID The reference ID of the work item that uses the form and data.

formType Optional. One of the following form representations:

• UserPreference - the user’s Web form preference decides the representation. See the

PreferredWebForms column in “Users Table” on page 86.

• HTML.

• FormClient.

• FormServer.

The default is UserPreference.

context Required when using Form Server, optional otherwise. A

FormServer.ApplicationContext object.

targetURL Optional. The URL where the form’s content is sent using the HTTP POST method.

This parameter is used only when using Form Server. Otherwise, it is ignored.

Defaults to the target URL coded into the form template.

Object Reference WorkItems Object 70

Syntax

LockWorkItem(String refID [,Variant user])

Return Type

None

MergeWebForm

This method gets a web form merged with the given work item data. The returned result of this method

can be written to a browser using the Active Server Page Response.BinaryWrite method.

For more information, see the Form Server documentation.

Syntax

MergeWebForm(String formName, XMLData xmlData, String formType[, String TargetURL][, String

baseURL][, String targetFrame])

Parameter Description

refID The reference ID of the work item to open.

user Optional. The user who obtains the lock on the work item and can now open the work

item. This parameter can be:

• A user identifier.

• The display name of a user. If the display name is not unique, an error occurs.

• An EPSDK.User object.

The default is ActiveConnection.Properties(“User”).

Parameter Description

formName The name of the form.

xmlData The XML data.

formType One of the following form representations:

• HTML

• FormClient

• PDF

Object Reference WorkItems Object 71

Return Type

EPSDK.FormContent

ProcessWebForm

This method processes the HTTP POST request from the Web form generated by GetWebForm,

WriteWebForm, or MergeWebForm. This method should be used to get data that is posted from the form.

The Content property of the returned FormContent object will contain the XFA Data representation of

the posted form data. This data object can be used with the Submit method of the WorkItemData object

to complete a work item.

For more information, see the Form Server documentation.

Syntax

ProcessWebForm(Variant data [,Variant context] [, ASPResponseObject])

TargetURL Optional. The URL where the form content is sent using the HTTP POST

method.

For PDF forms, the client-side javascript for the submit action retrieves this

value.

Defaults to the target URL coded into the form template.

baseURL The URL for the location where native PDF forms are stored. Required when

formType is PDF. The default location for PDF forms for Web Access is:

http://<Web server>/webaccess/PDF/

targetFrame Optional. The name of the HTML frame where you want the PDF form to

appear.

Parameter Description

Parameter Description

data The data (the ASP Request object).

context Optional except when the form retrieved by GetWebForm, WriteWebForm, or

MergeWebForm was generated by Form Server. This parameter is a

FormServer.ApplicationContext object.

ASPResponseObject Optional. The ASP Response object.

This is only used if a Form Server Context was supplied. Actions other than

FSSubmit are written as an HTTP response using this object.

If this object is not supplied but a Form Server Context is supplied, and the

form generated by GetWebForm is a Form Server form, the FormContent.Type

property will contain the Form Server ProcessHTTPRequest FSType, and the

user application must write the HTTP content for any types other than

FSSubmit.

Object Reference WorkItems Object 72

Return Type

EPSDK.FormContent

ResetDeadline

This method resets the value in the State column of the WorkItems table for a work item from 3 (reached

deadline but not acknowledged) to 0 (inactive).

Syntax

ResetDeadline(String refID)

Return Type

None

SendEMail

This method resends a work item to the owner of the work item. For more information, see the Owner

column in “WorkItems Table” on page 88. The following conditions are required for this method to

succeed:

• There must be an e-mail version of the form available. See the FormTypes column in “WorkItems

Table” on page 88.

• Workflow Agent must be configured to use e-mail with Connection.Properties(“E-Mail Type”).

• The user must have a valid and unique e-mail address. See the EmailAddress column in “Users Table”

on page 86.

• The user must have e-mail work item notification enabled. See the EMailNotification column in

“Users Table” on page 86.

Syntax

SendEMail (String refID)

Return Type

None

UnlockWorkItem

This method releases the lock on a work item. This method can only be called by:

• The owner of the work item. See the Owner column in “WorkItems Table” on page 88.

• The user that has the work item locked. See the LockedBy column in “WorkItems Table” on page 88.

• An administrator. See the Permissions column in “Users Table” on page 86.

Parameter Description

refID The reference identifier of the work item.

Parameter Description

refID The reference ID of the work item to resend.

Object Reference WorkItems Object 73

Syntax

UnlockWorkItem(String refID)

Return Type

None

WriteWebForm

Note This method is deprecated in this release. Use MergeWebForm instead.

This method is similar to GetWebForm, except that the form is written directly to the browser using the

provided ASP Response object, and the type of form is returned as a string.

Note Since this method sets the HTTP content-type header tag, the calling ASP must not write any

content for the response before calling this method. Alternatively, the calling ASP can set

Response.Buffer to True before calling WriteWebForm.

This method is equivalent to the following VBScript ASP function:

<%

FUNCTION WriteWebForm(refID, browserCap, targetURL, formType)

DIM resp

SET resp = worklist.GetWebForm(refID, browserCap, targetURL, formType)

Response.ContentType = resp.ContentType

Response.BinaryWrite resp.Content

WriteWebForm = resp.FormType

END FUNCTION

%>

Syntax

WriteWebForm(ASPResponseObject, String refID [,String formType] [,Variant context] [,String

targetURL])

The ASPResponseObject parameter is the ASP Response object. This is where the form content is written

after setting the appropriate Content-Type.

The remaining parameters are the same as the GetWebForm method. For more information, see

“GetWebForm” on page 69.

Return Type

String

Parameter Description

refID The reference identifier of the work item to close.

Object Reference WorklistShares Object 74

WORKLISTSHARES OBJECT

This object is used for defining access to shared worklists.

This object supports the following common methods and properties:

• Open, see “Common Methods” on page 12.

• Close, see “Common Methods” on page 12.

• ActiveConnection, see “Common Properties” on page 11.

Properties

ActiveConnection

Methods

Add

Close

Open

Remove

SetUser

SetWorklist

Methods

Add

This method adds the worklist shares as described by the SetUser and SetWorklist methods. Both must be

provided with values.

Syntax

Add()

Remove

This method removes the worklist shares as described by the SetUser and SetWorklist methods. If only

SetUser is used to provide one or more users, all the Worklist shares for that user are removed. If only

SetWorklist is used to provide one or more worklists, all user shares of that Worklist are removed.

Syntax

Remove()

SetUser

This method identifies a user to be granted access to a worklist.

Object Reference WWWFormData Object 75

Syntax

SetUser(Variant user)

SetWorklist

This method identifies a user whose worklists are being shared.

Syntax

SetWorklist(Variant user)

WWWFORMDATA OBJECT

This object implements the IFormData interface. It encapsulates the MIME content type

application/x-www-form-urlencoded, which is normally the content type for HTML <FORM> elements.

The data content is defined by <key>=<value> pairs separated by the & character. Keys and values are

URL-encoded. This object can be used with the Submit method of the WorkItemData object.

This object has no methods or properties of its own.

XMLDATA OBJECT

This object implements the IFormData interface. It is used when processing XML Forms Architecture

(XFA) data files. The object is returned by the XMLData column in the WorkItems table, and can be used

as the data parameter to the Submit method of the WorkItemData object.

For more information on IFormData, see “IFormData Interface” on page 35. This object has the

additional methods GetXFAModel and SetXFAModel.

For more information about XFA, contact Customer Support.

Parameter Description

user The user who is being granted access to another user’s worklist. One of the following:

• A user identifier.

• A User object.

• An array of either of the above.

Parameter Description

user The owner of the worklist being shared to another user. One of the following:

• A user identifier.

• A User object.

• An array of either of the above.

Object Reference XMLData Object 76

Properties

(none)

Methods

GetXFAModel

SetXFAModel

Methods

GetXFAModel

This method gets an XFADataModel object that contains the XML data.

Syntax

GetXFAModel( )

Return Type

The XFA Data Model representation of the XML Data.

SetXFAModel

This method sets the XML data to the contents of the provided XFADataModel.

Syntax

SetXFAModel(XFADataModel XFAModel)

Parameter Description

XFAModel The XFA data model.

2 Tables

OBJECT LIBRARY SQL

The Object Library supports SQL query statements (SELECT...) using a restricted SQL syntax. These

query statements are used in the Execute method of the Connection object and the Open method of the

Recordset object.

SQL Syntax Definition

The SQL syntax definition uses the following conventions:

select-stmt:

SELECT [DISTINCT] column-list

FROM TABLE-NAME

[WHERE search-condition]

[ORDER BY order-by-list]

column-list:

column-reference [, column-list]

column-reference:

column-name [character-string-literal]

search-condition:

boolean-term [OR search-condition]

boolean-term:

boolean-factor [AND boolean-term]

Element Convention Example

Literal Words in bold uppercase SELECT

Literal that represents many valid

lexical combinations

Words in uppercase TABLE-NAME

Optional elements Words in square brackets [character-string-literal]

Non-terminals. They are further expanded

elsewhere in the syntax definition.

Words in lowercase column-list

Tables Object Library SQL 78

boolean-factor:

[NOT] boolean-primary

boolean-primary:

column-name comparison-op literal

column-name [NOT] LIKE pattern-value

column-name IS [NOT] NULL

column-name IN ( literal-list )

( search-condition )

comparison-op:

< | > | <= | >= | = | <>

literal-list:

literal [, literal-list]

literal:

number

character-string-literal

TIMESTAMP 'TIMESTAMP-VALUE'

TRUE | FALSE

pattern-value:

character-string-literal

character-string-literal:

'CHARACTERS - embedded single quotes must be represented by two single quotes'

number:

[-]DIGITS[.DIGITS]

column-name:

[TABLE-NAME.]COLUMN-NAME

order-by-list:

sort-specification [, order-by-list]

sort-specification:

column-name [ASC|ASCENDING|DESC|DESCENDING]

Note The ActionParticipants, Users, and WorklistShares tables do not support the IN operator.

Tables Object Library Tables 79

OBJECT LIBRARY TABLES

For the literal TABLE-NAME, use any of the tables described in the following sections.

Each table description lists columns in the table and, when applicable, a list of tables that can be

referenced from the parent table. For example, the StartTasks table contains a reference to the ‘subtable’

Processes. This allows for automatic joins between these tables and the specification of query statements

such as the following:

SELECT TaskName, Processes.ProcessName FROM StartTasks

In the table descriptions, the Type column indicates the data type of the variant that is returned from the

Value property of the Field object when the column value is retrieved from the current row of a Recordset.

Actions Table

The Actions table contains the possible actions for a particular work item.

ActionParticipants Table

For nominate, delegate, and consult actions, this table contains valid users who can participate in the

action. See the UserDriven column in “Actions Table” on page 79.

The ReferenceID and Action columns can only be used in the where clause of a select statement, and must

both be present in a top-level AND condition. The only valid operator for ReferenceID and Action

releations is the equality operator.

This table does not support the IN operator.

Column Type Description

Action String The action.

ReferenceID String The reference ID of the work item to which the action applies.

UserDriven Boolean This value is True when the action is a consultation, delegation, or

nomination.

Column Type Description

Action String The action to be performed.

Participant EPSDK.User The valid user who can participate in the action.

ReferenceID String The reference ID of the work item.

Tables Object Library Tables 80

Applications Table

This table relates to the applications in the repository. It contains information about the applications

available in Workflow Agent, but only those that contain processes with start tasks. For a complete list of

applications in the repository, query against the Repository table instead.

Attachments Table

This table contains the attachment data associated with a work item. Attachments can be added,

modified, and removed using methods in the WorkItemData object.

Column Type Description

Active Boolean This column value is True if this version of the application

is the active version; False otherwise.

ActiveInstances Long The number of active instances of the application.

ApplicationID String A unique identifier for the application.

DateCreated DateTime The date the application was created.

DateUpdated DateTime The last date the application was updated.

Name String The name of this application. This name can be used to

locate the application within the repository.

SubmittedBy User The user that submitted the application.

VersionNumber Long The version of the application.

Column Type Description

Data EPSDK.BinaryData The attachment data.

ItemNumber Long The position of this attachment, beginning at 1.

LastModified EPSDK.DateTime The date and time that the attachment was last modified.

Name String The name of the attachment (a file name).

Permissions Long The ability for a user to read, update, and delete the

attachment is defined by a bitmask of the following constants:

1 - itAttachPermReadable

2 - itAttachPermUpdateable

4 - itAttachPermDeleteable

ReferenceID String The work item that this attachment is associated with.

Size Long The size of the attachment data.

Tables Object Library Tables 81

Processes Table

This table contains the processes that can be initiated. For more information, see “StartTasks Object” on

page 50.

The RoleSets table and Applications table can be automatically joined from the Processes table.

Column Type Description

ActiveInstances Long The number of active instances for this process.

ApplicationID String The application identifier indicating to which application this

process belongs. See “Applications Table” on page 80.

Applications Table The Applications table can be automatically joined from the

Processes table.

DateCreated DateTime The date the process was created.

DateUpdated DateTime The date the process was submitted.

Defunct Boolean This property is true if the process is defunct; false otherwise.

ProcessFileName String The file name of the process definition file for this process.

ProcessGroup String The name of the process group for the process.

ProcessID String The unique identifier of the process.

ProcessName String The name of the process.

RolesetFileName String The file name of the role set definition file for this process.

RoleSetName String The name of the role set defined for this process.

Currently, querying this column does not return the correct value.

Rolesets Table The Rolesets table can be automatically joined from the Processes

table.

Currently, querying this column does not return the correct value.

SubmittedBy User The user that submitted the process.

TestMode Boolean This column value is True if the process is set to run in test mode;

False otherwise.

Tables Object Library Tables 82

ProcessInstances Table

This table contains data for each process instance.

The Processes table can be automatically joined from the ProcessInstances table.

Column Type Description

CrossReferenceID String Associated with the process instance. It is created for each

work item, and consists of the process instance ID and the

step ID.

EndDate EPSDK.DateTime The date this process instance ended. If the process instance is

still running, this value is null.

Initiator EPSDK.User The user who initiated this instance.

InstanceID String The unique process instance identifier.

Killed Integer Indicates how the work item was completed. Possible values:

• 0 - Completed normally.

• 2 - Terminated manually using Administrator.

ProcessID String The process identifier for this process instance.

StartDate EPSDK.DateTime The date this process instance started.

State Enumeration The current state of the process instance. Possible values:

• -1 - itWIStateInitial: indicates that the first work item of

this process instance has yet to be completed.

• 0 - itWIStateInactive: indicates that the process instance

has been completed (the final work item was successfully

submitted).

• 1 - itWIStateActive: indicates that the process instance

has not yet been completed.

TestMode Boolean Sets test mode on (True) or off (False) for this instance.

TestModeInitiator EPSDK.User The user who initiated this instance in test mode.

Tables Object Library Tables 83

RepositoryTypes Table

This table relates to the Workflow Agent repository.

By default, these types, categories, and extensions are available:

Repository Table

This table contains the contents of the Workflow Agent repository. The repository is a hierarchical

collection of nodes where some nodes are folders (containers) and other nodes are files. These nodes can

be searched linearly or hierarchically.

Each node in the repository can be uniquely addressed by either its NodeID or its fully-qualified

hierarchical path. For example, if the process ABC.jwf was within the folder Processes under the

Column Type Description

ContentType String The MIME type that best represents this data type. Currently,

however, this value is always null.

IsContainer Boolean Specifies if this is a container type.

TypeID Long The unique identifier for this type.

TypeName String The name of this type.

TypeID TypeName Extensions Category

1 Application Container

2 Folder Container

8 Control DLL

OCX

File

9 Executable EXE File

10 HTML File HTM

HTML

File

11 Process Map JWF File

12 Roleset Definition JRL File

13 Generic * File

Tables Object Library Tables 84

application node MyApp then this process can be referenced by the repository path

/MyApp/Processes/ABC.jwf.

The RepositoryTypes table can be automatically joined from the Repository table.

RoleSets Table

This table contains the set of roleset definitions.

The Applications table can be automatically joined from the Rolesets table.

Column Type Description

CreatedBy User The user who created this node.

DateCreated DateTime The date this node was created.

DateUpdated DateTime The date this node was last updated.

Name String The name of this repository node.

NodeID String The unique identifier for this repository node.

Path String The full repository path to this node.

TypeID Long The type of the node. See “RepositoryTypes Table” on page 83.

UpdatedBy User The user who last updated this node.

Column Type Description

ApplicationID String The application identifier indicating to which application this

process belongs. See “Applications Table” on page 80.

DateCreated DateTime The date the role set was created.

DateUpdated DateTime The last date the role set was updated.

RolesetFileName String The file name of the roleset definition file for this process.

RolesetID String The unique identifier for this roleset.

RolesetName String The name of the role set.

SubmittedBy User The user who submitted the role set.

Tables Object Library Tables 85

SearchData Table

This table contains data for search fields associated with the work items.

The WorkItems and SearchFields tables can be automatically joined from the SearchData table.

SearchFields Table

This table contains data for each search field defined for any process.

The Processes table can be automatically joined from the SearchFields table.

StartTasks Table

This table contains data for each start task in each defined process. See “StartTasks Object” on page 50 for

information on creating a new process instance.

The Processes table can be automatically joined from the StartTasks table.

Column Type Description

ReferenceID String The reference ID for the work item that contains the actual data field.

Value Variant The data value. This is either a number (double) or a string, depending on

the field type referred to by the FieldType column in the SearchFields

table.

Column Type Description

FieldDescription String The description of the field.

FieldName String The name of the search field.

FieldType ITSearchFieldType enumeration:

8 - itSearchFieldNumeric

12 - itSearchFieldString

The type of the field. This can be used to

determine the underlying type of the Value

column in the SearchData table.

ProcessID String The identifier of the process.

Column Type Description

FormName String The name of the start form.

FormTypes EPSDK.FormTypes The collection of all available form types for this start task.

Instructions String The instructions for the start task.

This column can only be filtered using the following

operators:

=, <>, LIKE, NOT LIKE, IS NULL, and IS NOT NULL.

ProcessID String The identifier of the process.

TaskName String The name of the start task.

Tables Object Library Tables 86

Users Table

This table contains data for each user. See “Users Object” on page 55 for information on adding a new

user, deleting an existing user, or changing the properties of a user.

This table does not support the IN operator.

Column Type Description

A_ExtDisplayName String The display name in the external directory.

A_ExtEmail String The e-mail address in the external directory.

A_ExtKey String The user login in the external directory.

A_LinkDest String The linking key in the internal table.

A_LinkSource String The linking key in the external table.

Custom Array of Strings Application specific strings. There are five strings in the

array.

DefaultWorklist EPSDK.User The user whose worklist should be used for the user’s

default worklist (may be a user whose worklist has been

shared to the current user).

DisplayName String A display name for the user when being addressed by the

system. This is the default property of the object. The name

does not necessarily have to be unique.

EMailAddress String The user’s e-mail address.

EMailNotification Enumeration Indicates how the user wants e-mail to be used for work

item, reminder, and deadline notifications.

This field value is a bitmask of the

ITUserEMailNotificationFlags:

• 0 - itEMailNone: no e-mail notification for the user.

• 1 - itEMailRemindersAndDeadlines: notify for

reminders and deadlines.

• 2 - itEMailWorkItems: notify for work items.

• 4 - itEMailWorkItemAsAttachment: include the work

item as an attachment where applicable.

IsOutOfOffice Boolean This value is true if out-of-office is turned on for a

particular user; false otherwise. If true, then

OutOfOfficeSubstitute is used to determine the user to

whom new work items are assigned. The

Users.SetOutOfOffice method is used to set this value.

LastAccess DateTime Contains the value provided the last time

Users.setLastAccess was called for this user. Web Access sets

this value to the last time the user used Web Access.

Tables Object Library Tables 87

LoginName String The login identifier for the user.

OutOfOfficeSubstitute User The user who is substituting (assigned new work items)

when IsOutOfOffice is true.

Permissions Enumeration A bitmask representing the user’s permissions.

ITUserPermissions values are:

• 0 - itPermNone: no permissions.

• 1 - itPermEnabled: user is permitted to access

Workflow Server.

• 2 - itPermSysAdmin: user is a system administrator.

• 4 - itPermUserAdmin: user is permitted access to all

user information.

• 8 - itPermParticipator: user is permitted to participate

in process instances.

• 16 - itPermProcessDesigner: user is permitted to

submit process maps and role sets.

• 32 - itPermProcessManager: user is permitted to access

all work item data.

PreferredEMailForms EPSDK.FormTypes Ordered collection of preferred e-mail form types.

PreferredWebForms EPSDK.FormTypes Ordered collection of preferred Web form types.

SysLogin String The system login for the user, such as the Windows login

name.

UserFlags Enumeration A set of user preference flags.

ITUserFlags values are:

• 0 - itUserFlagNone: no flags are defined.

• 1 - itUserFlagPreviousAccess: the user has previously

accessed Workflow Server.

UserID String A unique identifier for this user.

UserPrefs Variant The user preferences for Web Access.

You can specify multiple user preferences in valid XML that

contains multiple elements.

Column Type Description

Tables Object Library Tables 88

WorkItems Table

This table contains data for each work item.

Column Type Description

ActionTaken String If the work item is completed, this field contains a string

value representing the action taken for the task, specified

in the TaskName column, that the work item is associated

with.

ActionType Enumeration This value can be one of:

-1 - itActionUnknown

0 - itActionCustom

1 - itActionConsult

2 - itActionDelegate

3 - itActionNominate

AttachmentControl Long A bitmask which controls access to this work item’s

attachments (see “Attachments Table” on page 80).

Bit values are:

0 - itWIAttachNoAccess

1 - itWIAttachReadOnlyAccess

2 - itWIAttachCanUpdate

4 - itWIAttachCanDelete

8 - itWIAttachUserDefinedPermissions

16 - itWIAttachCannotAddAttachments

AttachIncrementSize Long? The maximum total size of attachments that a Web Access

user can add to a work item, in kilobytes.

CanDeadlineBeSet Boolean True when the process definition allows the user to set the

deadline.

CanReminderBeSet Boolean True when the process definition allows the user to set the

reminder.

CompletedBy EPSDK.User The user who completed the work item. This might be

different from the Owner column if the owner’s worklist

has been shared, as in the “WorklistShares Table” on

page 91, and a user to whom the owner’s worklist has

been shared, opened and completed the work item. This

column’s value is null for active work items, as specified in

the State column.

CrossReferenceID String An identifier that consists of the process instance ID

followed by the step ID.

Tables Object Library Tables 89

Custom1 through

Custom5

String Five custom fields are available for each work item. They

are populated by application developers in scripts so that

the data can be exposed via the Object Library in Web

Access. These custom fields carry forward their values

between work items.

DeadlineDate EPSDK.DateTime The date and time of any deadline associated with this

work item. If there is no associated deadline, this value is

null.

DeadlineMessage String The message associated with a deadline.

This column can only be filtered using the following

operators:

=, <>, LIKE, NOT LIKE, IS NULL, and IS NOT NULL.

EndDate EPSDK.DateTime The date and time this work item was completed. If the

work item is still active, this value is null.

FormName String The name of the form associated with this work item task.

FormTypes EPSDK.FormTypes The collection of forms that are available for displaying

this work item.

Initiator EPSDK.User The user who initiated the process instance that this work

item is part of (same as the Initiator column in the

ProcessInstances table).

InstanceID String The process instance identifier.

Killed Integer Indicates how the work item was completed. Possible

values:

• 0 - Completed normally.

• 1 - Completed due to a deadline.

• 2 - Terminated manually using Administrator.

LockedBy EPSDK.User The user that has this work item locked. See the

LockWorkItem and UnlockWorkItem methods of

“WorkItemData Object” on page 65. If the work item is

not locked or the work item is completed, this column’s

value is null.

NextReminderDate EPSDK.DateTime The date and time of the next reminder for this work

item. If there is no reminder set, this value is null.

Owner EPSDK.User The owner of the work item. This is the user the Workflow

Agent assigned the work item to for completion.

ParentReferenceID String For subprocesses. This is the reference ID for the

subprocess task that initiated it. If the work item is not

part of a subprocess, the value is null.

Column Type Description

Tables Object Library Tables 90

PreviousOwner EPSDK.User The user who owned the previous work item.

PreviousReferenceID String The reference ID of the previous work item. This value is

null for the first work item.

If a work item is consulted or delegated, a new work item

is created, but the previous work item ID for the new

work item is the same as for the original work item.

ProcessID String The process identifier.

ReferenceID String A unique reference ID for this work item.

ReminderCount Long The number of reminder dates that have been reached.

ReminderMessage String The message associated with a reminder.

This column can only be filtered using the following

operators:

=, <>, LIKE, NOT LIKE, IS NULL, and IS NOT NULL.

Role String The current role for this work item.

StartDate EPSDK.DateTime The date and time this work item was started.

State Enumeration The current state of the work item. Can be one of the

following values:

• -3 - indicates that the work item is queued for further

processing by Workflow Agent.

• -2 - indicates that the work item is stalled.

• -1 - itWIStateInitial: indicates that the work item is

the first work item of a new process instance and has

yet to be completed.

• 0 - itWIStateInactive: indicates that the work item has

been completed (successfully submitted).

• 1 - itWIStateActive: indicates that the work item has

not yet been completed.

• 2 - itWIStateReminder: indicates that the work item

has not been completed and at least one reminder has

occurred.

• 3 - itWIStateDeadlined: indicates that the work item

was not completed before it deadlined and its

ShowDeadline column has not been reset. See the

WorkItems.ResetDeadline method in

“ResetDeadline” on page 72.

TaskInstructions String The instructions for this work item.

TaskName String The name of the task that corresponds to this work item.

Column Type Description

Tables Agent Errors 91

The Processes and ProcessInstances tables can be automatically joined from the WorkItems table.

WorklistShares Table

This table defines shared worklists. This table does not support the IN operator.

AGENT ERRORS

This table lists the possible errors exposed through the Connection.Errors collection and their

Error.SQLState, Error.NativeError, and Error.Description values.

TaskType Long The type of task that the work item represents. Only

manual tasks can be completed by users.

This value can be one of:

1- itTaskManual

2 - itTaskScript

7- itTaskSubprocess

8 - itTaskXMLExchange

TestMode Boolean True if this work item is executing in test mode.

TestModeCompletedBy EPSDK.User The user who completed the work item in test mode.

TestModeLockedBy EPSDK.User The user that has this work item locked in test mode.

TestModeOwner EPSDK.User The user who owns this work item in test mode.

XMLData XMLData This column retrieves the work item data in XML format

using the EPSDK.XMLData object as a container. See

“XMLFormat” on page 23.

Column Type Description

Column Type Description

User EPSDK.User The user being granted access to a worklist.

Worklist EPSDK.User The worklist being shared to a user.

SQL State Native Code Error Text and Description

HY000 An unexpected error has occurred.

HY001 Memory allocation error.

01S00 Invalid connection string attribute.

08001 Client unable to establish connection to the Agent service on server:

ServerName.

Tables Agent Errors 92

08004 ODBC driver version is not supported by the Agent Server.

08S01 Communication link failure to server: ServerName.

28000 1 The following username is not a valid Agent user: UserName.

28000 2 The specified password is not a valid password for the named Agent user.

28000 3 The following locale is not a valid Agent locale: Locale.

28000 4 The Agent was unable to determine the current user information.

42000 10 The Agent Server could not open file - FilePath.

42000 13 The current user does not have permission to access the requested data.

42000 32001 The following user is not a valid Agent user <user name>.

The user attempting to login to Agent is not recognized as a valid user and

automatic creation of users for this type of authentication is not enabled.

42000 32002 Unknown Locale - not implemented yet.

The locale specified in the connection string is not supported.

42000 32016 The Directory Service request failed with the accompanying reasons.

A SQL statement entirely related to the Directory Service tables failed. The

reasons for the failure are added to this message.

42000 32017 The Directory Service Schema request failed.

A request for the schema of one of the Directory Service tables failed. The

reasons for the failure are added to this message.

42000 32020 Login failed with the accompanying Directory Service reasons.

The Directory Service rejected the login. The reasons for the rejection are

added to this message.

42000 32022 The work item submission failed with the accompanying reasons.

The work item submission did not succeed. This can occur for a variety of

reasons such as network outage, e-mail system problems, database problems,

and role resolution problems. The reasons for the failure are added to this

message.

42000 32027 Sequence error. A work item submission for data item zero has not yet

occurred.

A work item submission must begin with an SQL Update of the work item data

table for item number zero. Agent has detected that an SQL statement that is

part of performing a work item submission has been issued without the first

SQL Update having occurred.

SQL State Native Code Error Text and Description

Tables Agent Errors 93

42000 32029 Row navigation within the result set failed.

MoveNext within the Result Set failed. The failure reason from the database is

added to this error message.

42000 32030 An error occurred when retrieving a column value.

Obtaining a column value from a result set row failed. The failure reason from

the database is added to this error message.

42000 32031 Could not determine the column type when retrieving a column value.

The data type of a value retrieved from a column is not known to Agent.

42000 32047 Agent is in read-only state.

An SQL command that would modify the Agent database has been received

while Agent is in read-only state.

42000 32051 Login failed. <type> authentication is required.

SQL State Native Code Error Text and Description

3 Using the Objects

This section describes how to use the Workflow Server Object Library when building a Web application. It

provides sample code for many of the tasks. You will have to modify the code samples to suit your specific

requirements.

USING THE WORKFLOW SERVER QUERY OBJECTS

The Object Library exposes a read-only query model for the Workflow Agent data. This data model

includes users, processes, start tasks, process instances, and work items. Access to the data is through an

SQL query syntax using the Connection and Recordset objects. These objects are strict subsets of the

Microsoft ActiveX Data Objects (ADO) objects of the same names.

Creating and Using a Connection

An application must establish an authenticated connection with Workflow Agent before continuing any

interactions. This connection is obtained by opening a Connection object using a connection string.

Opening a Connection

You can specify the connection string in two ways:

• Assign the ConnectionString property of the Connection object.

• Provide the connection string as the first argument in the Open method of the Connection object.

'Create a Connection

var conn = Server.CreateObject("EPSDK.Connection");

conn.Open("DRIVER={Adobe Workflow Server Driver};UID=Tony;PWD=blue");

In the connection, you can either specify the driver explicitly as in the previous code sample, or you can

refer to a configured ODBC data source. The connection string is then as follows:

conn.Open("DSN=Adobe Workflow Server");

Any other parameters supplied in the connection string override the data source definition.

To specify authentication, use either the current user’s Windows login information:

conn.Open("DSN=Adobe Workflow Server;MSLOGON=Enabled");

or a Workflow Server login name and password.

Using the Objects Using the Workflow Server Query Objects 95

Querying Connection Information

The State property of the Connection object returns the value of the current state of the connection. The

value 0 indicates that the connection is closed. The value 1 indicates that the connection is open. This

property is read-only. To open or close the connection, use the Open and Close methods of the

Connection object.

The Properties collection contains Property objects that provide additional information about the current

connection. This collection is usually indexed by the property name being queried.

The following code queries the version of the Workflow Agent that you are connected to:

'Create a Connection

DIM conn, version

SET conn = Server.CreateObject("EPSDK.Connection")

conn.Open "DRIVER={Adobe Workflow Server Driver};UID=Tony;PWD=blue"

version = conn.Properties("Agent Version")

The following code retrieves the EPSDK.User object for the connected user:

user = conn.Properties("User")

If the display name is not needed, use the following code to retrieve just the user number:

user = conn.Properties("User ID")

This is a more efficient method for identifying the user.

Creating and Using a Recordset

The Recordset object is used to query Workflow Agent data and retrieve the results. Queries are specified

using a SQL query syntax on an open Connection object.

Opening a Recordset

For convenience, the Connection object contains an Execute method which returns an initialized

recordset:

var conn = Server.CreateObject("EPSDK.Connection");

conn.Open("DRIVER={Adobe Workflow Server Driver};UID=Tony;PWD=blue");

var rs = conn.Execute( "SELECT FormName FROM StartTasks" );

Alternatively, you can use this code:

var rs = Server.CreateObject("EPSDK.Recordset");

rs.Open("SELECT FormName FROM StartTasks",

"DRIVER={Adobe Workflow Server Driver};UID=Tony;PWD=blue")

Navigating a Recordset

Recordsets are read-only and forward-only. This means that the data that Workflow Agent holds cannot

be changed through a recordset (read-only) and a recordset can only be navigated in the forward

direction (forward-only).

Using the Objects Using the Workflow Server Query Objects 96

The EOF property of the Recordset object is used to detect if there are any more rows to retrieve from the

recordset. After a recordset is opened, this property must be checked before attempting to access any data

from the Recordset object:

rs.Open("SELECT FormName FROM StartTasks",

"DRIVER={Adobe Workflow Server Driver};UID=Tony;PWD=blue");

IF rs.EOF THEN

' there are no start tasks

ELSE

' navigate the recordset and retrieve the form names

END IF

The Move and MoveNext methods are used to position to a particular row relative to the current row or

the next row, respectively:

rs.Open("SELECT FormName FROM StartTasks",

"DRIVER={Adobe Workflow Server Driver};UID=Tony;PWD=blue");

rs.Move 11

IF rs.EOF THEN

' there are no start tasks after the 10th one

ELSE

' Position to the 12th record.

rs.MoveNext

END IF

Accessing Data From a Recordset

The Fields collection of the Recordset object contains one Field object for each column mentioned in the

query statement’s column list. The Fields collection can be viewed as a window on the current row of the

recordset and the Field objects contain the data values for each column in that row.

rs.Open("SELECT FormName FROM StartTasks",

"DRIVER={Adobe Workflow Server Driver};UID=Tony;PWD=blue");

IF(! rs.EOF) {

do {

var formName = rs.Fields.Item(0).Value;

rs.MoveNext();

}

while (! rs.EOF);

}

Using the Objects Using the SQL Query Model 97

Because the Fields collection is the default property of the Recordset object, the Item(index) method is the

default property of the Fields collection object, and the Value property is the default property of the Field

object, accessing a field value can be shortened to:

formName = rs("FormName")

It is more efficient to use the numeric index when possible:

formName = rs(0)

A more efficient method for retrieving a field value is to use the Collect method of the Recordset object.

The following code is equivalent to all of the above methods:

formName = rs.Collect("FormName")

' equivalent to: formName = rs.Fields.Item("FormName").Value

Each column returns a particular type of field value. These can be intrinsic types like integer and string, or

objects like EPSDK.User or EPSDK.FormTypes:

rs.Open("SELECT Worklist FROM WorkItems WHERE

ReferenceID='14.2'", "DRIVER={Adobe Workflow Server Driver};

UID=Tony;PWD=blue");

IF(! rs.EOF) {

var user = rs.Collect(0);

var displayName = user.DisplayName;

var userNumber = user.UserNumber;

}

USING THE SQL QUERY MODEL

Using the Connection and Recordset objects, you can query all the Workflow Agent data available to the

authenticated user.

Work Item Queries

Work item queries can be used for many purposes. The worklist is an example of a particular kind of work

item query, as is a query returning the routing history of a work item from the initial work item of the

process instance. This section will show query examples for common work item recordsets.

A particular user’s worklist can be defined in many ways. Each definition requires a different variation of

the WHERE clause in a worklist query.

If you define a worklist to be the set of work items owned by a user, the following SQL statement can be

used as a template for this query:

SELECT columns FROM WorkItems WHERE State IN (1,2) AND

Owner = userID

In this query, the WorkItems are selected based on their State being active (State=1) or active with

reminders (State=2), and the work item being assigned to a particular user (userID). The user number is

Using the Objects Using the SQL Query Model 98

usually obtained from the value of Properties(“User ID”) property of the Connection object. The

columns are any of the columns from the WorkItems table.

A code example which selects the process name, worklist owner, task name, and task instructions columns

for the work list of user Tony Blue looks like this:

var conn = Server.CreateObject("EPSDK.Connection");

conn.Open("DRIVER={Adobe Workflow Server Driver};

UID=Tony;PWD=blue");

var userID = conn.Properties("User ID").Value;

var rs = conn.Execute( "SELECT Processes.ProcessName, Owner, TaskName,

TaskInstructions FROM WorkItems WHERE State IN (1,2) AND Owner = " + userID

);

while (! rs.EOF) {

var processName = rs.Collect(0);

var owner = rs.Collect(1);

var taskName = rs.Collect(2);

var taskInstr = rs.Collect(3);

rs.MoveNext();

}

conn.Close();

Ordering and Sorting Work Items

The above query does not apply any ordering to the work items. The work items with reminders are

mixed in with the work items without reminders. You may want to display work items with reminders

before other work items, or newer work items before older work items. This functionality requires an

ORDER BY clause:

SELECT columns FROM WorkItems WHERE State IN (1,2) AND

Owner = userID ORDER BY State DESC, StartDate DESC

This code will result in the work items with reminders to appear first, sorted by the start date. The work

items without reminders will appear next, also sorted by the start date.

You may also want to show the work items that have deadlined. These work items cannot be completed by

the user, but an application might want to display to the user the deadline message, as specified in the

DeadlineMessage column in “WorkItems Table” on page 88. The work items that reached a deadline are

indicated with a State value of 3, so the query would include:

SELECT columns FROM WorkItems WHERE State IN (1,2,3) AND

Owner = userID ORDER BY State DESC, StartDate DESC

Work items that reached a deadline, can have their state changed from 3 (deadlined) to 0 (inactive) by

using the ResetDeadline method of the WorkItems object:

var workItems = Server.CreateObject("EPSDK.WorkItems");

workItems.Open("DRIVER={Adobe Workflow Server Driver};UID=Tony;

PWD=blue");

workItems.ResetDeadline( refID );

Using the Objects Using the StartTasks and WorkItemData Objects 99

The reference ID (refID) is obtained from the ReferenceID column in the WorkItems table, which can be

included in the worklist query. After resetting the deadline state to 0, it will no longer satisfy the condition

State IN (1,2,3) and will therefore not be returned by the worklist query. The user of the application will

not see this work item in the worklist.

Shared Worklists

Workflow Server allows users to share their worklists. When a worklist is shared, the user to whom it is

shared can open work items from the worklist of the other user. The sharing status of a worklist can be

queried via the WorklistShares table. To list all the worklists that are shared to a particular user (userID),

use the following query:

SELECT Worklist FROM WorklistShares WHERE User = userID

Any of these worklists can be queried to display a shared worklist for a particular user:

SELECT columns FROM WorkItems WHERE State IN (1,2) AND

Owner = sharedWorklist ORDER BY State DESC, StartDate DESC

Do not allow a user other than the worklist’s owner to see and remove work items that reached a deadline.

When a user opens a work item from a shared worklist, the work item can be locked by that user. Locked

work items are denoted by the Participant column in the WorkItems table being set to the user who

opened an active work item. For a completed work item, the Participant column in the WorkItems table is

set to the user who completed the work item. You may want to include work items that are not only

owned by a particular user (Owner = userID) but also those that are locked by a particular user

(LockedBy=userID):

SELECT columns FROM WorkItems WHERE State IN (1,2,3) AND

(Owner = userID OR LockedBy=userID) ORDER BY

State DESC, StartDate DESC

USING THE STARTTASKS AND WORKITEMDATA OBJECTS

Use two objects, StartTasks and WorkItemData, to create and continue a process instance.

Creating a Process Instance

To create a new process instance, use the CreateProcessInstance method of the StartTasks object,

identifying the process and optionally a start task name and a form name.

To specify a process, use either a process identifier or a process name. Although using the process

identifier is more efficient, you will need to update it every time you create a new version of the process

map. When you save a modified process map as a new process version, Workflow Agent assigns a new

process identifier to the process. The process name provides a version independent process identification,

but is less efficient as it causes a separate process identifier lookup.

Specify the name of the start task if the process has more than one start task. Specify the form name if the

process has more than one start form.

If the call is successful, a reference identifier associated with the first work item is returned. This reference

identifier is used when completing a work item using the WorkItemData object.

Using the Objects Using the StartTasks and WorkItemData Objects 100

The following JScript code creates a new instance of the “My_Process” process:

// Create a StartTasks object

var st = Server.CreateObject("EPSDK.StartTasks");

// Connect to Workflow Agent

st.Open("DSN=Adobe Workflow Server;UID=Tony;PWD=blue");

// Create a new process instance, and save the reference ID for later

var refID = st.CreateProcessInstance("My_Process");

// Close the connection to Workflow Agent

st.Close();

The new work item is assigned a state of -1 in the State column of the WorkItems table to indicate that this

is an incomplete initial work item.

Retrieving a Work Item

A work item’s data is defined by the form data and any attachments. The form data can be retrieved as

XML from the XMLData column in the WorkItems table. The attachments are found in the Attachments

table.

Work items can be displayed in a Web browser using one of the form templates specified in the process

map. The form template used to display a work item depends on the user’s form preferences (see the

PreferredWebForms column in “Users Table” on page 86). Forms can be designed using either HTML

technology with HTML editors, or as XFA templates designed with Adobe Form Designer. Forms

designed as XFA templates can be used to generate a browser-specific representation of the form using

Form Server technology.

Displaying a work item can be accomplished using the WorkItems object and either the GetWebForm or

WriteWebForm method. If you are using Microsoft ASP, WriteWebForm is the preferred choice since it

encapsulates much of the code required for writing the HTTP Response containing the form.

The following example uses the URL parameter named RefID to determine which work item to display.

After a connection with Workflow Agent is opened, the WriteWebForm method is called to write the form

as the HTTP response. This is why the Response object is passed as a parameter.

<%@ LANGUAGE="JScript" %>

<%

var refID = Request.QueryString("RefID");

var conn = Server.CreateObject("EPSDK.Connection");

conn.Open("Driver={Adobe Workflow Server Driver};MSLOGON=Enabled");

conn.FormPaths("HTML") = Server.MapPath("HTML/") + "\\";

var wi = Server.CreateObject("EPSDK.WorkItems");

wi.ActiveConnection = conn;

wi.WriteWebForm( Response, refID );

wi.Close();

%>

Displaying A Work Item Using a Form Server Form

A form that is tailored to the capabilities of the user’s browser can be served when all three of the

following conditions are satisfied:

• The user's Web form preferences indicate that they want a Form Server form to be served.

Using the Objects Using the StartTasks and WorkItemData Objects 101

• The application Web server has Form Server technology installed.

• An XFA template is available for this work item (for example, WorkItems.FormTypes contains the

value itCaptureWebForm or itReachForm).

This requires passing extra parameters to the WorkItems object's GetWebForm and WriteWebForm

methods. These parameters allow for Form Server to merge the work item data with the form template

and produce content that the client application (usually a browser) can display.

The following example displays the work item using the Form Server form. Note that this code requires

Form Server to be properly configured for calling the Web application, and in particular the forms

subdirectories must be present either as physical or virtual subroots.

<%@ LANGUAGE="JScript" %>

<%

var browserCap = Server.CreateObject("FormServer.BrowserCapabilities");

browserCap.UserAgent = Request.ServerVariables("HTTP_USER_AGENT");

var repository = Server.CreateObject("FormServer.LocalFormRepository");

repository.RepositoryWebRoot = "http://server/web/WebForms/";

repository.RepositoryDirectory = Server.MapPath("WebForms") + "\\";

context = Server.CreateObject("FormServer.ApplicationContext");

context.FSWebRoot = "FormServer/";

context.FSDirectory = Server.MapPath(context.FSWebRoot) + "\\";

context.BrowserCapabilities = browserCap;

context.FormRepository = repository;

var refID = Request.QueryString("RefID");

var wi = Server.CreateObject("EPSDK.WorkItems");

wi.Open("DRIVER={Adobe Workflow Server Driver};MSLOGON=Enabled");

wi.WriteWebForm( Response, refID, "Reach", context,

http://server/web/Submit.asp" );

wi.Close();

%>

When using Form Server to create the displayed form, the target for the 'submit' action can be specified

programmatically, as above with “Submit.asp”.

Work Item Attachments

The attachments for a particular work item are queried from the Attachments table. Use the

AttachmentControl column in the WorkItems table to determine access to the attachments of a particular

work item. The following code shows how to retrieve all the attachments for a particular work item:

DIM rs

SET rs = CreateObject("EPSDK.Recordset")

rs.Open "SELECT Name, Data FROM Attachments WHERE ReferenceID = '" & refID &

"'", "DSN=Adobe Workflow Server"

DO WHILE NOT rs.EOF

Using the Objects Using the StartTasks and WorkItemData Objects 102

DIM name, data

name = rs.Collect(0)

SET data = rs.Collect(1)

rs.MoveNext

END WHILE

rs.Close

Note that the Data column of the Attachments table returns an EPSDK.BinaryData object.

Completing a Work Item

Work items are completed by submitting the data for the work item along with any attachment additions,

deletions, or modifications. An action and a participant, if the action is a user-driven action, can be

specified. These actions are carried out throughout the WorkItemData object and one of the form data

objects (XMLData or WWWFormData).

The following example shows an ASP page which is the target of an HTTP POST from a form created by

using the GetWebForm or WriteWebForm methods of the WorkItems object:

<%@ LANGUAGE=Jscript %>

<%

// Get the POSTed data into a data object.

var wi = Server.CreateObject("EPSDK.WorkItems");

var data = wi.ProcessWebForm ("Request");

// Create and open a work item data object.

var wid = Server.CreateObject("EPSDK.WorkItemData");

wid.Open( "DSN=Adobe Workflow Server" );

// Get the reference ID from the data. The Agent

// put it there when the work item was retrieved.

var refID = formData.GetField("JFWF_TRANID");

// Submit the data to complete the work item.

wid.BeginSubmit( refID );

wid.Submit( data.Content );

%>

If the work item required an action or participant to be specified, these parameters can be added to the

Submit method.

wid.Submit( formdata, "The Action", "Jody Tan" );

You can also use the Action object resulting from the Validate method of the Actions object as the second

parameter.

var actions = CreateObject("EPSDK.Actions");

actions.ActiveConnection = wid.ActiveConnection;

var action = actions.Validate(refID, "The Action", "Jody Tan" );

if (action.IsValid)

wid.Submit( refID, action );

Using the Objects Using the StartTasks and WorkItemData Objects 103

Attachments can be added, deleted, or modified using the Attachments methods of the WorkItemData

object. These methods must be called between the BeginSubmit and Submit method calls.

The following code adds the expense.xls spreadsheet as a read-only (1) attachment to the work item:

var data = Server.CreateObject("EPSDK.BinaryData");

data.LoadFromFile( "expense.xls" );

wid.AddAttachment( "expense.xls", 1, data );

When the work item is successfully completed, its state ) will change to 0 - Inactive and its completion

date will be filled. For more information, see the State column in “WorkItems Table” on page 88 and the

EndDate column in “WorkItems Table” on page 88.

The next participant, according to the process rules, will receive the work item data.

Processing a Form Server Form Work Item

If you are using Form Server, the code to process the data submission must also use it.

<%@ LANGUAGE="JScript" %>

<%

var browserCap = Server.CreateObject("FormServer.BrowserCapabilities");

browserCap.UserAgent = Request.ServerVariables("HTTP_USER_AGENT");

var repository = Server.CreateObject("FormServer.LocalFormRepository");

repository.RepositoryWebRoot = "http://server/web/WebForms/";

repository.RepositoryDirectory = Server.MapPath("WebForm") + "\\";

context = Server.CreateObject("FormServer.ApplicationContext");

context.FSWebRoot = "FormServer/"

context.FSDirectory = Server.MapPath(context.FSWebRoot) + "\\";

context.BrowserCapabilities = browserCap;

context.FormRepository = repository

// get the POSTed data into a data object

var wi = Server.CreateObject("EPSDK.WorkItems");

var data = wi.ProcessWebForm( Request, context, Response );

if (data.Type == 0) { // 0 == FormServer Submit action

// create and open a work item data object

var wid = Server.CreateObject("EPSDK.WorkItemData");

wid.Open( "DSN=Adobe Workflow Server" );

// Get the reference ID from the data. The Agent

// put it there when the work item was retrieved.

var refID = formData.GetField("JFWF_TRANID");

// Submit the data to complete the work item.

wid.BeginSubmit( refID );

wid.Submit( data.Content );

}

%>

Using the Objects Using the Data Management Objects 104

USING THE DATA MANAGEMENT OBJECTS

For different types of data, you can manipulate form data using these form data objects: BinaryData,

XMLData, and WWWFormData.

The XMLData and WWWFormData objects implement a common COM interface, IFormData, which

allows the form data objects to:

• Set and get their native data format using the BinaryData object.

• Set and get an XML representation of the native format.

• Set and get fields within the data.

Each of the form data objects has methods and properties specific to that particular data type. The form

data objects are used with the WorkItemData object.

The following VBScript code is one example of how you can manipulate form data in various formats:

Dim oBinData, oXMLData, sFieldValue

Set oBinData = CreateObject("EPSDK.BinaryData")

Set oXMLData = CreateObject("EPSDK.XMLData")

' Load a file's Binary data into the object

oBinData.LoadFromFile ("c:\XMLData.xml")

' Fill the XMLData object with XMLData

oXMLData.SetData oBinData

'Set a field in the XML

' (if it doesn't exist it will be created, otherwise it will set the

' pre-existing field)

oXMLData.SetField "Title", "Manager"

' Get the Contents of a field

sFieldValue = oXMLData.GetField("Title")

Set oBinData = Nothing

Set oXMLData = Nothing

The same code in JScript would be as follows:

var oBinData = CreateObject("EPSDK.BinaryData");

var oXMLData = CreateObject("EPSDK.XMLData");

// Load a file's Binary data into the object

oBinData.LoadFromFile ("c:\XMLData.xml");

// Fill the XMLData object with XMLData

oXMLData.SetData(oBinData);

// Set a field in the XML

// (if it doesn't exist it will be created, otherwise it will set the

Using the Objects Setting User Preferences 105

// pre-existing field)

oXMLData.SetField("Title", "Manager");

// Get the Contents of a field

var sFieldValue = oXMLData.GetField("Title");

oBinData = null;

oXMLData = null;

SETTING USER PREFERENCES

Using the Users object, you can set one or more preferences for a user, as in this example:

var oConn, oUsers, oXMLdata, oRecordSet, oRecordSet, oUsersPrefsGet ;

var sQuery, sUsersPrefsSet, sDefaultPhone, sOutofOfficeEmail;

oConn = Server.CreateObject("EPSDK.Connection");

oUsers = Server.CreateObject("EPSDK.Users");

oConn.Open("yourConnectionString");

oUsers.ActiveConnection = oConn;

// Seting Preferences:

sUsersPrefsSet = "<root><defaultPhone>123-4567</defaultPhone>

<outofOfficEmail>bob@adobe.com</outofOfficEmail></root>" ;

//The defaultPhone and outofOfficEmail are 2 preferences for Bob,

//you can set as many as you want.

oUsers.SetUserPreferences(sUsersPrefsSet);

// make sure there is a "Bob" or whomever you are referring to in Users'

// directory

oUsers.Update( "Bob" );

// Retrieving Preferences:

sQuery = "SELECT UserPrefs FROM Users WHERE DisplayName = 'Bob'";

oRecordSet = oConn.Execute(sQuery);

oUsersPrefsGet = oRecordSet.Collect(0);

oRecordSet.Close();

oRecordSet = null;

// oUsersPrefsGet is a BinaryData object. You can write it to a file or do

// the following:

oXMLdata = Server.CreateObject("EPSDK.XMLData");

oXMLdata.SetData(oUsersPrefsGet);

sDefaultPhone = oXMLdata.GetField("defaultPhone");

sOutofOfficeEmail = oXMLdata.GetField("outofOfficeEmail");

oConn.Close( );

oConn = null;

// Now you get the preference defaultphone and outofOfficeemail back

// for the user.

4 Web Access

Web Access is a Web application written using Microsoft Active Server Page (ASP) technology running on

Microsoft Internet Information Server. It provides a generalized user interface for Workflow Server

applications. Web Access supports user authentication, worklists, work item history, opening and

submitting work items, process initiation, searching, and user preferences.

ASP SOURCE CODE

The Web Access ASP source is provided with the Object Library. It provides a convenient way to learn

how a generalized front-end for Workflow Agent can be implemented using the Object Library interfaces.

This code can be used as a basis for particular functionality in applications written using the Object

Library.

The ASP code can also be used as a learning tool for ‘how to’ questions involving specific areas of

functionality, such as querying and displaying a worklist, creating a new process instance, or opening a

work item. The code is not intended to be a callable interface for third-party applications. Future versions

of Web Access may not include these ASPs or their query parameters may not be the same.

When working with the Web Access source code, it is important to remember that this application is a

generalized user interface for Workflow Agent. This means that it can handle any Workflow Server

process, all authentication schemes, test mode process initiation, missing actions and delegates in

submissions, all possible Workflow Server form types, and display highly customizable work item queries.

When building a specific front-end using the Object Library, you may require only part of the

functionality. A particular application's user interface might be significantly different from the Web

Access generalized interface. It is therefore important not to view the Web Access ASP code as a “black

box” that can simply be used as is. Instead, the code should be used as a resource to learn from, and to

pick and choose implementation pieces for use when developing your own front-end.

IMPLEMENTATION STRUCTURE

This section provides an overview of the Web Access features. It describes the ASP files used with Web

Access. Effective use of this ASP source requires thorough knowledge of ASP application development,

HTML, VBScript and JScript, and the Object Library.

Note Web Access uses the Simple Object Access Protocol (SOAP) to exchange data with Adobe Form

Server. To see how the SoapClient object is used in Web Access, review the code in

workontask.asp and submitform.asp. For detailed information about the SoapClient object, refer

to the Adobe Form Server documentation.

Startpoint and Menu Bar

The main window for Web Access consists of a frameset with two subframes, one for the menu bar and

the other for menu item content. webaccess.asp sets up the frameset and chooses which menu item

content to display. menubar.asp displays the menu bar with appropriate links (HREF) to choose content.

Web Access Implementation Structure 107

Authentication

loginform.asp handles authentication while default.asp handles prompting for user names and

passwords. Every content page includes inc/authenticate.inc, which checks the user's authentication status

and re-authenticates if necessary.

Work Item Queries

The worklist, work item history, and work item searches are all examples of work item queries. These are

performed in worklist.asp, transhistory.asp, trackresult.asp (simple search), and trackadvresult.asp

(advanced search) respectively.

All of these queries are configurable, via preferences, with the ability to choose which columns are

displayed. Available columns and column headings are defined within functions in inc/columndef.inc.

inc/{worklist,workhistory,tracking,trackadv}sql.inc along with inc/formatsqlstmt.inc construct the SQL

statement appropriately. Column data is formatted for display in inc/formatsqlcolumn.inc.

All of these queries allow for paging through the recordset that is returned from the query and is done

using helper code in inc/paging.inc.

Process Initiation

The list of processes to initiate is shown in initiateactivity.asp and the initiation of a particular process in

initiate.asp. From initiate.asp the initial work item is opened using starttask.asp.

Opening and Completing a Work Item

The work item query pages described above display an open icon on each work item row. The HREF for

this image invokes starttask.asp which handles test mode, work item availability and attachments.

workontask.asp displays the work item and attachments.asp displays any attachments.

When work items are submitted, the submit targets submitform.asp and this ASP invokes

submitcontrol.asp, useractions.asp (prompting for missing actions and delegates), and then

sendworkitem.asp to complete the work item. The useractions.asp always executes when a work item is

submitted to perform action validation. A frame loads useractions1.asp, which is the page that prompts

for a missing action or participant.

User Preferences

Preferences are displayed from preferences.asp. prefform.asp is the target of the <FORM> submit and

updates the user's preferences.

Logging Out

logout.asp discards the user's connection information and allows the user to login again.

Web Access Implementation Structure 108

Language-Specific Content

Web Access is designed to be multilingual in the sense that the same Web installation of Web Access can

serve content in a variety of languages. This is done using a proprietary component which loads string

resources at ASP execution time.

Index

A

accessing data from recordset 96

Action object (Object Library) 13

ActionName property 13

ActionParticipants table 79

Actions object 15

Actions table 79

ActionType property 13

ActiveConnection property 12

Add method 44, 56, 74

AddAttachment method 52, 66

Agent errors 91

Append method 34

AppendChunk method 18

Applications table 80

attachments 101

Attachments table 80

attachments.asp 107

authenticate.inc 107

authenticating users 94

B

Begin method 52

BeginSubmit method 66

BinaryData object 17

C

Cancel method 53

CancelSubmit method 66

Clear method 28

Close method 12, 24, 43

Collect method 43

collections

Errors 28

Fields 30

FormTypes 32

Properties 39

common methods 12

common properties 11

Complete method 53

completing work item 102

connecting to Agent 94

connection

opening 94

state 95

Connection object 19

connection objects 10

ConnectionString property 19

constants 11

Contains method 34

ContainsOnlyEMailForms property 33

ContainsWebForms property 33

Content property 31

ContentType property 32

Count property 28, 30, 33, 39

CreateNewVersion method 45

CreateNode method 45

CreateProcessInstance method 50

creating process instance 99

D

data management objects 11

DateCreated property 48

DateTime object 25

DateUpdated property 48

default.asp 107

defining the worklist 97

Delete method 46

DeleteAttachment method 54, 67

deprecated methods

GetWebForm 69

WriteWebForm 73

Description property 26

DisplayName property 55

E

EOF property 41

Error object 26

Errors collection 28

Errors property 21

errors, Agent 91

Execute method 24

Index 110

F

Field object 29

field value objects 11

Fields collection 30

Fields property 42

form data 35

form data object, using 104

formatsqlcolumn.inc 107

formatsqlstmt.inc 107

FormContent object 31

FormPaths property 21

FormTypes collection 32

FullPath property 48

G

GetChunk method 18

GetData method 36

GetField method 36

GetFullObjectPath method 46

GetNode method 46

GetWebForm method 69

GetXFAModel method 76

GetXML method 37

I

IFormData interface 35

include files 11

initiateactivity.asp 107

interface, IFormData 35

intiate.asp 107

IsActionUserDriven property 14

IsValid property 14

IsValidAction property 15

IsValidParticipant property 15

Item method 29, 31, 34, 40

J

JetFormXFAData object 38

L

LoadFromFile method 18

LockWorkItem method 69

loginform.asp 107

logout.asp 107

M

menubar.asp 106

MergeWebForm method 70

methods

Add 44, 56, 74

AddAttachment 52, 66

Append 34

AppendChunk 18

Begin 52

BeginSubmit 66

Cancel 53

CancelSubmit 66

Clear 28

Close 12, 24, 43

Collect 43

common 12

Complete 53

Contains 34

CreateNewVersion 45

CreateNode 45

CreateProcessInstance 50

Delete 46

DeleteAttachment 54, 67

Execute 24

GetChunk 18

GetData 36

GetField 36

GetFullObjectPath 46

GetNode 46

GetWebForm 69

GetXFAModel 76

GetXML 37

Item 29, 31, 34, 40

LoadFromFile 18

LockWorkItem 69

MergeWebForm 70

Move 43

MoveNext 44

Open 12, 24, 42

ProcessWebForm 71

Remove 35, 56, 74

ResetDeadline 72

SendEmail 72

SetApplicationState 47

SetCustomField 57

SetCustomFields 57

SetData 37

SetDefaultWorklist 58

SetDisplayName 58

SetEmailAddress 58

Index 111

methods (Continued)

SetEmailNotification 59

SetField 37

SetLastAccess 59

SetLink 60

SetLogin 60

SetLoginPassword 61

SetOutOfOffice 61

SetPermission 62

SetPermissions 62

SetPreferredEmailForms 63

SetPreferredWebForms 63

SetSysLogin 64

SetUser 74

SetUserPreferences 64

SetWorklist 75

SetXFAModel 76

SetXML 38

StartAgent 25

StopAgent 25

Submit 67

Terminate 39

UnlockWorkItem 72

Update 65

UpdateAttachment 54, 68

Validate 16

WriteToFile 19

WriteWebForm 73

Move method 43

MoveNext method 44

N

Name property 29, 40

NativeError property 27

navigating recordset 95

NodeID property 48

NodeName property 49

Number property 27

O

objects

Action 13

Actions 15

BinaryData 17

Connection 19

DateTime object 25

Error 26

Errors 28

objects (Continued)

Field 29

Fields 30

FormContent 31

FormTypes 32

JetFormXFAData 38

ProcessInstances 38

Properties 39

Property 40

Recordset 41

Repository 44

RepositoryNode 47

StartTasks 50

StatelessWorkItemData 51

User 54

Users 55

WorkItemData 65

WorkItems 68

WorklistShares 74

WWWFormData 75

XMLData 75

Open method 12, 24, 42

opening connections 94

opening recordsets 95

ordering work items 98

Overview of objects 10

P

paging.inc 107

Participant property 15

PDF submit 70

preferences.asp 107

prefform.asp 107

process instance, create 99

Processes table 81

ProcessInstances object 38

ProcessInstances table 82

ProcessWebForm method 71

program identifier 11

properties

ActionName 13

ActionType 13

ActiveConnection 12

common 11

ConnectionString 19

ContainsOnlyEMailForms 33

ContainsWebForms 33

Content 31

ContentType 32

Index 112

properties (Continued)

Count 28, 30, 33, 39

DateCreated 48

DateUpdated 48

Description 26

DisplayName 55

EOF 41

Errors 21

Fields 42

FormPaths 21

FullPath 48

IsActionUserDriven 14

IsValid 14

IsValidAction 15

IsValidParticipant 15

Name 29, 40

NativeError 27

NodeID 48

NodeName 49

Number 27

Participant 15

Properties 22

Size 17

Source 27, 42

SQLState 27

State 23

Type 32, 49

UserID 55

Value 17, 26, 30, 41, 49

XMLFormat 23

Properties collection 39

Properties property 22

Property object 40

R

reach form, using 100

recordset

accessing data 96

creating 95

navigating 95

opening 95

using 95

Recordset object 41

recordset objects 10

Remove method 35, 56, 74

Repository object 44

Repository table 83

RepositoryNode object 47

RepositoryTypes table 83

ResetDeadline method 72

retrieving work item 100

RoleSets table 84

S

SearchData table 85

SearchFields table 85

SELECT statement 77

SendEMail method 72

sendworkitem.asp 107

SetApplicationState method 47

SetCustomField method 57

SetCustomFields method 57

SetData method 37

SetDefaultWorklist method 58

SetDisplayName method 58

SetEMailAddress method 58

SetEMailNotification method 59

SetField method 37

SetLastAccess method 59

SetLink method 60

SetLogin method 60

SetLoginPassword method 61

SetOutOfOffice method 61

SetPermission method 62

SetPermissions method 62

SetPreferredEMailForms method 63

SetPreferredWebForms method 63

SetSysLogin method 64

SetUser method 74

SetUserPreferences method 64

SetWorklist method 75

SetXFAModel method 76

SetXML method 38

Size property 17

SOAP 106

sorting work items 98

Source property 27, 42

SQL 77

SQL query model 97

SQL syntax definition 77

SQLState property 27

StartAgent method 25

starttask.asp 107

StartTasks object 50

StartTasks table 85

state of the connection 95

State property 23

StatelessWorkItemData object 51

Index 113

StopAgent method 25

Submit method 67

submitcontrol.asp 107

submitform.asp 107

submitting data 102

T

tables

ActionParticipants 79

Actions 79

Applications 80

Attachments 80

Processes 81

ProcessInstances 82

Repositiory 83

RepositoryTypes 83

RoleSets 84

SearchData 85

SearchFields 85

SQL syntax definition 77

StartTasks 85

Users 86

WorkItems 88

WorklistShares 91

target URL for PDF 70

Terminate method 39

trackadvresult.asp 107

trackadvsql.inc 107

trackingsql.inc 107

trackresult.asp 107

transhistory.asp 107

Type property 32, 49

U

UnlockWorkItem method 72

Update method 65

UpdateAttachment method 54, 68

User object 54

useractions.asp 107

UserID property 55

Users object 55

Users table 86

V

Validate method 16

Value property 17, 26, 30, 41, 49

W

webaccess.asp 106

work item

attachments 101

completing 102

displaying using reach form 100

retrieving 100

workhistorysql.inc 107

WorkItemData 65

WorkItemData object 65

WorkItems object 68

WorkItems table 88

worklist

defining 97

sorting work items 98

worklist.asp 107

WorklistShares object 74

WorklistShares table 91

worklistsql.inc 107

workontask.asp 107

WriteToFile method 19

WriteWebForm method 73

WWWFormData object 75

X

XMLData object 75

XMLFormat property 23

 

 

posted on 2006-04-26 00:31  徐中  阅读(466)  评论(0编辑  收藏  举报

导航