KEMBAR78
Agilepoint Web Services Api Guide: Enabling Next Generation Agile, Adaptive and Process-Managed Enterprise | PDF | Business Process Management | Web Service
0% found this document useful (0 votes)
741 views180 pages

Agilepoint Web Services Api Guide: Enabling Next Generation Agile, Adaptive and Process-Managed Enterprise

AGILE POINT 5.0 WEBSERVICE MANUAL

Uploaded by

施晓钟
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
741 views180 pages

Agilepoint Web Services Api Guide: Enabling Next Generation Agile, Adaptive and Process-Managed Enterprise

AGILE POINT 5.0 WEBSERVICE MANUAL

Uploaded by

施晓钟
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 180

ENABLING NEXT GENERATION AGILE, ADAPTIVE AND PROCESS-MANAGED ENTERPRISE

AGILEPOINT WEB SERVICES API GUIDE


A REFERENCE TO AGILEPOINT WEB SERVICE APIS

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


2 AgilePoint Web Services API Guide

Revision History
Date Version Description
April 10, 2008 1.0 Updated
July 12, 2009 1.1 Updated
January 16, 2010 1.2 Updated and Revised

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


3 AgilePoint Web Services API Guide

TABLE OF CONTENTS

Disclaimer of Warranty ............................................................................................................................................10

Architecture .................................................................................................................................................................11

Autonomous BPMS ..................................................................................................................................................11

Embedded BPMS .....................................................................................................................................................12

Terminology .................................................................................................................................................................13

Process Definition ....................................................................................................................................................13

Activity .....................................................................................................................................................................13

Process Instance (Process) .......................................................................................................................................13

Activity Instance ......................................................................................................................................................13

Work Item (Task) .....................................................................................................................................................13

Overview of Business Process Data Structure .........................................................................................................14

Relationships between Entities ...............................................................................................................................15

Basic Programming Tasks .......................................................................................................................................16

Authentication .........................................................................................................................................................16

Namespace Reference .............................................................................................................................................17

Catching Exceptions .................................................................................................................................................17

Making Calls .............................................................................................................................................................17

Common Methods .......................................................................................................................................................19

Check Authentication ..............................................................................................................................................19

Surrogate .................................................................................................................................................................20

Set Client AppLication Name ...................................................................................................................................22

Set Client Locale.......................................................................................................................................................23

Surrogate With Application Name and Locale .........................................................................................................24

Process Definition Methods ........................................................................................................................................25

Create Process Definition ........................................................................................................................................26

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


4 AgilePoint Web Services API Guide

Release Process Definition.......................................................................................................................................27

CheckOut Process Definition ...................................................................................................................................28

Uncheckout Process Definition ................................................................................................................................29

Check In Process Definition .....................................................................................................................................30

Delete Process Definition ........................................................................................................................................31

Get Base Process Definition ID ................................................................................................................................32

Get Process Definitions ............................................................................................................................................33

Get Process Definition Graphics ..............................................................................................................................34

Get Process Definition Name and Version...............................................................................................................36

Get Process Definition XML .....................................................................................................................................37

Get Released Process Definition ID .........................................................................................................................39

Get Released Process Definitions ............................................................................................................................40

Get Process Definition By Base Process Definition ID .............................................................................................41

Update Process Definition .......................................................................................................................................42

Methods for Process Instances ....................................................................................................................................43

Create Process Instance ...........................................................................................................................................43

Create Process Instance With extended parameters ..............................................................................................45

Create Process Instance With extended parameters (Overloaded) ........................................................................47

Create Process Instance With extended parameters (Overloaded) ........................................................................49

Cancel Process Instance ...........................................................................................................................................51

Delete Process Instance ...........................................................................................................................................52

Merge Process Instance ...........................................................................................................................................53

Migrate Process Instances .......................................................................................................................................55

Promote Process Instance .......................................................................................................................................56

Rollback Process Instance ........................................................................................................................................57

Split Process Instance ..............................................................................................................................................58

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


5 AgilePoint Web Services API Guide

Start Process Instance..............................................................................................................................................60

Suspend Process Instance ........................................................................................................................................61

Get Events By Process Instance ID ...........................................................................................................................62

Get Process Instance................................................................................................................................................63

Get Process Instance Attributes ..............................................................................................................................64

Get Process Instance Attributes ..............................................................................................................................66

Query Process Instances ..........................................................................................................................................67

Query Process Instances (Extended Method)..........................................................................................................68

Update Process Instance .........................................................................................................................................69

Methods for Activity Instances ....................................................................................................................................71

Cancel Activity Instance ...........................................................................................................................................71

Get Activity Instance ................................................................................................................................................72

Get Activity Instance Status .....................................................................................................................................73

Get Activity Instances By Process Instance ID .........................................................................................................74

Query Activity Instances ..........................................................................................................................................75

Rollback Activity Instance ........................................................................................................................................76

Rollback Activity Instances ......................................................................................................................................77

Methods for Automatic Work Items (Procedures) ......................................................................................................78

Cancel Procedure .....................................................................................................................................................78

Complete Procedure ................................................................................................................................................79

Get Procedure..........................................................................................................................................................80

Query Procedure List ...............................................................................................................................................81

Methods for Manual Work Items (Tasks) ....................................................................................................................82

Assign Work Item .....................................................................................................................................................82

Assign Work Item (Extended Method) ....................................................................................................................83

Cancel Work Item ....................................................................................................................................................84

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


6 AgilePoint Web Services API Guide

Cancel Work Item (Extended method) ....................................................................................................................85

Complete Work Item ...............................................................................................................................................86

Complete Work Item (Extended Method) ...............................................................................................................87

Create Linked Work Item .........................................................................................................................................88

Create Linked Work Item (Extended Method) ........................................................................................................90

Create Pseudo Work Item........................................................................................................................................92

Create Work Item ....................................................................................................................................................94

Get Work Item .........................................................................................................................................................95

Get Work List By User ID ..........................................................................................................................................96

Query Work List .......................................................................................................................................................98

Query Work List (Extended Method) .......................................................................................................................99

Reassign Update Work Item ..................................................................................................................................100

Reassign Work Item ...............................................................................................................................................101

Reassign Work Item (Extended Method)...............................................................................................................102

Undo Assign Work Item .........................................................................................................................................103

Undo Assign Work Item (Extended Method) .........................................................................................................104

Update Work Item .................................................................................................................................................105

Methods for Notifications .........................................................................................................................................106

Cancel Mail Deliverable .........................................................................................................................................106

Get Expecting Send Mail Deliverable .....................................................................................................................107

Get Mail Deliverables ............................................................................................................................................108

Resend Mail Deliverable ........................................................................................................................................109

Methods for Events ...................................................................................................................................................110

Get Event ...............................................................................................................................................................110

Methods for Custom Attributes ................................................................................................................................111

Get Custom Attribute ............................................................................................................................................111

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


7 AgilePoint Web Services API Guide

Get Custom Attributes ...........................................................................................................................................112

Get Custom Attributes (Extended Method) ..........................................................................................................113

Remove Custom Attribute .....................................................................................................................................114

Remove Custom Attributes ...................................................................................................................................115

Set Custom Attribute .............................................................................................................................................116

Set Custom Attributes ...........................................................................................................................................117

Methods for Archiving and Restoring Processes .......................................................................................................118

Archive Process Instance .......................................................................................................................................118

Restore Process Instance .......................................................................................................................................119

Query Archived Process Instances .........................................................................................................................120

Send Mail ...................................................................................................................................................................121

Send Mail ...............................................................................................................................................................121

Send Mail (Extended Method) ...............................................................................................................................122

Other WEB SERVICEs .................................................................................................................................................123

Query Audit Trail....................................................................................................................................................123

Query Database .....................................................................................................................................................124

Query Database (Extended Method) .....................................................................................................................125

Administrative Service ...............................................................................................................................................126

Get Database Information .....................................................................................................................................126

Get Domain Groups ...............................................................................................................................................127

Get Domain Group Members ................................................................................................................................128

Get Domain Name .................................................................................................................................................129

Get Domain Users ..................................................................................................................................................130

Get Locale ..............................................................................................................................................................131

Get Register User ...................................................................................................................................................132

Get Register Users .................................................................................................................................................133

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


8 AgilePoint Web Services API Guide

Get Register User Icons .........................................................................................................................................134

Get Sender Email Address .....................................................................................................................................135

Get SMTP Server ....................................................................................................................................................136

Get System Performance Information ...................................................................................................................137

Get System User ....................................................................................................................................................138

Query Register Users .............................................................................................................................................139

Register User .........................................................................................................................................................140

Unregister User ......................................................................................................................................................141

Update Registered User .........................................................................................................................................142

Update Registered User Icon .................................................................................................................................143

Group, Role, and Rights .............................................................................................................................................144

Add Group .............................................................................................................................................................144

Add Group Member ...............................................................................................................................................145

Add Role.................................................................................................................................................................146

Add Role Member ..................................................................................................................................................148

Enabled Group Member ........................................................................................................................................149

Get Access Right Names ........................................................................................................................................150

Get Access Rights ...................................................................................................................................................151

Get Group ..............................................................................................................................................................152

Get Group Members ..............................................................................................................................................153

Get Groups.............................................................................................................................................................154

Get Role .................................................................................................................................................................155

Get Roles ................................................................................................................................................................156

Query Role Members .............................................................................................................................................157

Remove Group .......................................................................................................................................................158

Remove Group Member ........................................................................................................................................159

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


9 AgilePoint Web Services API Guide

Remove Role ..........................................................................................................................................................160

Remove Role Member ...........................................................................................................................................161

Update Group ........................................................................................................................................................162

Update Role ...........................................................................................................................................................163

User Delegation .........................................................................................................................................................164

Add Delegation ......................................................................................................................................................164

Activate Delegation ...............................................................................................................................................165

Cancel Delegation ..................................................................................................................................................166

Get Delegation .......................................................................................................................................................167

Get Delegations .....................................................................................................................................................168

Remove Delegation ...............................................................................................................................................169

Update Delegation .................................................................................................................................................170

Report Configuration Methods..................................................................................................................................171

Add Report Configuration ......................................................................................................................................171

Get All Report Configurations ................................................................................................................................172

Get Report Configuration ......................................................................................................................................173

Remove Report Configure .....................................................................................................................................174

Update Report Configuration ................................................................................................................................175

Organization Properties .............................................................................................................................................176

Get Organization Properties ..................................................................................................................................176

Remove Organization Properties ...........................................................................................................................177

Update Organization Properties ............................................................................................................................178

Component Administration Methods ........................................................................................................................179

Get Server Component ..........................................................................................................................................179

Get Server Component Names ..............................................................................................................................180

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


10 AgilePoint Web Services API Guide

DISCLAIMER OF WARRANTY

AgilePoint, Inc. makes no representations or warranties, either express or implied, by or with


respect to anything in this document, and shall not be liable for any implied warranties of
merchantability or fitness for a particular purpose or for any indirect, special or consequential
damages.
Copyright © 2010 AgilePoint, Inc. All rights reserved.
GOVERNMENT RIGHTS LEGEND: Use, duplication or disclosure by the U.S. Government is subject
to restrictions set forth in the applicable license agreement and as provided in DFARS 227.7202-
1(a) and 227.7202-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (Oct 1988), FAR 12.212(a) (1995),
FAR 52.227-19, or FAR 52.227-14, as applicable.
AgilePoint, Inc. and AgilePoint’s products are trademarks of AgilePoint Inc. References to other
companies and their products use trademarks owned by the respective companies and are for
reference purpose only.

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


11 AgilePoint Web Services API Guide

ARCHITECTURE

AUTONOMOUS BPMS
The web services described in this document provide a set of functions that are needed to build a business
process management (BPM)-enabled web application. The web services wait for a client to make a request,
process the request, and then send a response message back to the client.
The consumer of the web services is typically an end-user client application, most often built on Microsoft
ASP.NET. However, there is no requirement to use a specific type of client application or programming
language.
The API does require a piece of code, called a proxy, through which applications can send requests and
receive responses easily. Microsoft Visual Studio provides a way to generate and update the proxy to a
Web Service when a server's URL is known. AgilePoint also provides a pre-compiled web server proxy, so
the web server proxy does not need to be regenerated even if you are not using Visual Studio.
The following diagram shows the AgilePoint web service architecture:

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


12 AgilePoint Web Services API Guide

EMBEDDED BPMS
With embedded BPM applications, AgilePoint server runs alongside the embedded application as a
component. It makes integration straightforward through the AgilePoint workflow application
programming interface (WAPI), giving the application more BPM controls.

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


13 AgilePoint Web Services API Guide

TERMINOLOGY

PROCESS DEFINITION
A process definition is a representation of a business process in a format that supports automated
manipulations, such as modeling by a business process management system (BPMS). A process definition
consists of activities and their relationships such as the participants, conditions, data etc.
Synonyms:
 Workflow definition
 Model definition
 Process template (Note that these are not technically the same time, but sometimes the terms are used
interchangeably.)

ACTIVITY
An activity is an action that is recognized by the AgilePoint software. AgilePoint supports two types of
activities:
 Manual - A manual activity requires human intervention to act as a participant(s) to finish a
specific task. Examples include clicking a button or completing a form.
 Automatic – An automatic activity needs machine resources to execute a process. The built-in
activities Start, Stop, Single condition, and Multiple conditions are examples of automatic
activities.

PROCESS INSTANCE (PROCESS)


A process instance is a representation of a single occurrence of a process. A process instance is created,
managed, and terminated by the BPMS according to the process definition. Each process instance has its
own data, and can be controlled and audited as the process progresses towards completion and termination.

ACTIVITY INSTANCE
An activity instance is an occurrence of an activity within a single process instance. Each activity instance
relates to one process instance. Parallel activity instances (unique instances of more than one distinct
activity) may exist within a process instance.

WORK ITEM (TASK)


A work item (task) is an occurrence of a task that a human participant completes during a manual activity
within a process instance. For example, if employee Janet completes a single purchase request form at 2:05
p.m. on January 5, 2010 as part of a process, this is considered one work item (task).
A manual activity typically generates one or more work items (tasks) to be performed by workflow
participants – usually end users of an application.
Work items can be presented to a user via a task list that maintains details of the work items assigned to the
user. Out of the box, AgilePoint provides a task list web part for SharePoint. However, it is also possible to
use the AgilePoint APIs to create a customized task list.
The progression of work items is controlled by the end users, rather than the BPMS engine, which is
notified of the work item statuses (for example, completion, cancellation) via the AgilePoint workflow API
(WAPI).

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


14 AgilePoint Web Services API Guide

OVERVIEW OF BUSINESS PROCESS DATA STRUCTURE

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


15 AgilePoint Web Services API Guide

RELATIONSHIPS BETWEEN ENTITIES

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


16 AgilePoint Web Services API Guide

BASIC PROGRAMMING TASKS


The AgilePoint web service API is designed and implemented using the Microsoft .Net web service
framework, but you can view the WSDL using Internet Explorer by connecting AgilePoint Server at a URL
the format:
 Workflow API - http://[qualified machine name]:[port]/[AgilePoint virtual
directory]/workflow.asmx?WSDL
 Administration API - http://[qualified machine name]:[port]/[AgilePoint virtual
directory]/admin.asmx?WSDL
The WSDL is a web service standard that allows any client application to consume the AgilePoint API.
However with .NET, Visual Studio or a command line can help to generate a web service proxy class that
is used to consume the AgilePoint web service using the .NET object model, rather than HTTP and XML.
With AgilePoint Developer, AgilePoint provides a prebuilt web service proxy to simplify the process even
further. Using the AgilePoint web service proxy also helps with upgrade and deployment because updates
will occur using the AgilePoint upgrade kit.
This section describes the basic programming tasks that are required for the AgilePoint API:
 Authentication
 Adding a namespace and reference
 Catching exceptions
 Making calls
The following example shows code that implements the activities that are covered in this section:
// initiated an object of proxy class of AgilePoint Web Service
WFWorkflowService svc = new WFWorkflowService (”http://[machine]/[virtual directory]”);
// set URL
svc.CookieContainer = new System.Net.CookieContainer();
// set Credentials
svc.Credentials = new System.Net.NetworkCredential(
userName, password, domainName);
// or take default credential
// svc.Credentials = System.Net.CredentialCache.DefaultCredentials;
{
// set client application name
svc.SetClientAppName(“Samples”);
// set locale
svc.SetClientLocale(“en-US”); // AgilePoint support 13 languages
// check authenticated and return qualified user name
string qualifiedDomainUserName = svc.CheckAuthenticated();
}
catch(Exception ex)
{
string error = ShUtil.GetSoapMessage(ex);
}

AUTHENTICATION
To communicate with the AgilePoint API, you must establish a session, which associates an authenticated
user with a set of calls. The client must provide credentials to the AgilePoint Server using Windows
authentication.
There are two main ways to provide credentials to the AgilePoint Server: Specify the user's credentials, or
use the default credentials.

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


17 AgilePoint Web Services API Guide

SPECIFY THE CREDENTIALS FOR A USER


Specify the user name, password, and domain name for a user. The domain name could be a Windows
Domain Name or a Local Host Name. The following example shows the syntax for establishing credentials
in this way:
System.Net.ICredentials =
new System.Net.NetworkCredential(userName, password, domainName);

USE THE DEFAULT CRED ENTIALS


Use the default credentials for a user. The default is the system credentials for the current security context
in which the application is running. For a client-side application, these are usually the Windows credentials
(user name, password, and domain) of the user running the application. For ASP.NET applications, the
default credentials are the user credentials of the authenticated user, or the user being impersonated. (For
more information about impersonated users, see the Surrogate method.)
System.Net.ICredentials = System.Net.CredentialCache.DefaultCredentials;

NAMESPACE REFERENCE

With an out-of-the-box web service proxy included with AgilePoint, a reference to the namespace must be created.
There are two methods to create a namespace reference:

A. Use the AgilePoint pre-compiled web service proxy. This method is recommended because it allows for
easier upgrades. If you use AgilePoint proxy, you do not need to change your references to it when you
upgrade the AgilePoint server because the new functions are included with the AgilePoint proxy.
1. Add the following commands to your assembly file::
 Ascentn.workflow.shared
 Ascentn.workflow.WFBase
 Ascentn.workflow.WFXML
2. Add a namespace using Ascentn.WorkflowBase
B. Use Microsoft Visual Studio to generate a web service proxy. The disadvantage to this method is that you
must regenerate the proxy each time you upgrade the AgilePoint Server.

CATCHING EXCEPTIONS
The exception that a web service throws contains a lot of information, and most of it is not easy to read.
AgilePoint Server tags the readable message for end-users.
Call the following function to extract the error message:
String error = ShUtil.GetSoapMessage(ex);
ex is the exception object that contains error message from AgilePoint Server

MAKING CALLS

Calls within the AgilePoint API fall into two categories – synchronous or asynchronous.

Synchronous Call

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


18 AgilePoint Web Services API Guide

Synchronous calls are used for short transactions. In a synchronous call, a request is sent to the AgilePoint Server,
the server acknowledges the request, and then acts upon it immediately.

Asynchronous Call

Asynchronous calls are used for longer transactions. In an asynchronous call, a request is sent to the AgilePoint
Server, the server acknowledges the request, but it does not immediately act upon it immediately. The server creates
a WFEvent object, which contains the call's status, and returns the WFEvent object to the client. The client can call
GetEvent(EventID) to retrieve the WFEvent object with the updated status. The status can be:

 Success – The transaction was completed successfully.


 Failed – The transaction failed, and was not completed.
 Sent – The call was received, but it has not been acted upon.

Completing an asynchronous call could take any amount of time, from one second to several days. As a best practice
a user interface should handle GetEvent() calls to update end users or the application itself regarding the status of
asynchronous calls. You might, for example, use Ajax to check status to display on an ASP.NET page in real time.

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


19 AgilePoint Web Services API Guide

COMMON METHODS

CHECK AUTHENTICATION

DESCRIPTION
This call is used to verify whether the specified user is a registered user on the AgilePoint Server.

SYNTAX
string CheckAuthenticated();

PARAMETERS
None.

OUTPUT
If the user is a registered user, the qualified user name in the format of DomainName\UserName is
returned. Otherwise, null is returned.

EXAMPLE
//This example is for an ASP.net application.//
public static string Connect(
System.Web.SessionState.HttpSessionState session,
System.Net.ICredentials credential, string appName, string locale)
{
string url = System.Configuration.ConfigurationManager.AppSettings.Get("ServerUrl");

WorkflowService svc = new WorkflowService(url);


AdminService adm = new AdminService(url);

System.Net.CookieContainer cookieContainer = new System.Net.CookieContainer();


svc.Credentials = credential;
svc.CookieContainer = cookieContainer;
svc.SetClientAppName(appName);
svc.SetClientLocale(locale);

string userName = svc.CheckAuthenticated();

adm.Credentials = credential;
adm.CookieContainer = cookieContainer;
adm.SetClientAppName(appName);
adm.SetClientLocale(locale);

//Assume the ASP.net is on session


WFCommonPage.SetAdm(session, adm);
WFCommonPage.SetAPI(session, api);

//return fully qualified Domain username


return userName;
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


20 AgilePoint Web Services API Guide

SURROGATE

DESCRIPTION
IIS does not support users who do not use Windows Active Directory authentication. To address this issue,
AgilePoint uses a special type of user called an impersonator. Impersonators enable client applications to
authenticate end users who use Active Directory authentication, as well as those who do not.
Impersonators must meet the following requirements:
1. The impersonator must be a Windows Active Directory user to pass IIS authentication.
2. The impersonator must be registered on the AgilePoint Server. The registration can be done
through Enterprise Manager.
3. The impersonator must be registered for the application under the Extension of AgilePoint Server
Configuration. The application name is case sensitive.
4. The impersonator does not need to be the administrator for AgilePoint Server, or even have
workflow execution rights on AgilePoint.
This Surrogate function allows the impersonator to act as a surrogate for the specified user to complete IIS
authentication. Once the authentication has passed, the web service API will be called based on the rights
granted to the specified user on AgilePoint Server.
This function is called before calling any other AgilePoint Web Service API.

SYNTAX
void Surrogate(String userName);
void Surrogate(String userName, String appName, String locale);

PARAMETERS
Parameter Description
Qualified user name for the user to be surrogated, in the format of
userName
DomainName\UserName.
appName A string that contains the name of the application.

locale A string that contains the client locale, for example en-US.

OUTPUT
None.

EXAMPLE
public IWFWorkflowService GetWorkflowService(
System.Net.ICredentials credentials, string
surrogateUsername)
{
IWFWorkflowService svc = GetAdm(credentials);
svc.Surrogate(surrogateUsername);

return svc;
}
//Web service using Impersonator credentials that is registered in the AgilePoint Server

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


21 AgilePoint Web Services API Guide

//configuration with application name


public IWFWorkflowService GetWorkflowService(System.Net.ICredentials credentials)
{

string url = … // AgilePoint Server web service Url


System.Net.CookieContainer cookieContainer = new System.Net.CookieContainer();

WFWorkflowService svc = new WFWorkflowService(url);


svc.CookieContainer = cookieContainer;
svc.Credentials = credentials;

svc.SetClientAppName([your application name]);

//Current Locale
svc.SetClientLocale(Thread.CurrentThread.CurrentUICulture.Name);
return svc;
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


22 AgilePoint Web Services API Guide

SET CLIENT APPLICATION NAME

DESCRIPTION
This call is used to set the current application name. The application can be a web/Windows/Windows
service application that calls the AgilePoint server for business process actions.

SYNTAX
void SetClientAppName (string appName);

PARAMETERS
Parameter Description

appName A string that contains the name of the application. The name is case sensitive.

OUTPUT
None.

EXAMPLE
See previous example

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


23 AgilePoint Web Services API Guide

SET CLIENT LOCALE

DESCRIPTION
This call is used to set the locale for the client application that calls AgilePoint Server. A client application
can be a web/Windows/Windows service application.

SYNTAX
void SetClientLocale(String locale);

PARAMETERS
Parameter Description

Locale A string that contains the client locale in the format en-US.

OUTPUT
None.

EXAMPLE
None.

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


24 AgilePoint Web Services API Guide

SURROGATE WITH APPLICATION NAME AND LOCALE

DESCRIPTION
This function is similar to Surrogate, with the ability to set the application name and locale at the same
time. Calling the functions SetClientAppName and SetClientLocale is not needed if this function is called.

SYNTAX
void Surrogate(String userName, String appName, String locale)

PARAMETERS
Parameter Description
A qualified user name that includes the domain name and user name, formatted as
username
DomainName\UserName
appName The name of the application. The name is case-sensitive.

locale The locale of the client application in the following example format en-US.

OUTPUT
None.

EXAMPLE
public IWFWorkflowService GetWorkflowService(System.Net.ICredentials credentials, string
surrogateUsername, String appName, String locale)
{
IWFWorkflowService svc = GetWorkflowService(credentials);
svc.Surrogate(surrogateUsername, surrogate appName, surrogate locale);

return svc;
}

public IWFAdminService GetWorkflowService(System.Net.ICredentials credentials)


{
//The body is the same as Surrogate
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


25 AgilePoint Web Services API Guide

PROCESS DEFINITION METHODS


This section describes how process definitions are managed. The AgilePoint server supports version control
to ensure that process definitions are archived and maintained for later use. A process definition can spawn
many process instances. Employing version controls allows the AgilePoint Server to store multiple versions
of a single process definition.
The project lifecycle of a process definition can be defined by the following steps:
1. Create Process Definition – Create a process definition. The version for the initial process
definition is version 1.
2. Created –Confirm that the process definition has been created.
3. Release process definition – Once a process definition has been created, it must be ―released.‖
This allows the process definition to be checked out and edited/modified.
4. Check out process definition – If changes or modifications are made, the process definition is
―checked out.‖ Changes can then be made to the process definition.
5. Modify process definition – After a process definition has been checked out, changes can be
made to the process definition.
6. Check in process definition – Once all changes/modifications have been made, the process
definition is checked in, so the changes are committed to the process definition. The process
definition is now version 2.
7. Retire process definition – Once version 2 of the process definition has been checked in, the
previous version 1 is retired. Retired process definitions can also be deleted.

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


26 AgilePoint Web Services API Guide

CREATE PROCESS DEFINITION

DESCRIPTION
Adds a new process definition to the AgilePoint Server.

SYNTAX
String CreateProcDef( String xml)

PARAMETERS
Parameter Description
A String that contains process definition in XML format. To generate the process definition file in
XML format, in AgilePoint Envision, click File > Export & Import > Save As Deploying
xml
File(xml). You can also download the process definition XML from AgilePoint Enterprise
Manager.

OUTPUT
Unique ID of the process definition, which the AgilePoint system generates.

EXAMPLE

IWFWorkflowService svc = GetWorkflowService();

string xml = …// Process definition XML as string


if( set release date )
{
WFProcessDefinition pd = new WFProcessDefinition();
GraphicImage g = new GraphicImage();
ProcDefXmlParser parser = new ProcDefXmlParser(new WFDefaultActivityInstantiator(), pd, g);
parser.Parse(xml);

pd.ReleaseDate = DateTime.Now; //Set release date

ProcDefXmlWriter w = new ProcDefXmlWriter(pd, g);


xml = w.WriteToString();
string procDefID = svc.CreateProcDef(xml);
}
else // not to release process template
{
string procDefID = svc.CreateProcDef(xml);
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


27 AgilePoint Web Services API Guide

RELEASE PROCESS DEFINITION

DESCRIPTION
Releases a process definition from the AgilePoint Server.

SYNTAX
void ReleaseProcDef(String processTemplateID)

PARAMETERS
Parameter Description

processTemplateID A string that contains the unique identifier for the process definition.

OUTPUT
None.

EXAMPLE
//Sample for using Workflow.ReleaseProcDef using Console Application
try
{
IWFWorkflowService svc = GetWorkflowService();
string processDefinitionID = …
svc.ReleaseProcDef(processDefinitionID);
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage( ex ) );
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


28 AgilePoint Web Services API Guide

CHECKOUT PROCESS DEFINITION

DESCRIPTION
This method is used to manage process definition versioning by setting the process definition status to
CheckedOut based on a given process definition ID. Only process definitions with the status of Released
can transition into the CheckedOut status.

SYNTAX
String CheckoutProcDef(String processTemplateID)

PARAMETERS
Parameter Description

processTemplateID The unique identifier for the process definition to be checked out for modification.

OUTPUT
The process definition, in XML format, that has been checked out.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
try
{
string processDefinitionID = … // process definition to be checked out
string processDefinitionXML = svc.CheckoutProcDef(processDefinitionID);
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage( ex ) );
}

VERSIONS SUPPORTED
3.2.0.4 or higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


29 AgilePoint Web Services API Guide

UNCHECKOUT PROCESS DEFINITION

DESCRIPTION
Undoes a check-out for a process definition. This method returns the status of a process definition from
CheckedOut to Released without making changes to the process definition, or changing the version
number.

SYNTAX
void UnCheckOutProcDef(string processTemplateID);

PARAMETERS
Parameter Description

processTemplateID The ID of the process definition to un-checkout.

OUTPUT
None.

EXAMPLE
try
{
IWFWorkflowService svc = GetWorkflowService();
string processTemplateID = …
string processDefinitionXML = svc.UncheckoutProcDef(processTemplateID);
}
catch (Exception ex)
{
Console.WriteLine("Message:\n" + ShUtil.GetSoapMessage( ex ) );
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


30 AgilePoint Web Services API Guide

CHECK IN PROCESS DEFINITION

DESCRIPTION
Checks in the process definition into the AgilePoint Server and returns the process definition identifier.
This method accepts a string with the updated process definition in XML format.

SYNTAX
String CheckinProcDef( String xml)

PARAMETERS
Parameter Description
A String that contains process definition in XML format. To generate the process definition file in
xml XML format, in AgilePoint Envision, click File > Export & Import > Save As Deploying File(xml).
You can also download the process definition XML from AgilePoint Enterprise Manager.

OUTPUT
A new process definition ID.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();

string xml = …// Process definition XML as string

WFProcessDefinition pd = new WFProcessDefinition();


GraphicImage g = new GraphicImage();
ProcDefXmlParser parser = new ProcDefXmlParser(new WFDefaultActivityInstantiator(), pd, g);
parser.Parse(xml);

if ( release process definition immediately)


{
pd.ReleaseDate = DateTime.Now;
pd.Version = .. // new version
string procDefID = svc.CheckinProcDef( xml );
svc.ReleaseProcDef(processDefinitionID);

}
else if( release process definition at specific date in the future)
{
pd.ReleaseDate = …// a specific date in the future
pd.Version = .. // new version
string processDefinitionID = svc.CheckinProcDef( xml );
svc.ReleaseProcDef(processDefinitionID);
}
else // not release process definition
{
pd.ReleaseDate = Constants.NullDate;
string processDefinitionID = svc.CheckinProcDef( xml );
}

VERSIONS SUPPORTED

3.2.0.4 or higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


31 AgilePoint Web Services API Guide

DELETE PROCESS DEFINITION

DESCRIPTION
Deletes the process definition and all of the process instances associated with the process definition. The
process definition cannot be deleted if one or more process instances associated with the process definition
is running or suspended. The function may take a long time to execute if there are many process instances
associated with the process definition.

SYNTAX
private static void DeleteProcDef(string processTemplateID)

PARAMETERS
Parameter Description

processTemplateID The unique identifier of the process definition to be deleted.

OUTPUT
None.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();

string processTemplateID = ..// The unique identifier of the process definition to be deleted
svc.DeleteProcDef(processTemplateID);

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


32 AgilePoint Web Services API Guide

GET BASE PROCESS DEFINITION ID

DESCRIPTION
Retrieves the ID for the first version of the process definition, called the base process definition. All
subsequent process definition versions have the same base process definition ID. This call retrieves the
base process definition ID with the specified process definition name.

SYNTAX
String GetBaseProcDefID(string pName)

PARAMETERS
Parameter Description

pName The name of the process definition.

OUTPUT
String that contains the base process definition ID.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string processDefinitionName = "CreateRequest";
string baseProcessDefinitionID= svc.GetBaseProcDefID(processDefinitionName);

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


33 AgilePoint Web Services API Guide

GET PROCESS DEFINITIONS

DESCRIPTION
Retrieves all of process definition objects.

SYNTAX
WFBaseProcessDefinition[] GetProcDefs()

PARAMETERS
None.

OUTPUT
An array of WFBaseProcessDefinition objects.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
try
{
//Returns Array of WFBaseProcessDefinition type.
WFBaseProcessDefinition[] processDefinitions = svc.GetProcDefs();
for (int i = 0; i < processDefinitions.Length; i++)
{
Console.WriteLine("Defintion ID: '" + processDefinitions[i].DefID + "' ");
Console.WriteLine("Defintion Name: '" + processDefinitions[i].DefName + "' ");
}
}
catch (Exception ex)
{
Console.WriteLine(ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


34 AgilePoint Web Services API Guide

GET PROCESS DEFINITION GRAPHICS

DESCRIPTION
Retrieves graphical data for the process definition in XML format. The graphical representation of the
process is XML-serialized by the class Graphic Image. The graphical data is used to display the process
visually.

SYNTAX
string GetProcDefGraphics(String pID)

PARAMETERS
Parameter Description

pID The unique identifier for the process definition.

OUTPUT
Graphics object in XML format.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();

//process definition ID or process instance ID


string procesID = … // for example, "42544811EC2D4FC18E6BA15CC9FE28DF";
try
{
//returns an image of a process definition as string.
string procDefGraphicsXML = svc.GetProcDefGraphics(procesID);
GraphicImage g = new GraphicImage();
g.FromXml(procDefGraphicsXML);
byte[] images = g.Image // process image
NamedRectangle[] shapes = g.Shapes;
}
catch (Exception ex)
{
Console.WriteLine(ShUtil.GetSoapMessage(ex));
}

/* This example produces the following results:


process definition Graphics:
<?xml version=“1.0” encoding=“utf-8”?><Graphics left=“3.33333333333333”
right=“5.76002857553708”
top=“10.3848753378378” bottom=“7”><Shapes><Shape left=“3.33333333333333”
right=“3.83333333333333”
top=“10.3854166666667” bottom=“9.88541666666667” name=“Start” /><Shape
left=“5.26041666666667”
right=“5.76041666666667” top=“7.5” bottom=“7” name=“Stop” /><Shape
left=“4.30208333333333”
right=“5.30208333333333” top=“9.16666666666667” bottom=“8.66666666666667” name=“Text File
Writer.3”
/></Shapes><Image>@64R0lGODlh6QBFAXAAACwAAAAA6QBFAYcAAAAMDAwkJCQsLCydAAClAACqAACuAACyAAC2AAC6AAC+
\nAADCAADGAADKAAA8PDzOAADSAA
.................\nTEGgS0+D2pKSHjUEWOzmRMPZljdstSBbQshYsxjRfu7xDREAaV3vGgai7gAEaA3sj3bghhl2dbEN\n
DAM5bsCFff6yI1uYAAZ8WtowAasI

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


35 AgilePoint Web Services API Guide

wudCT76Yxw1tYQa9/W1ww8ADCmxp+/SHxwvUm4UYBGq02d2S\nWJwAf+brX/9H0icBCEbggcpuAAbuvO+YgBV8acwAwNO3PjK
+j4EKZzhNwp1PZ4dvfBUAoMEjgHG
b\nBGNA0rYGa1W+cpazvMA32cOlMo6cgAAAOw==</Image></Graphics>
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


36 AgilePoint Web Services API Guide

GET PROCESS DEFINITION NAME AND VERSION

DESCRIPTION
Retrieves the process definition name and version.

SYNTAX
KeyValue GetProcDefNameVersion(String processTemplateID)

PARAMETERS
Parameter Description

pID The unique identifier for the process definition.

OUTPUT
KeyValue object, where Key contains process definition name and Value contains version.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
//process definition ID for a process.
string processTemplatedID = … // for example "1e3d514d43d3465cae6ec3bbbd409168";

try
{
//Returns KeyValue pair, for example "process definition Name-process definition Version"
KeyValue keyValue = _ svc.GetProcDefNameVersion(processTemplatedID);
Console.WriteLine("process definition Name: '" + keyValue.Key.ToString() + "' ");
Console.WriteLine("process definition Version: '" + keyValue.Value.ToString() + "' ");
}
catch (Exception ex)
{
Console.WriteLine( ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


37 AgilePoint Web Services API Guide

GET PROCESS DEFINITION XML

DESCRIPTION
Retrieves a process definition in XML format.

SYNTAX
String GetProcDefXml(String processTemplateID)

PARAMETERS
Parameter Description
The unique identifier for the process definition.
pID

OUTPUT
String that contains XML format of the process definition.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
//process definition ID for a process.
string processDefinitionID = ..// for example "42544811EC2D4FC18E6BA15CC9FE28DF";

try
{
//Returns process definition in XML format.
string procDefXML = svc.GetProcDefXml(processDefinitionID);
Console.WriteLine("process definition XML: \n");
Console.WriteLine(procDefXML);
}
catch (Exception ex)
{
Console.WriteLine( ShUtil.GetSoapMessage(ex));
}

/*
This example produces the following results:
process definition XML:
<?xml version=“1.0” encoding=“utf-8” standalone=“no”?>\n<?wfmc-xpdl
xmlns=“http://www.wfmc.org/2002/XPDL1.0”
xmlns:xpdl=“http://www.wfmc.org/2002/XPDL1.0”
xsi:schemaLocation=“http://www.wfmc.org/2002/XPDL1.0”?>\n<!--Process
Definition, Copyright 2003-2004 Ascentn Corporation, All Rights Reserved.--
>\n<ProcessDefinition
defName=“TextFileWriterProcess” preVersion=““ version=“1.0” description=““
owner=“Bipin.Shah” docRef=““
..................................\nTEGgS0+D2pKSHjUEWOzmRMPZljdstSBbQshYsxjRfu7xDREAaV3vGgai7gAEa
A3sj3bghhl2dbEN\nDAM5bsCFff6
yI1uYAAZ8WtowAasIwudCT76Yxw1tYQa9/W1ww8ADCmxp+/SHxwvUm4UYBGq02d2S\nWJwAf+brX/9H0icBCEbggcpuAAbuvO
+YgBV8acwAwNO3PjK+j4EKZzhNwp
1PZ4dvfBUAoMEjgHGb\nBGNA0rYGa1W+cpazvMA32cOlMo6cgAAAOw==</Image>\n
</Graphics>\n</ProcessDefinition>
*/

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


38 AgilePoint Web Services API Guide

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


39 AgilePoint Web Services API Guide

GET RELEASED PROCESS DEFINITION ID

DESCRIPTION
Retrieves the released process definition ID by a specified process definition name.

SYNTAX
String GetReleasedPID ( String pName)

PARAMETERS
Parameter Description

pName The name of the process definition.

OUTPUT
The ID for the released process definition.

EXAMPLE
//GetReleasedPID
IWFWorkflowService svc = GetWorkflowService();
string processDefinitionName = "Budget Request Approval Process";
string processDefinitionID = svc.GetReleasedPID(processDefinitionName);
Console.WriteLine("Process definition ID=" + processDefinitionID);

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


40 AgilePoint Web Services API Guide

GET RELEASED PROCESS DEFINITIONS

DESCRIPTION
Retrieves the names and IDs of all released process definitions.

SYNTAX
private static void GetReleasedProcDefs(IWFWorkflowService _api)

PARAMETERS
None.

OUTPUT
KeyValue array for pairs of process definition IDs and process definition names.

EXAMPLE
KeyValue[] defs = svc.GetReleasedProcDefs();
for (int i = 0; i < defs.Length; i++)
{
Console.WriteLine("Key=" + defs[i].Key.ToString() + " ************"+"Value=" +
defs[i].Value.ToString());
}
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


41 AgilePoint Web Services API Guide

GET PROCESS DEFINITION BY BASE PROCESS DEFINITION ID

DESCRIPTION
Retrieves all process definitions by a specified base process definition ID.

SYNTAX
public WFBaseProcessDefinition[] GetBaseProcDefID(string basePID)

PARAMETERS
Parameter Description

basePID The ID of the base process definition.

OUTPUT
Array of WFBaseProcessDefinition objects.

EXAMPLE
// This is console application
IWFWorkflowService svc = GetWorkflowService();
//Base process definition ID.
string baseprocessInstanceID = … // for example "1e3d514d43d3465cae6ec3bbbd409168";
try
{
//Returns Array of WFBaseProcessDefinition for all versions of process definition
WFBaseProcessDefinition[] processDefinitions = svc.GetProcDefByBasePID(baseprocessInstanceID);

for (int i = 0; i < processDefinitions.Length; i++)


{
Console.WriteLine("Defintion ID: '" + processDefinitions[i].DefID + "' ");
Console.WriteLine("Defintion Name: '" + processDefinitions[i].DefName + "' ");
}
}
catch (Exception ex)
{
Console.WriteLine( ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


42 AgilePoint Web Services API Guide

UPDATE PROCESS DEFINITION

DESCRIPTION
Updates a process definition without using version control. This method is intended for minor changes
only, such as typographical errors.
Warning: Changes made using this method circumvent version control, meaning changes are not tracked,
and versions cannot be managed. Do not use this call for making any major changes to the process
definition.

SYNTAX
string UpdateProcDef(string xml);

PARAMETERS
Parameter Description

xml A string that contains the updated process definition in XML format.

OUTPUT
Returns the unique identifier for the process definition that is updated.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
String processDefinitionXML = ..// see previous description of how to get process definition XML
try
{
//Update Process definition using updated process xml string
string processDefinitionID = svc.UpdateProcDef(xml);
}
catch (Exception ex)
{
Console.WriteLine("Exception:" + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
4.0.1 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


43 AgilePoint Web Services API Guide

METHODS FOR PROCESS INSTANCES


This section describes service calls related to process instances.

CREATE PROCESS INSTANCE

DESCRIPTION
Creates a process instance for a specified process definition ID, and parameters.

SYNTAX
WFEvent CreateProcInst(String PID,
String PIID,
String PIName,
String workObjectID,
String superPIID,bool startImmediately)

PARAMETERS
Parameter Description

PID The process definition ID for a released process definition.


A 32 character unique process instance ID for the process instance you are creating. If you set
PIID
this value to null, the AgilePoint Server generates the ID.
A unique process name that is associated with the process definition. The maximum length of
PIIName
process instance name is 1024 characters.
A 256-character ID for an object, such as a document, that is associated with the process
workObjectID
instance.
A 32-character unique process instance ID that acts as a parent process instance of the
superPIID process instance that is intended to create. In other words, this is the ID of the process
instance on which you want to base your new process instance.
startImmediately An obsolete, legacy parameter that must be true.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();

string processDefinitionName = “EmployeeOnboardProcess”;

// get UUID of released process definition


string processDefinitionID = svc.GetReleasedPID(processDefinitionName);

/ assign UUID of process instance


string processInstanceID = UUID.GetID();

// process instance name that has to be unique within process definition ID


string processInstanceName = string.Format("{0}-{1}", processDefinitionName DateTime.Now.Ticks );

// work object ID
string workObjectID = UUID.GetID();

// create process instance

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


44 AgilePoint Web Services API Guide

WFEvent event = svc.CreateProcInst( pID, piID, piName, workObjectID, null, true);

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


45 AgilePoint Web Services API Guide

CREATE PROCESS INSTANCE WITH EXTENDED PARAMETERS

DESCRIPTION
Creates a process instance that can have additional input arguments added to the function.

SYNTAX
WFEvent CreateProcInstEx(
String PID,
String PIID,
String PIName,
String workObjectID,
String superPIID,
String customID,
NameValue[] attributes,
bool startImmediately)

PARAMETERS
Parameter Description

PID The process definition ID for a released process definition.


A 32 character unique process instance ID. If you set this value to null, the AgilePoint Server
PIID
generates the ID.
A unique process name that is associated with the process definition. The maximum length of
PIIName
process instance name is 1024 characters.
A 256-character ID for an object, such as a document, that is associated with the process
workObjectID
instance.
A 32-character unique process instance ID that acts as a parent process instance of the
superPIID process instance that is intended to create. In other words, this is the ID of the process
instance on which you want to base your new process instance.
customID The ID of a custom attribute for the process instance. This method allows only one custom ID.

attributes Name-value pairs associated with the custom ID.

startImmediately An obsolete, legacy parameter that must be true.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();

string processDefinitionName = “EmployeeOnboardProcess”;

// get UUID of released process definition


string processDefinitionID = svc.GetReleasedPID(processDefinitionName);

/ assign UUID of process instance


string processInstanceID = UUID.GetID();

// process instance name that has to be unique within process definition ID


string processInstanceName = string.Format("{0}-{1}", processDefinitionName DateTime.Now.Ticks );

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


46 AgilePoint Web Services API Guide

// work object ID
string workObjectID = UUID.GetID();

//parent process instance ID is required if this is to create a sub process. If not, just provide
null
string parentProcessInstanceID = .. // for example, "09315f0ae769429bbfb243f888bcb09f" or null

List<NameValue> ds = new List<NameValue>();


ds.Add(new NameValue("CustomAttrKey1", "CustomAttrValue1"));
ds.Add(new NameValue("CustomAttrKey2", true));
ds.Add(new NameValue("CustomAttrKey3", 12345));

WFEvent evt = svc.CreateProcInstEx(


processDefinitionID,
processInstanceID,
processInstanceName,
workObjectID,
parentProcessInstanceID,
workObjectID,
ds.ToArray(),
true);

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


47 AgilePoint Web Services API Guide

CREATE PROCESS INSTANCE WITH EXTENDED PARAMETERS (OVERLOADED)

DESCRIPTION
Creates a process instance in which the user name for the user who initiates the process is specified.

SYNTAX
WFEvent CreateProcInstEx(
String PID,
String PIID,
String PIName,
String workObjectID,
String superPIID,
String initiator,
String customID,
NameValue[] attributes,
bool startImmediately)

PARAMETERS
Parameter Description

PID The process definition ID for a released process definition.


A 32 character unique process instance ID. If you set this value to null, the AgilePoint Server
PIID
generates the ID.
A unique process name that is associated with the process definition. The maximum length of
PIIName
process instance name is 1024 characters.
A 256-character ID for an object, such as a document, that is associated with the process
workObjectID
instance.
A 32-character unique process instance ID that acts as a parent process instance of the
superPIID process instance that is intended to create. In other words, this is the ID of the process
instance on which you want to base your new process instance.
initiator A string that contains the user name of the user who initiates process.

customID The ID of a custom attribute for the process instance. This method allows only one custom ID.

attributes A NameValue object that contains name-value pairs associated with the custom ID.

startImmediately An obsolete, legacy parameter that must be true.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
… see previous sample
string initiator = ..// System.Environment.UserName

WFEvent evt = svc.CreateProcInstEx(


processDefinitionID,
processInstanceID,
processInstanceName,
workObjectID,
parentProcessInstanceID,
initiator,

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


48 AgilePoint Web Services API Guide

workObjectID,
ds.ToArray(),
true);

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


49 AgilePoint Web Services API Guide

CREATE PROCESS INSTANCE WITH EXTENDED PARAMETERS (OVERLOADED)

DESCRIPTION
Creates a process instance with a specified WorkObjectInfo value. The WorkObjectInfo parameter
provides additional information about a work object, such as a URL for a document.

SYNTAX
WFEvent CreateProcInstEx(
String PID,
String PIID,
String PIName,
String workObjectID,
String workObjectInfo,
String superPIID,
String initialtor,
String customID,
NameValue[] attributes,
bool startImmediately)

PARAMETERS
Parameter Description

PID The process definition ID for a released process definition.


A 32 character unique process instance ID. If you set this value to null, the AgilePoint Server
PIID
generates the ID.
A unique process name that is associated with the process definition. The maximum length of
PIIName
process instance name is 1024 characters.
A 256-character ID for an object, such as a document, that is associated with the process
workObjectID
instance.
A 1024-character string associated with the process instance. Usually this parameter is used
workObjectInfo to hold more information about the work object, such as a URL for a document, within the
process instance.
A 32-character unique process instance ID that acts as a parent process instance of the
superPIID process instance that is intended to create. In other words, this is the ID of the process
instance on which you want to base your new process instance.
initiator A string that contains the user name of the user who initiates process.

customID The ID of a custom attribute for the process instance. This method allows only one custom ID.

attributes A NameValue object that contains name-value pairs associated with the custom ID.

startImmediately An obsolete, legacy parameter that must be true.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
… see previous sample
string workObjectInfo = ..// for example, a XML-serialized of an object

WFEvent evt = svc.CreateProcInstEx(

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


50 AgilePoint Web Services API Guide

processDefinitionID,
processInstanceID,
processInstanceName,
workObjectID,
workObjectInfo,
parentProcessInstanceID,
initiator,
workObjectID,
ds.ToArray(),
true);

VERSIONS SUPPORTED
4.0.1 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


51 AgilePoint Web Services API Guide

CANCEL PROCESS INSTANCE

DESCRIPTION
Cancels the process instance based on a specified process instance identifier. This method cancels all
automatic work items, manual work items, and child process instances.

SYNTAX
WFEvent CancelProcInst(String processInstanceID)

PARAMETERS
Parameter Description

processInstanceID The ID of the Process instance.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = ..// the ID of the process instance to be cancelled.
try
{
WFEvent evt = svc.CancelProcInst(processInstanceID);
}
catch( Exception ex)
{
base.ShowMessage( base.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


52 AgilePoint Web Services API Guide

DELETE PROCESS INSTANCE

DESCRIPTION
Deletes a process instance. This method removes the specified process instance and all of associated data
from database, such as work items, email, and activity instances associated with this process instance. It
may take some time to complete this transaction.

SYNTAX
public void DeleteProcInst(string procInstID)

PARAMETERS
Parameter Description

procInstID The ID of the process instance to delete.

OUTPUT
None.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = ..// the ID of the process instance to be cancelled.
try
{
WFEvent evt = svc.DeleteProcInst(processInstanceID);
}
catch( Exception ex)
{
base.ShowMessage( base.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
4.0.1 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


53 AgilePoint Web Services API Guide

MERGE PROCESS INSTANCE

DESCRIPTION
Merges 2 or more process instances into one process instance.

NOTE: These process instances should be based on the same process definition.
NOTE: This feature is only supported in AgilePoint v4.5 and higher.

SYNTAX
public string MergeProcInsts(WFProcessMergingInstruction instruction)

PARAMETERS
Parameter Description
An object that specifies the instructions for the merge. For more information, see
instruction
WFProcessMergingInstruction in the AgilePoint class reference.

OUTPUT
The process instance ID of the merged process instance.

EXAMPLE
string MergeProcessInstances(IWFWorkflowService svc, string[] processInstanceIDs )
{
IWFWorkflowService svc = GetWorkflowService();
// suspends all of prcoess instances to be merged.
foreach (string id in processInstanceIDs)
{
svc.SuspendProcInst(id);
}
// query process instances
string inExpr = ShUtil.Merge(processInstanceIDs, true);
WFQueryExpr queryExpr = new WFQueryExpr("PROC_INST_ID", SQLExpr.IN, WFAny.Create(inExpr),
true);
WFBaseProcessInstance[] pis = svc.QueryProcInsts(queryExpr);

// merge custom attributes


NameValue[] mergedCustomAttributes = GetMergeCustomAttributes(api, pis);

string procInstID = UUID.GetID();


string procInstName = pis[0].DefName + "_" + DateTime.Now.ToString() + " - Merged";
string workObjectID = procInstID + " - Merged";

WFProcessMergingInstruction instruction = new WFProcessMergingInstruction();


instruction.MergingProcessInstanceIDs = processInstanceIDs;
instruction.MergedProcessInstance = new WFProcessMergingInstruction.MergedProcessParameter(
procInstID,
procInstName,
workObjectID,
null,
mergedCustomAttributes);
instruction.Validate();

return svc.MergeProcInsts(instruction);
}

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


54 AgilePoint Web Services API Guide

// sample code for merging custom attributes


private NameValue[] GetMergeCustomAttributes(IWFWorkflowService svc, WFBaseProcessInstance[] pis)
{
List<string> workObjectIDs = new List<string>();
foreach (WFBaseProcessInstance pi in pis)
{
workObjectIDs.Add(pi.WorkObjectID);
}

KeyValue[] items = svc.GetCustomAttrsEx(workObjectIDs.ToArray());


Dictionary<string, System.Xml.XmlDocument> dss =
new Dictionary<string, System.Xml.XmlDocument>();
foreach (KeyValue item in items)
{
WFCustomAttributes ds = new WFCustomAttributes();
ds.AttrXml = item.Value;
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml(ds["//"] as string);
dss[item.Key] = xmlDoc;
}

// master processInstanceID and workObjectID


string masterProcessInstanceID = pis[0].ProcInstID;
string masterWorkObjectID = pis[0].WorkObjectID;

System.Xml.XmlDocument masterXmlDoc = dss[masterWorkObjectID];


System.Xml.XmlNamespaceManager nsm = ShUtil.GetNamespaces(masterXmlDoc);

System.Xml.XmlNode titleNode =
masterXmlDoc.SelectSingleNode("/pd:issueTracking/pd:issueTitle", nsm);
titleNode.InnerText = "Title - Merged";

System.Xml.XmlNode descriptionNode =
masterXmlDoc.SelectSingleNode("/pd:issueTracking/pd:description", nsm);
descriptionNode.InnerText = "Description - Merged";

System.Xml.XmlNode parent = masterXmlDoc.SelectSingleNode("/pd:issueTracking/pd:Persons",


nsm);

// merge rest of children


foreach (string key in dss.Keys)
{
if (key == masterWorkObjectID) continue;

System.Xml.XmlDocument secondaryXmlDoc = dss[key];


System.Xml.XmlNamespaceManager nsmgr = ShUtil.GetNamespaces(secondaryXmlDoc);
System.Xml.XmlNode node = secondaryXmlDoc.SelectSingleNode("/pd:issueTracking/pd:Persons",
nsmgr);
parent.InnerXml += node.InnerXml;
}
return NameValue.Array("//", masterXmlDoc.OuterXml);
}
#endregion

VERSIONS SUPPORTED
4.5 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


55 AgilePoint Web Services API Guide

MIGRATE PROCESS INSTANCES

DESCRIPTION
Migrates a process definition from one version to another version.

SYNTAX
void MigrateProcInst(
WFProcessMigrationInstruction instruction,
string processInstanceID,
string reserved);

PARAMETERS
Parameter Description
An object that specifies the instructions for the migration. For more
instruction information, see WFProcessMigrationInstruction in the AgilePoint class
reference.
processInstanceID A string that contains the process instance ID.
reserved null.

OUTPUT
IWFWorkflowService svc = GetWorkflowService();
WFProcessMigrationInstruction pmi = new WFProcessMigrationInstruction();
// some code...
svc.MigrateProcInst(pmi, currentProcessInstanceID, null);
// some more code...

EXAMPLE
IWFWorkflowService svc = GetWorkflow();

string processInstanceID = "DB50CFEFDE464A78AAAA9BD7D6E6D9D0";


WFProcessMigrationInstruction pmi = new WFProcessMigrationInstruction();

//add the correct CurrentActivityUniqueName


string currentActivityUniqueName = "BudgetRequest";

//add the correct TargetActivityUniqueName


string targetActivityUniqueName = "BudgetRequestNew";
bool bCurrentActivated = false;
pmi.AddMatchingActivity(currentActivityUniqueName,targetActivityUniqueName, bCurrentActivated);
svc.MigrateProcInst(pmi, currentProcessInstanceID, null);

VERSIONS SUPPORTED
4.0.1 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


56 AgilePoint Web Services API Guide

PROMOTE PROCESS INSTANCE

DESCRIPTION
Promotes a process instance. This method is obsolete.

SYNTAX
WFEvent PromoteProcInst(String piID)

PARAMETERS
Parameter Description

piID The ID of the Process Instance.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


57 AgilePoint Web Services API Guide

ROLLBACK PROCESS INSTANCE

DESCRIPTION
Rolls back a running process instance to a previous, specified activity. The activity that is currently active
becomes cancelled after the rollback is performed.

SYNTAX
WFEvent RollbackProcInst(string activityInstanceID);

PARAMETERS
Parameter Description
A string that contains the ID of the activity instance to which you want to roll back the
activityInstanceID
process instance.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
//This is console application sample
IWFWorkflowService svc = GetWorkflowService();
string activityInstanceID = ..// target activity instance to roll back
try
{
WFEvent evt = workflowService.RollbackProcInst(activityInstanceID);
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


58 AgilePoint Web Services API Guide

SPLIT PROCESS INSTANCE

DESCRIPTION
Splits one process instance into 2 or more process instances. The original process is cancelled.

NOTE: This feature is only supported in AgilePoint v4.5 or higher.

SYNTAX
String[] SplitProcInst(WFProcessSplitting instruction)

PARAMETERS
Parameter Description
An object that specifies the instructions for splitting the process instance. For more
instruction
information, see WFProcessSplitting in the AgilePoint class reference.

OUTPUT
A collection of strings that contain the process instance IDs for the process instances that were created from
the split.

EXAMPLE
// This is console application sample
public string[] SplitProcessInstance(string processInstanceID)
{
IWFWorkflowService svc = GetWorkflowService();
WFBaseProcessInstance processInstance = svc.GetProcInst(processInstanceID);

WFCustomAttributes ds = ds = new WFCustomAttributes(processInstance.WorkObjectID);


ds.AttrXml = svc.GetCustomAttrs(processInstance.WorkObjectID);
string xml = ds["//"] as string;

Console.WriteLine("Splitting custom attributes ...");


List<NameValue[]> splittedCustomAttributes = GetSplittedCustomAttributes(xml);

WFProcessSplittingInstruction instruction;
instruction = new WFProcessSplittingInstruction();
instruction.SplittingProcessInstanceID = procInstID;

List<string> workObjectIDs = new List<string>();


for (int i = 0; i < splittedCustomAttributes.Count; ++i)
{
string splittedProcInstID = UUID.GetID();
string splittedProcInstName = string.Format("{0} – Splitted - {1}", pi.ProcInstName, i + 1);
string splittedWorkObjectID = string.Format("{0} – Splitted - {1}", pi.WorkObjectID, i + 1);

instruction.Add(
splittedProcInstID,
splittedProcInstName,
splittedWorkObjectID,
null,
splittedCustomAttributes[i]);
}
instruction.Validate();

Console.WriteLine("Suspending process instance...");


svc.SuspendProcInst(procInstID);

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


59 AgilePoint Web Services API Guide

System.Threading.Thread.Sleep(1000);

string[] ids = svc.SplitProcInst(instruction);


return ids;
}

// function to split custom attributes


private List<NameValue[]> GetSplittedCustomAttributes(string xml)
{
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.PreserveWhitespace = true; xmlDoc.LoadXml(xml);
System.Xml.XmlNamespaceManager nsm = ShUtil.GetNamespaces(xmlDoc);
System.Xml.XmlNode parent = xmlDoc.SelectSingleNode("/pd:issueTracking/pd:Persons", nsm);

// split repeating notes – 'pd:issueTracking/pd:Persons/pd:Person'


System.Xml.XmlNodeList nodes = parent.SelectNodes("pd:Person", nsm);
if (nodes == null || nodes.Count < 2)
{
throw new InvalidOperationException("Failed to get splitted customAttributes,
'pd:issueTracking/pd:Persons/pd:Person' does not have multiple node.");
}

// remove child nodes


System.Xml.XmlNode titleNode = xmlDoc.SelectSingleNode("/pd:issueTracking/pd:issueTitle", nsm);
string title = titleNode.InnerText;
System.Xml.XmlNode descriptionNode =
xmlDoc.SelectSingleNode("/pd:issueTracking/pd:description", nsm);
string description = descriptionNode.InnerText;
List<NameValue[]> splittedCustomAttributes = new List<NameValue[]>();
for( int i = 0; i < nodes.Count; ++i)
{
//change title
titleNode.InnerText = title + "-Splited-" + i;
descriptionNode.InnerText = description + "- Splited-" + i;
parent.RemoveAll();
parent.AppendChild(nodes[i]);
splittedCustomAttributes.Add( NameValue.Array("//", xmlDoc.OuterXml) );
}
return splittedCustomAttributes;
}

VERSIONS SUPPORTED
4.5 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


60 AgilePoint Web Services API Guide

START PROCESS INSTANCE

DESCRIPTION
Starts a process instance that is not set to start immediately on creation. This method is obsolete.

SYNTAX
WFEvent StartProcInst(String processInstanceID)

PARAMETERS
Parameter Description

processInstanceID A string that contains the ID for the process instance to start.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


61 AgilePoint Web Services API Guide

SUSPEND PROCESS INSTANCE

DESCRIPTION
Suspends a process instance. The process instance status is changed to Suspended, and the statuses of all
the work items (tasks) become Pending.

SYNTAX
WFEvent SuspendProcInst(string procInstanceID);

PARAMETERS
Parameter Description

processInstanceID A string that contains the ID for the process instance you want to suspend.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
try
{
string processInstanceID = …// process instance to be suspended.
WFEvent event = svc.SuspendProcInst(processInstanceID);
}
catch (Exception ex)
{
Console.WriteLine("Failed: " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


62 AgilePoint Web Services API Guide

GET EVENTS BY PROCESS INSTANCE ID

DESCRIPTION
Retrieves all the events that have occurred for a specified process instance.

SYNTAX
WFEvent[] GetEventsByProcInstID(String processInstanceID)

PARAMETERS
Parameter Description

processInstanceID The ID of the process instance for which you want the events.

OUTPUT
An array of WFEvent objects.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = … // process instance ID
try
{
WFEvent[] events = svc.GetEventsByProcInstID(processInstanceID);
for (int i = 0; i < events.Length; i++)
{
Console.WriteLine("Event ID: '" + events[i].EventID + "' ");
Console.WriteLine("Event Name: '" + events[i].EventName + "' ");
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


63 AgilePoint Web Services API Guide

GET PROCESS INSTANCE

DESCRIPTION
Retrieves basic information about a specified process instance.

SYNTAX
WFBaseProcessInstance GetProcInst(String processInstanceID)

PARAMETERS
Parameter Description

processInstanceID The ID of the process instance.

OUTPUT
WFBaseProcessInstance object that contains basic information about a process instance. It returns
null if the process instance ID does not exist.

EXAMPLE
// This is sample code for console application
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = …// process instance ID
try
{
//Returns an instance of WFBaseProcessInstance type.
WFBaseProcessInstance processInstance = svc.GetProcInst(processInstanceID);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


64 AgilePoint Web Services API Guide

GET PROCESS INSTANCE ATTRIBUTES

DESCRIPTION
Retrieves a single attribute for a specified process instance.

SYNTAX
KeyValue GetProcInstAttr(String processInstanceID, String atributeName)

PARAMETERS
Parameter Description

processInstanceID The ID of the process instance.

attributeName A string that contains the name of the process instance attribute you want to retrieve.

ATTRIBUTES
Attribute Name Description

DefID The ID of the process definition.

DefName The name of the process definition.

ProcInstName The name of the process instance.

Status The current status of the process instance.

SuperProcInstID The parent process instance ID.

workObjectID The ID of the work object.

StartDate The date and time when the process instance was started.

DueDate The date that the process instance is expected to be complete.

LastModifiedDate The date and time that the last modification was made to the process instance.

OUTPUT
Returns the KeyValue for the attribute associated with the process instance as a name-value‖ pair.

EXAMPLE
//This is console application sample
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = …// for example, "1e3d514d43d3465cae6ec3bbbd409168";
string atributeName = "DefName";

try
{
//Returns attribute associated with the Process Instance as "Name-Value" pair.
KeyValue processInstanceAttribute = svc.GetProcInstAttr(processInstanceID, atributeName);
Console.WriteLine("{0}={1}", processInstanceAttribute.Name, + processInstanceAttribute.Value);
}
catch (Exception ex)
{

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


65 AgilePoint Web Services API Guide

Console.WriteLine(ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


66 AgilePoint Web Services API Guide

GET PROCESS INSTANCE ATTRIBUTES

DESCRIPTION
Retrieves multiple attributes of a process instance.

SYNTAX
NameValue[] GetProcInstAttrs( String PIID )

PARAMETERS
Parameter Description

PIID A string that contains the ID of the process instance.

ATTRIBUTES
Attribute Name Description

DefID The ID of the process definition.

DefName The name of the process definition.

ProcInstName The name of the process instance.

Status The current status of the process instance.

SuperProcInstID The parent process instance ID.

workObjectID The ID of the work object.

StartDate The date and time when the process instance was started.

DueDate The date that the process instance is expected to be complete.

LastModifiedDate The date and time that the last modification was made to the process instance.

OUTPUT
Array of NameValue objects that holds the values of all the requested attributes.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = …// process instance ID
NameValue[] attributes = svc.GetProcInstAttrs(processInstanceID);

for (int i = 0; i < attributes.Length; i++)


{
NameValue nv = attributes[i];
Console.WriteLine("Process Instance Attribute, {0}={1}”, nv.Name, nv.Value);
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


67 AgilePoint Web Services API Guide

QUERY PROCESS INSTANCES

DESCRIPTION
Retrieves a list of process instances that match a specified query expression. The WFQueryExpr string is
used to generate a query expression, and the client application specifies the query terms.

SYNTAX
WFBaseProcessInstance[] QueryProcInsts(WFQueryExpr expr)

PARAMETERS
Parameter Description

expr An object that represents the where clause of a SQL query expression.

OUTPUT
An array of WFBaseProcessInstance objects. It returns null if nothing matches to the query
expression.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();

// query all running process instance


string status = WFProcessInstance.RUNNING;
WFAny any = WFAny.Create(status);
WFQueryExpr expr = new WFQueryExpr("STATUS", SQLExpr.EQ, any, true);

Try
{
// Calling the QueryProcInsts WebMethod, passing the expression as the argument.
WFBaseProcessInstance[] result = svc.QueryProcInsts(expr);
if (result != null)
{
// Iterating through the list of the Process Instance
foreach (WFBaseProcessInstance processInstance in result
{
//Displaying the Process Instance Details on Console.
Console.WriteLine("ApplName-->" + processInstance.ApplName);
Console.WriteLine("DefName-->" + processInstance.DefName);
Console.WriteLine("DefID-->" + processInstance.DefID);
Console.WriteLine("CompletedDate-->" + processInstance.CompletedDate);
Console.WriteLine("LastModifiedBy-->" + processInstance.LastModifiedBy);
}
}
}
catch(Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


68 AgilePoint Web Services API Guide

QUERY PROCESS INSTANCES (EXTENDED METHOD)

DESCRIPTION
Retrieves a list of process instances with a SQL query expression specified by the client application.

SYNTAX
WFBaseProcessInstance[] QueryProcInstsEx(String sql)

PARAMETERS
Parameter Description

sql A string that contains the where clause of the SQL statement you want to query.

OUTPUT
An array of WFBaseProcessInstance objects. It returns null if nothing matches the SQL query
expression.

EXAMPLE
// Console application sample code to illustrate QueryProcInstsEx API.
IWFWorkflowService svc = GetWorkflowService();

// SQL Expression
string where = "STATUS in ('Running',‟Cancelled‟)";
try
{
// Calling QueryProcInstsEx WebMethod with sql query expression as argument.
WFBaseProcessInstance[] result = svc.QueryProcInstsEx(where);
if (result != null)
{
// Iterating through the list of the Process Instance
foreach (WFBaseProcessInstance processInstance in result
{
/Displaying the Process Instance Details on Console.
Console.WriteLine("ApplName-->" + processInstance.ApplName
Console.WriteLine("DefName-->" + processInstance.DefName);
Console.WriteLine("DefID-->" + processInstance.DefID);
Console.WriteLine("CompletedDate-->" + processInstance.CompletedDate);
Console.WriteLine("LastModifiedBy-->" + processInstance.LastModifiedBy);
}
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


69 AgilePoint Web Services API Guide

UPDATE PROCESS INSTANCE

DESCRIPTION
Updates attributes of a workflow process instance. The attributes that can be updated are listed in the
attribute table.

SYNTAX
void UpdateProcInst(String processInstanceID, NameValue[]attributes)

PARAMETERS
Parameter Description

processInstanceID A string that contains the ID of the process instance needs to be updated.
A NameValue array that contains all the attributes that needs to be updated for the process
attribute
instance.

ATTRIBUTES
Attribute Name Description

ProcInstName The name of the process instance.

DueDate The date that the process instance is expected to be complete.


A 1024-character string associated with the process instance. Usually this parameter is
WorkObjectInfo used to hold more information about the work object, such as a URL for a document, within
the process instance.

OUTPUT
None.

EXAMPLE
// This is console application sample to update process instance name
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = … // process instance ID
string newProccessInstanceName = “[new process instance name]”;
DateTime newDueDate = DateTime.Now.AddDays(7.0);
try
{
WFBaseProcessInstance inst = svc.GetProcInst(processInstanceID);
NameValue[] processInstanceAttributes = new NameValue[]
{
new NameValue("ProcInstName", newProccessInstanceName),
new NameValue("DueDate", newDueDate)),
};

// update process instance


svc.UpdateProcInst(processInstanceID, processInstanceAttributes);

// check if it has been updated.


string processInstanceName = svc.GetProcInst(processInstanceID).ProcInstName;
Console.WriteLine(“New Process Instance Name= '{0}", processInstanceName);
}
catch (Exception ex)

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


70 AgilePoint Web Services API Guide

{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


71 AgilePoint Web Services API Guide

METHODS FOR ACTIVITY INSTANCES


This section describes service calls related to activity instances.

CANCEL ACTIVITY INSTANCE

DESCRIPTION
Cancels a manual activity instance. along with all manual work items associated with the specified manual
activity instance ID. Note that an activity instance can be associated with one or more manual work items.
One the manual activity instance is canceled, the process instance will move forward to the next activity.

SYNTAX
WFEvent CancelActivityInst(String activityInstanceID)

PARAMETERS
Parameter Description

activityInstanceID A string that contains the ID for the activity instance you want to cancel.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string activityInstanceInstanceID = …// activity instance needs to be cancelled.
try
{
WFEvent evt = svc.CancelActivityInst(activityInstanceInstanceID);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


72 AgilePoint Web Services API Guide

GET ACTIVITY INSTANCE

DESCRIPTION
Retrieves basic information for a specified activity instance.

SYNTAX
WFBaseActivityInstance GetActivityInst(string aiID)

PARAMETERS
Parameter Description
aiID A string that contains the activity instance ID.

OUTPUT
WFBaseActivityInstance object.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string activityInstanceID = ..// activity instance
try
{
WFBaseActivityInstance activityInstance = _svc.GetActivityInst(activityInstanceID);
Console.WriteLine("DisplayName" + activityInstance.DisplayName);
Console.WriteLine("ID" + activityInstance.ID);
Console.WriteLine("CompletedDate" + activityInstance.CompletedDate);
Console.WriteLine("DueDate" + activityInstance.DueDate);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


73 AgilePoint Web Services API Guide

GET ACTIVITY INSTANCE STATUS

DESCRIPTION
Retrieves all the status of all activity instances for a specified process instance.

SYNTAX
KeyValue[] GetActivityInstStatus(string processInstanceID)

PARAMETERS
Parameter Description

processInstanceID A string that contains the process instance ID.

OUTPUT
An array of KeyValue objects that holds pairs of activity definition names and statuses. The statuses can
be Passed, Active, Pending, Activated, Cancelled, or null.

EXAMPLE
// This is console application sample.
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = ..// for example, "02C3FA88ADE04750A34B5B3168C25793";
try
{
KeyValue[] resultList = svc.GetActivityInstStatus(processInstanceID);
foreach (KeyValue result in resultList)
{
System.Console.WriteLine("Activity Definition ID: „{0}‟",result.Key);
System.Console.WriteLine("Status: „{0}‟", result.Value);
}
}
catch( Exception ex )
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


74 AgilePoint Web Services API Guide

GET ACTIVITY INSTANCES BY PROCESS INSTANCE ID

DESCRIPTION
Retrieves the status of all activity instances for a specified process instance.

SYNTAX
WFBaseActivityInstance[] GetActivityInstsByPIID(string processInstanceID)

PARAMETERS
Parameter Description

processInstanceID A string that contains the ID of the process instance.

OUTPUT
An array of WFBaseActivityInstance objects.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = ..//"02C3FA88ADE04750A34B5B3168C25793";
try
{
WFBaseActivityInstance[] activityInstance = svc.GetActivityInstsByPIID(processInstanceID);
foreach (WFBaseActivityInstance activity in activityInstance)
{
System.Console.WriteLine("Activity DispalyName: „{0}‟", activity.DisplayName);
System.Console.WriteLine("CompletedDate: „{0}‟", activity.CompletedDate);
}
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex) );
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


75 AgilePoint Web Services API Guide

QUERY ACTIVITY INSTANCES

DESCRIPTION
Retrieves activity instances that match a query expression.

SYNTAX
WFBaseActivityInstance[] QueryActivityInsts( WFQueryExpr expr)

PARAMETERS
Parameter Description
expr An object that represents the where clause of a SQL query expression.

OUTPUT
An array of WFBaseActivityInstance objects.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = …
WFAny any = WFAny.Create(processInstanceID);
WFQueryExpr expr = new WFQueryExpr("PROC_INST_ID", SQLExpr.IN, any, true);
try
{
WFBaseActivityInstance[] ais = svc.QueryActivityInsts(expr);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


76 AgilePoint Web Services API Guide

ROLLBACK ACTIVITY INSTANCE

DESCRIPTION
Rolls back a manual activity instance to the token position ENTRY – that is, the state where the activity is
entered. All work items associated with the manual activity instance with the status of NEW, OVERDUE,
or ASSIGNED are cancelled.

SYNTAX
WFEvent RollbackActivityInst(string activityInstanceID)

PARAMETERS
Parameter Description

activityInstanceID A string that contains the ID of the activity instance.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
string activityInstanceID = …
try
{
//Rollbacking the activity instance
WFEvent evt = svc.RollbackActivityInst(activityInstanceID);
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


77 AgilePoint Web Services API Guide

ROLLBACK ACTIVITY INSTANCES

DESCRIPTION
Rolls back a process instance according to a specified instruction. The class
WFPartialRollbackInstruction is used to specify detailed information about the instruction.

SYNTAX
WFEvent RollbackActivityInsts(WFPartialRollbackInstruction instruction);

PARAMETERS
Parameter Description
An object that specifies the instructions for rolling back the activity instance. For more
instruction
information, see WFPartialRollbackInstruction in the AgilePoint class reference.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
//Sample for partial rollback
IWFWorkflowService svc = GetWorkflowService();

// PartialRollback unit
WFPartialRollbackInstruction.PartialRollbackUnit unit1
= new WFPartialRollbackInstruction.PartialRollbackUnit();
unit1.DestinationActivityInstanceID = ... // distination activity instance ID
unit1.SourceActivityInstanceIDs = new string[] { ... }; // array of source activity instance ID

WFPartialRollbackInstruction.PartialRollbackUnit unit2
= new WFPartialRollbackInstruction.PartialRollbackUnit();
unit2.DestinationActivityInstanceID = ... // distination activity instance ID
unit2.SourceActivityInstanceIDs = new string[] { … }; // array of source activity instance ID

WFPartialRollbackInstruction instruction = new WFPartialRollbackInstruction();

try
{
//Rollbacking the activity instance
WFEvent evt = workflowService. RollbackActivityInsts(instruction);
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


78 AgilePoint Web Services API Guide

METHODS FOR AUTOMATIC WORK ITEMS (PROCEDURES)


This section describes service calls related to automatic work items.

CANCEL PROCEDURE

DESCRIPTION
Cancels an automatic work item based on supplied specified automatic work item identifier.

SYNTAX
WFEvent CancelProcedure(String wID)

PARAMETERS
Parameter Description

wID A string that contains the ID for an automatic work item.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
String workItemID = …//
try
{
WFEvent evt = svc.CancelProcedure(workItemID);
}
catch( Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


79 AgilePoint Web Services API Guide

COMPLETE PROCEDURE

DESCRIPTION
Marks an automatic work item as completed by an asynchronous activity.

SYNTAX
WFEvent CompleteProcedure(String wID)

PARAMETERS
Parameter Description

wID A 32-byte unique work item ID.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string autoWorkItemID = ..//
try
{
svc.CompleteProcedure(autoWorkItemID);
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


80 AgilePoint Web Services API Guide

GET PROCEDURE

DESCRIPTION
Retrieves work item data by a specified work item ID.

SYNTAX
WFAutomaticWorkItem GetProcedure (String wID)

PARAMETERS
Parameter Description

wID A unique, 32-character work item ID.

OUTPUT
WFAutomaticWorkItem object.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService()
string workItemID = ..// for example, "54A648A0A3004A02981E7F0848820FE7";
try
{
WFAutomaticWorkItem wItem = svc.GetProcedure(workItemID);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 And higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


81 AgilePoint Web Services API Guide

QUERY PROCEDURE LIST

DESCRIPTION
Retrieves a list of automatic work items that match a specified query expression.

SYNTAX
WFAutomaticWorkItem[] QueryProcedureList (WFQueryExpr expr)

PARAMETERS
Parameter Description
An object that contains the query expression that describes the automatic work items you
expr
want to retrieve.

OUTPUT
An array of automatic work items.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
try
{
//WebMethod with sql query expression as argument.
WFAny any = WFAny.Create(WFAutomaticWorkItem.WAITING);
WFQueryExpr expr = new WFQueryExpr("STATUS", SQLExpr.EQ, any, true);
WFAutomaticWorkItem[] result = svc.QueryProcedureList(expr);
if (result != null)
{
// Iterating through the list of the automatic work item
foreach (WFAutomaticWorkItem re in result)
{
Console.WriteLine("ActivityInstID-->" + re.ActivityInstID);
Console.WriteLine("ApplName-->" + re.ApplName);
Console.WriteLine("ProcInstID-->" + re.ProcInstID);
Console.WriteLine("CreatedDate-->" + re.CreatedDate);
}
}
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


82 AgilePoint Web Services API Guide

METHODS FOR MANUAL WORK ITEMS (TASKS)


This section describes service calls related to manual work items (tasks).

ASSIGN WORK ITEM

DESCRIPTION
Assigns a work item to a user, which often means claiming a work item for oneself. This is often used with
task pools where work items are created, and then multiple users are notified, but the work item is not
immediately assigned to a user. A user then claims the work item, or his manager assigns it to him. The
user must have privileges to claim or assign the work item.

SYNTAX
WFEvent AssignWorkItem(String WID)

PARAMETERS
Parameter Description

wID A 32-byte unique work item (task) ID that represents a manual work item.

OUTPUT
WFEvent class that represents the workflow event instance that is created when the task is assigned.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = …// work item ID
try
{
WFEvent evt = svc.AssignWorkItem(workItemID);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


83 AgilePoint Web Services API Guide

ASSIGN WORK ITEM (EXTENDED METHOD)

DESCRIPTION
Assigns a work item to a user, which often means claiming a work item for oneself. This is often used with
task pools where work items are created, and then multiple users are notified, but the work item is not
immediately assigned to a user. A user then claims the work item, or his manager assigns it to him. The
user must have privileges to claim or assign the work item. This method extends AssignWorkItem() by
allowing you to specify client data.

SYNTAX
WFEvent AssignWorkItemEx( String wID, String clientData)

PARAMETERS
Parameter Description

wD A 32-character unique work item (task) ID.


A string with client data associated with a manual work item. If clientData is NULL, engine
clientData
will keep existing client data with the work item, otherwise it would be overwritten.

OUTPUT
WFEvent object representing the workflow event instance raised by the invocation of the work assignment.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string wID = …// work item ID
string clientData = null;
try
{
WFEvent evt = svc.AssignWorkItemEx(wID, clientData);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


84 AgilePoint Web Services API Guide

CANCEL WORK ITEM

DESCRIPTION
Cancels a manual work item based on a specified manual work item identifier. Only the following manual
work item status can transition to a Cancelled status: Assigned, New, Pseudo, and Overdue.

SYNTAX
WFEvent CancelWorkItem( String wID)

PARAMETERS
Parameter Description

workItemD A unique, 32-character unique work item ID.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = … //
try
{
WFEvent evt = svc.CancelWorkItem(wID );
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


85 AgilePoint Web Services API Guide

CANCEL WORK ITEM (EXTENDED METHOD)

DESCRIPTION
Cancels a manual work item based on a specified manual work item identifier. This method also contains
an added routine to track the method call duration. Only the following manual work item status can
transition to a Cancelled status: Assigned, New, Pseudo, and Overdue.

SYNTAX
WFEvent CancelWorkItemEx( String wID, String clientData)

PARAMETERS
Parameter Description

workItemD A unique, 32-character unique work item ID.


A string with client data associated with a manual work item. If clientData is null, the engine
clientData
will keep existing client data with the work item. Otherwise it would be overwritten.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = …// work item ID
string clientData = null;
try
{
WFEvent evt = svc. CancelWorkItemEx(workItemID, clientData);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


86 AgilePoint Web Services API Guide

COMPLETE WORK ITEM

DESCRIPTION
Marks a work item as completed.

SYNTAX
WFEvent CompleteWorkItem (String wID)

PARAMETERS
Parameter Description

workItemD A unique, 32-character work item ID.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = …// work item ID
try
{
WFEvent evt = svc.CompleteWorkItem(workItemID);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


87 AgilePoint Web Services API Guide

COMPLETE WORK ITEM (EXTENDED METHOD)

DESCRIPTION
Marks a work item as completed with client data.

SYNTAX
WFEvent CompleteWorkItemEx (String wID, String clientData)

PARAMETERS
Parameter Description

workItemD A unique, 32-character work item ID.


A string with client data associated with a manual work item. If clientData is null, the engine
clientData
will keep existing client data with the work item. Otherwise it would be overwritten.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = …// work item ID
string clientData = null;
try
{
WFEvent evt = svc. CompleteWorkItemEx(workItemID, clientData);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


88 AgilePoint Web Services API Guide

CREATE LINKED WORK ITEM

DESCRIPTION
Creates a manual work item that is linked to another manual work item. The work item you create does not
depend on the completion of the work item to which it is linked. In other words, the original (source) work
item can be marked as completed before new work item is completed.

SYNTAX
WFEvent CreateLinkedWorkItem(
string sourceWorkItemID,
string workToPerform,
string userID,
WFTimeDuration
duration,
string clientData)

PARAMETERS
Parameter Description

sourceWorkItemD A unique, 32-character ID for the source work item.

workToPerform A string that specifies the work to perform.

userID A string that contains a user ID for the user associated with the work item.

duration A time-duration object that specifies the duration setting of the work item.

clientData A string with client data.

OUTPUT
None.

EXAMPLE
IWFWorkflowService svc = base.GetWorkflowService();
// get existing work item
string workItemID = ..// for example, “90CF843AC57644058A391FBFA030F607”
try
{
// Get the source WFManualWorkItem object
WFManualWorkItem sourceWorkItem = svc.GetWorkItem(workItemID
string workToPerform = sourceWorkItem.Name; //different workToPerform can be used if desired

WFTimeDuration duration = new WFTimeDuration();


duration.Length = "15"; //for example, 15 days
duration.Unit = WFTimeUnit.DAY;
string user = @"[DOMAIN NAME]\username"; //the particpant of the linked work item
WFEvent evt = svc.CreateLinkedWorkItem(
sourceWorkItem.WorkItemID,
workToPerform,
user,
duration,
null);
}
catch( Exception ex)
{

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


89 AgilePoint Web Services API Guide

Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


90 AgilePoint Web Services API Guide

CREATE LINKED WORK ITEM (EXTENDED METHOD)

DESCRIPTION
Creates a manual work item that is linked to another manual work item. The extended parameter
bDependent is used to specify the dependency between the original work item and the linked work item. If
bDependent is false, the work items are independent, just like CreateLinkedWorkItem(). If bDependent
is true, the original (source) work item cannot be marked as completed before new work item has been
completed.

SYNTAX
WFEvent CreateLinkedWorkItemEx(
string sourceWorkItemID,
string workToPerform,
string userID,
WFTimeDuration duration,
string clientData,
bool bDependent)

PARAMETERS
Parameter Description

sourceWorkItemD A unique, 32-character ID of original, or source, work item.

workToPerform A string that specifies the work to be performed by the work item.

userID A string that represents the user ID for a user associated with the work item.
A time-duration object that specifies the duration setting of the work item. For more
duration
information, see WFTimeDuration in the AgilePoint class reference.
clientData A string with client data.
If true: The source work item waits until the linked work item is either completed or
cancelled, before it can be completed/cancelled.
bDependent
If false: The source work item can be completed/cancelled regardless of whether the
linked work item is completed/cancelled.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = base.GetWorkflowService();
// get existing work item
string workItemID = ..// for example, “90CF843AC57644058A391FBFA030F607”
try
{
// Get the source WFManualWorkItem object
WFManualWorkItem sourceWorkItem = svc.GetWorkItem(workItemID
string workToPerform = sourceWorkItem.Name; //different workToPerform can be used if desired

WFTimeDuration duration = new WFTimeDuration(“15”, WFTimeUnit.DAY, false);


string user = @"[DOMAIN NAME]\username"; //the particpant of the linked work item
WFEvent evt = svc.CreateLinkedWorkItem(
sourceWorkItem.WorkItemID,
workToPerform,

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


91 AgilePoint Web Services API Guide

user,
duration,
null,
true);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
4.6 and above

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


92 AgilePoint Web Services API Guide

CREATE PSEUDO WORK ITEM

DESCRIPTION
Creates a task by a specific AgileWork or other module that has the following characteristics:
 It does not have to be completed in order for a process to advance to the next steps.
 Unless specifically cancelled, it remains active through the duration of the entire process, not just
the duration of the AgileWork or other module that created it.
This provides a way for tasks to be included in a user’s or manager’s task list purely for monitoring
purposes.

SYNTAX
WFEvent CreatePseudoWorkItem(
string sourceWorkItemID,
string workToPerform,
string userID,
WFTimeDuration duration,
string clientData,
bool reserved)

PARAMETERS
Parameter Description

sourceWorkItemID A unique, 32-character ID of original, or source, work item.

workToPerform A string that specifies the work to be performed by the work item.

userID A string that represents the user ID for a user associated with the work item.
A time-duration object that specifies the duration setting of the work item. For more
duration
information, see WFTimeDuration in the AgilePoint class reference.
clientData A string with client data.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.
IWFWorkflowService svc = base.GetWorkflowService();
// get existing work item
string workItemID = ..// for example, “90CF843AC57644058A391FBFA030F607”
try
{
// Get the source WFManualWorkItem object
WFManualWorkItem sourceWorkItem = svc.GetWorkItem(workItemID
string workToPerform = sourceWorkItem.Name; //different workToPerform can be used if desired

WFTimeDuration duration = new WFTimeDuration(“15”, WFTimeUnit.DAY, false);


string user = @"[DOMAIN NAME]\username"; //the particpant of the linked work item
WFEvent evt = svc.CreatePseudoWorkItem (
sourceWorkItem.WorkItemID,
workToPerform,
user,
duration,
null,
false);
}

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


93 AgilePoint Web Services API Guide

catch( Exception ex)


{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


94 AgilePoint Web Services API Guide

CREATE WORK ITEM

DESCRIPTION
Creates a manual work item.

SYNTAX
WFEvent CreateWorkItem(
String activityInstanceID,
String workToPerform,
String userID,
WFTimeDuration duration,
String clientData)

PARAMETERS
Parameter Description

activityInstanceID The ID for the activity instance associated with the work item you want to create.

workToPerform A string that specifies the work to be performed by the work item.

userID A string that represents the user ID for a user associated with the work item.
A time-duration object that specifies the duration setting of the work item. For more
duration
information, see the AgilePoint class reference.
clientData A string with client data.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string activityInstanceID = … // for example, "0172460E0AF943C6A6520044452BCAB3";
string workToPerform = … // for example, "SubmitRequest";//different workToPerform can be used if
// desired
WFTimeDuration duration = new WFTimeDuration("15", WFTimeUnit.DAY, true ); // business time
string user = @"[DOMAIN NAME]\username"; //the particpant of the linked work item
try
{
WFEvent evt = svc.CreateWorkItem(activityInstanceID, workToPerform, user, duration, null);
}
catch(Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


95 AgilePoint Web Services API Guide

GET WORK ITEM

DESCRIPTION
Retrieves the manual work item object for a specified ID.

SYNTAX
WFManualWorkItem GetWorkItem( String wID)

PARAMETERS
Parameter Description

wID The ID of the manual work item.

OUTPUT
WFMaunalWorkItem object.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = …// for example, "54A648A0A3004A02981E7F0848820FE7";
try
{
WFAutomaticWorkItem workItem = svc.GetWorkItem(workItemID);
Console.WriteLine(“{0}”, workItem.Name);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


96 AgilePoint Web Services API Guide

GET WORK LIST BY USER ID

DESCRIPTION
Retrieves a work item collection by specifying a user name and work item status.

SYNTAX
WFManualWorkItem[] GetWorkListByUserID(String username, String status)

PARAMETERS
Parameter Description

username A string that contains the fully qualified user name.


A string that contains the status of the work item. Status is case-sensitive and can be one of
status
the values from the following table.

The following status messages can be displayed:

Status Description

Assigned A task that is assigned to the user.

Completed The completed task.

Re-Assigned A task that has been reassigned to another user.

Cancelled A task that has been cancelled.

Overdue A task that is overdue.

OUTPUT
Array of WFManualWorkItem objects.

EXAMPLE
//Get all WFManualWorkItem assigned to user
IWFWorkflowService svc = GetWorkflowService();
string userID = …// for example, @"Demo3\Adminsitrator";
string filterByStatus= string.format("{0};{1}”,
WFManualWorkItem.ASSIGNED, WFManualWorkItem.OVERDUE);
try
{
WFManualWorkItem[] workItems = svc.GetWorkListByUserID(userID, filterByStatus);
foreach (WFManualWorkItem workItem in workItems)
{
Console.WriteLine(“{0}”, workItem.ApplName);
Console.WriteLine(“{0}”, workItem.AssignedDate);
Console.WriteLine(“{0}”, workItem.DefName);
Console.WriteLine(“{0}”, workItem.DueDate);
}
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


97 AgilePoint Web Services API Guide

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


98 AgilePoint Web Services API Guide

QUERY WORK LIST

DESCRIPTION
Retrieves a list of manual work items that match a specified query expression.

SYNTAX
WFManualWorkItem[] QueryWorkList(WFQueryExpr expr)

PARAMETERS
Parameter Description

expr An object that represents the where clause of a SQL query expression.

OUTPUT
An array of WFManualWorkItem objects that contain the work item data.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
WFAny any = WFAny.Create(WFManualWorkItem.ASSIGNED);
WFQueryExpr expr = new WFQueryExpr("WF_MANUAL_WORKITEM.STATUS", SQLExpr.EQ, any, true);
try
{
WFManualWorkItem[] workItems = svc.QueryWorkList(expr);
// Iterating through the list of the ManualWorkItem
foreach (WFManualWorkItem workItem in workItems)
{
Console.WriteLine(“{0}”, workItem.ApplName);
Console.WriteLine(“{0}”, workItem.AssignedDate);
Console.WriteLine(“{0}”, workItem.DefName);
Console.WriteLine(“{0}”, workItem.DueDate);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


99 AgilePoint Web Services API Guide

QUERY WORK LIST (EXTENDED METHOD)

DESCRIPTION
Retrieves a list of manual work items that match a SQL statement.

SYNTAX
WFManualWorkItem[] QueryWorkListEx(string sql);

PARAMETERS
Parameter Description

sql A string that contains the where clause of the SQL statement you want to query.

OUTPUT
An array of WFManualWorkItem objects.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
//Query Expression String for Comparision of the WORK_ITEM_ID
string sql = "WORK_ITEM_ID in ('0006EE0244ED431CB93F6253060DD21F', …)”;
try
{
// Calling the QueryWorkListEx API with argument sql query expression string.
WFManualWorkItem[] workItems = _svc.QueryWorkListEx(sql);
// Iterating through the list of the ManualWorkItem
foreach (WFManualWorkItem workItem in workItems)
{
Console.WriteLine(“{0}”, workItem.ApplName);
Console.WriteLine(“{0}”, workItem.AssignedDate);
Console.WriteLine(“{0}”, workItem.DefName);
Console.WriteLine(“{0}”, workItem.DueDate);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


100 AgilePoint Web Services API Guide

REASSIGN UPDATE WORK ITEM

DESCRIPTION
Reassigns a manual work item to another participant.

SYNTAX
WFEvent ReassignUpdateWorkItem(
String workItemID,
String orginalUserID,
String newAssigneeUserID,
String clientData)

PARAMETERS
Parameter Description

workItemID A unique, 32-character ID of original, or source, work item.

originalUserID The user ID for the original user assigned the work item.

newAssigneeUserID The User ID for the user to which you want to assign the work item.

clientData A string containing client data.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = …// "0006EE0244ED431CB93F6253060DD21F"; // Work item id
string originalUserID = …// @"[DOMAIN NAME]\[user name]"; // new userid
string newAssigneedUserID = …// @"[DOMAIN NAME]\[user name]"; // new userid
try
{
WFEvent evt = ReassignUpdateWorkItem(workItemID, originalUserID, newAssigneedUserID, null);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


101 AgilePoint Web Services API Guide

REASSIGN WORK ITEM

DESCRIPTION
Reassigns a work item to another participant, and update the user name.

SYNTAX
WFEvent ReassignWorkItem( String wID, String userID)

PARAMETERS
Parameter Description

wID A unique, 32-character work item ID.

userID The user ID for the target user to whom you want to assign the work item.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string wID = …// "0006EE0244ED431CB93F6253060DD21F"; // Work item id
string newAssigneedUserID = …// @"[DOMAIN NAME]\[user name]"; // new userid
try
{
WFEvent evt = svc.ReassignWorkItem(wID, newAssigneedUserID);
}
catch(Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


102 AgilePoint Web Services API Guide

REASSIGN WORK ITEM (EXTENDED METHOD)

DESCRIPTION
Reassigns a work item to another participant, and update the user name. The extended method includes
client data.

SYNTAX
WFEvent ReassignWorkItemEx(String wID, String userID, String clientData)

PARAMETERS
Parameter Description

workItemID A unique, 32-character work item ID.

userID The user ID for the target user to whom you want to assign the work item.
A string with client data associated with a manual work item. If clientData is null, the
clientData engine will keep the existing client data with the work item. Otherwise it would be
overwritten.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
string clientData = "<?xml version=“1.0” … …”;
string workItemID = ...// for example, "0006EE0244ED431CB93F6253060DD21F"; // Work item id
string newAssigneedUserID = …// for example @"[DOMAIN NAME]\[USER NAME]"; // new userid
try
{
WFEvent evt = _svc.ReassignWorkItemEx(workItemID, newAssigneedUserID, client);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


103 AgilePoint Web Services API Guide

UNDO ASSIGN WORK ITEM

DESCRIPTION
Unassigns a work item that was previously assigned to a user. This method applies to work items that can
be assigned to members of task groups, where a work item can be assigned to or claimed by any of a group
of users.

SYNTAX
WFEvent UndoAssignWorkItem (string workItemID);

PARAMETERS
Parameter Description

workItemID A unique, 32-character work item ID.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = …// for example, "03ABD59A0EB74D7A8741709478E83877";
try
{
WFEvent evt = svc.UndoAssignWorkItem(workItemID);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


104 AgilePoint Web Services API Guide

UNDO ASSIGN WORK ITEM (EXTENDED METHOD)

DESCRIPTION
Unassigns a work item that was previously assigned to a user. This method applies to work items that can
be assigned to members of task groups, where a work item can be assigned to or claimed by any of a group
of users. The extended method includes client data.

SYNTAX
WFEvent UndoAssignWorkItemEX (string workItemID, string clientData);

PARAMETERS
Parameter Description

workItemID A unique, 32-character work item ID.


A string with client data associated with a manual work item. If clientData is null, the
clientData engine will keep the existing client data with the work item. Otherwise it would be
overwritten.

OUTPUT
WFEvent object that provides the status of the transaction. Possible statuses are Success, Failed, and Sent.

EXAMPLE
string url = "http://localhost:1234/AgilePointServer";
string workItemID = …// for example, "03ABD59A0EB74D7A8741709478E83877";
string clientData = …///
try
{
WFEvent evt = svc.UndoAssignWorkItemEx(workItemID, clientData);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


105 AgilePoint Web Services API Guide

UPDATE WORK ITEM

DESCRIPTION
Updates a manual work item or automatic work item.

SYNTAX
void UpdateWorkItem(string WorkItemID, NameValue[] attributes);

PARAMETERS
Parameter Description

workItemID A unique, 32-character work item ID.


A NameValue array that contains the attributes that needs to be updated in the work item.
For a manual work item, the following attributes can be updated:
 NAME
 ORIGINAL_USER_ID
 CLIENT_DATA, POOL_ID
attribute  POOL_INFO
 STATUS
 USER_ID
 PRIORITY
 DUE_DATE
For an automatic work item, only DUE_DATE can be updated.

OUTPUT
None.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string workItemID = …// work item ID of manual work item or automatic work item.
try
{
NameValue[] attrs = NameValue.Array(
"NAME", "[New Name]",
“DUE_DATE”, [DateTime]); // for example, DateTime.Now.AddDays(3.0)
svc.UpdateWorkItem(workItemID, attrs );
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


106 AgilePoint Web Services API Guide

METHODS FOR NOTIFICATIONS


This section describes service calls related to email notifications.

CANCEL MAIL DELIVERABLE

DESCRIPTION
Cancels the failed mail deliverable record based on a given message identifier. Note that cancelling the
failed mail deliverable record prevents it from being recycled or present on a given interval by the
AgilePoint engine.

SYNTAX
void CancelMailDeliverable(String mID)

PARAMETERS
Parameter Description

mID A string that contains the unique ID for an email notification.

OUTPUT
None.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string emailNotificatioID = …
try
{
svc.CancelMailDeliverable(emailNotificatioID);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


107 AgilePoint Web Services API Guide

GET EXPECTING SEND MAIL DELIVERABLE

DESCRIPTION
Retrieves all the failed sent and scheduled to resend email notifications.

SYNTAX
WFMailDeliverable[] GetExpectingSendMailDeliverable()

PARAMETERS
None.

OUTPUT
Array of WFMailDeliverable objects.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
try
{
//Returns Array of WFMailDeliverable type
WFMailDeliverable[] mailDeliverables = svc.GetExpectingSendMailDeliverable();
foreach(WFMailDeliverable m in mailDeliverables)
{
Console.WriteLine("Mail ID: '{0}‟", m.ID);
Console.WriteLine("Process Instance ID: '{0}‟",m.ProcInstID);
Console.WriteLine("E-Mail Subject: '{0}‟", m.Mail.Subject);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


108 AgilePoint Web Services API Guide

GET MAIL DELIVERABLES

DESCRIPTION
Retrieves all the mail deliverables for a process instance.

SYNTAX
WFMailDeliverable[] GetMailDeliverables(String processInstanceID)

PARAMETERS
Parameter Description

processInstanceID A string that contains the ID for a process instance.

OUTPUT
Array of WFMailDeliverable objects.

EXAMPLE
//Process Instance ID associated with the Process Instance.
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = …// for example, "1e3d514d43d3465cae6ec3bbbd409168";
try
{
WFMailDeliverable[]emailNotifications = svc.GetMailDeliverables(processInstanceID);
foreach(WFMailDeliverable m in emailNotifications)
{
Console.WriteLine("Mail ID: '{0}‟", m.ID);
Console.WriteLine("Process Instance ID: '{0}‟", m.ProcInstID);
Console.WriteLine("E-Mail Subject: '{0}‟", m.Mail.Subject);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


109 AgilePoint Web Services API Guide

RESEND MAIL DELIVERABLE

DESCRIPTION
Resends the mail deliverable with a specified mail ID.

SYNTAX
void ResendMailDeliverable(string mID);

PARAMETERS
Parameter Description

mID A string that contains the unique ID for an email notification.

OUTPUT
None.

EXAMPLE
//Sample for using resendMailDeliverable
IWFWorkflowService svc = GetWorkflowService();
String emailNotificationID = … // for example, “149C3974240F47D3B28EB6D4A3CDCD3F”
try
{
svc.ResendMailDeliverable(emailNotificationID);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


110 AgilePoint Web Services API Guide

METHODS FOR EVENTS


This section describes service calls related to workflow events.

GET EVENT

DESCRIPTION
Retrieves an event object. This service call is usually used to check if a service call has been completed.

SYNTAX
WFEvent GetEvent(String eventID)

PARAMETERS
Parameter Description

eventID A unique, 32-character event ID.

OUTPUT
WFEvent object.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string eventID = …// for example, "049C3974240F47D3BA8EB6D4A3CDCD3F";
try
{
WFEvent evt = _workflowAPI.GetEvent(eventID);
Console.WriteLine("Event ID: '{0}‟", evt.EventID);
Console.WriteLine("Event Name: '{0}‟",evt.EventName);
Console.WriteLine("Event Status: '{0}‟",evt.Status);

}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


111 AgilePoint Web Services API Guide

METHODS FOR CUSTOM ATTRIBUTES


This section describes service calls related to custom attributes.

GET CUSTOM ATTRIBUTE

DESCRIPTION
Retrieves a single custom attribute.

SYNTAX
Object GetCustomAttr(String customID, String name);

PARAMETERS
Parameter Description

customID A string that contains a custom ID.

name A string that contains the name of a custom attribute.

OUTPUT
Custom attribute value (can be string, integer, float, double, bool, and/or DateTime).

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string customID = …// for example, "013933F128C3415F81D6F545594D4CB6";
string name = …// for example, "/pd:myFields/pd:Name" or “Approval”
try
{
Object obj = svc.GetCustomAttr(customID,name);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


112 AgilePoint Web Services API Guide

GET CUSTOM ATTRIBUTES

DESCRIPTION
Retrieves a collection of custom attributes for a specified custom ID in XML format.

SYNTAX
string GetCustomAttrs(String customID)

PARAMETERS
Parameter Description

customID A string that contains a custom ID.

OUTPUT
String that contains all the attributes for the custom ID in XML format.

EXAMPLE

// get custom attributes in xml format


IWFWorkflowService svc = GetWorkflowService();
string customID = …// for example, "013933F128C3415F81D6F545594D4CB6";
try
{
string xml = svc.GetCustomAttrs(sessionID, String processInstanceID);
Console.WriteLine("AttributeXMLString={0}",resultAttrXML);
WFCustomAttributes attrs = new WFCustomAttributes();
attrs.AttrXml = xml; // de-serialize xml
string[] attributeNames = attrs.GetNames();// get attribute names
Object value = attrs[“MyAttributeName”]; // retrieve attribute value
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


113 AgilePoint Web Services API Guide

GET CUSTOM ATTRIBUTES (EXTENDED METHOD)

DESCRIPTION
Retrieves all custom attributes for a specified a set of custom IDs.

SYNTAX
KeyValue[] GetCustomAttrsEx(String[] customIDs)

PARAMETERS
Parameter Description

customIDs An array of strings that contains custom IDs.

OUTPUT
An array of KeyValue values. The key is a custom ID, and value is a string of custom attributes in XML
format.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
//Array of custom ID
string[] customIDs = …// for example, {"InfoPath:011eaf6c46ac4723b25b4db5772d9912", ….};

try
{
KeyValue[] keyValues = svc.GetCustomAttrsEx(customIDs);
foreach (KeyValue kv in keyValues)
{
Console.WriteLine(“ID:‟{0}‟”, kv.Key);
Console.WriteLine("Custom Attributes XML: '{0}‟", kv.Value);
WFCustomAttributes attrs = new WFCustomAttributes();
Attrs.AttrXml = kv.Value;
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


114 AgilePoint Web Services API Guide

REMOVE CUSTOM ATTRIBUTE

DESCRIPTION
Removes a custom attribute from a custom ID.

SYNTAX
void RemoveCustomAttr(String customID, String name)

PARAMETERS
Parameter Description

customID A string that contains a custom ID

name A string that contains an attribute name.

OUTPUT
None.

EXAMPLE
//Sample for using Workflow.RemoveCustomAttr
IWFWorkflowService svc = GetWorkflowService();
string customID = ..// for example, “InfoPath:011eaf6c46ac4723b25b4db5772d9912”
string attributeName = ...// for example, “//pd:purchaseOrder/pd:secondApproval”
try
{
svc.RemoveCustomAttr(customID, attributeName);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


115 AgilePoint Web Services API Guide

REMOVE CUSTOM ATTRIBUTES

DESCRIPTION
Removes multiple custom attributes from a custom ID.

SYNTAX
void RemoveCustomAttrs(String customID, String[] names)

PARAMETERS
Parameter Description

customID A string that contains a custom ID.

names An array of attribute names.

OUTPUT
None.

EXAMPLE
//Sample for using Workflow.RemoveCustomAttr
IWFWorkflowService svc = GetWorkflowService();

string customID = ...// for example, “InfoPath:011eaf6c46ac4723b25b4db5772d9912”

// array of attribute name, for example,


// new string[] { // “//pd:purchaseOrder/pd:secondApproval”, ... };
string[] attributeNames = ...

try
{
svc.RemoveCustomAttrs(customID, attributeNames);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


116 AgilePoint Web Services API Guide

SET CUSTOM ATTRIBUTE

DESCRIPTION
Sets the name and value for a custom attribute for a specified custom ID.

SYNTAX
void SetCustomAttr(string customID, string name, object val);

PARAMETERS
Parameter Description

Custom A string that contains a custom ID.

name A string that contains the name of the attribute.

val An object that contains the value of the custom attribute.

OUTPUT
None.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string customID = ..// for example, “InfoPath:011eaf6c46ac4723b25b4db5772d9912”
string attributeName = ...// for example, “//pd:purchaseOrder/pd:secondApproval”
bool attributeValue = true;
try
{
svc.SetCustomAttr(customID, attributeName, attributeValue);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


117 AgilePoint Web Services API Guide

SET CUSTOM ATTRIBUTES

DESCRIPTION
Sets names and values for multiple custom attributes for a specified custom ID.

SYNTAX
void SetCustomAttrs(string customID, NameValue[] attributes);

PARAMETERS
Parameter Description

customID A string that contains a custom ID.

attributes An array of name-value pairs that contains the names and values of the custom attributes.

OUTPUT
None.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string customID = ..// for example, “InfoPath:011eaf6c46ac4723b25b4db5772d9912”

NameValue[] attributes = new NameValue[] {


new NameValue("CustomAttributeName1","CustomAttributevalue1"),
new NameValue("CustomAttributeName2",false),
new NameValue("CustomAttributeName3", 10.0)
};

try
{
svc.SetCustomAttrs(customID, attributes);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


118 AgilePoint Web Services API Guide

METHODS FOR ARCHIVING AND RESTORING PROCESSES


This section describes service calls related to archiving and restoration of processes.

ARCHIVE PROCESS INSTANCE

DESCRIPTION
Archives a process instance based on a specified process instance identifier by moving the set of process
instance records from the current AgilePoint Database into the AgilePoint Archive Database. The process
instance records and all of the associated data are then deleted from the AgilePoint Database. The process
instance to be archived must be completed or cancelled.

SYNTAX
void ArchiveProcInst(string procInstID)

PARAMETERS
Parameter Description

processInstanceID A string that contains the ID of the process instance.

OUTPUT
None.

EXAMPLE
// this is console application sample
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = ..// the ID of process instance to be archieved
try
{
svc.ArchiveProcInst(processInstanceID);
}
catch (Exception ex)
{
Console.WriteLine("Failed!, {0}", ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


119 AgilePoint Web Services API Guide

RESTORE PROCESS INSTANCE

DESCRIPTION
Restores a process instance and associated data from the ArchiveDatabase to the AgilePoint Server. The
process instance records are written to the AgilePoint Database deleted from the AgilePoint Archive
Database.

SYNTAX
void RestoreProcInst(string procInstID)

PARAMETERS
Parameter Description

processInstanceID A string that contains the ID of the process instance.

OUTPUT
None.

EXAMPLE
// this is console application sample code
IWFWorkflowService svc = GetWorkflowService();
String processInstanceID = ..// the ID of process instance to be restored.
try
{
svc.RestoreProcInst(processInstanceID);
}
catch (Exception ex)
{
Console.WriteLine("Failed! ” + ShUtil.GetSoapMessage(ex) );
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


120 AgilePoint Web Services API Guide

QUERY ARCHIVED PROCESS INSTANCES

DESCRIPTION
Retrieves process instances that match a SQL query.

SYNTAX
WFBaseProcessInstance[] QueryArchivedProcInsts(string sql)

PARAMETERS
Parameter Description

sql A string that contains the where clause of the SQL statement you want to query.

OUTPUT
An array of WFBaseProcessInstance objects.

EXAMPLE
// Build Sql Statement
string processDefinitionName = "Budget Request Approval Process";
string sqlWhereClause = string.Format(“DEF_NAME =‟{0}‟”, processDefinitionName);
try
{
WFBaseProcessInstance[] archivedProcessInstances = svc.QueryArchivedProcInsts(sqlWhereClause)
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


121 AgilePoint Web Services API Guide

SEND MAIL
This section describes service calls related to sending email using AgilePoint.

SEND MAIL

DESCRIPTION
Sends an email through AgilePoint Server.

SYNTAX
void SendMail(string to, string cc, string subject, string body);

PARAMETERS
Parameter Description

to Recipient of the email.

cc Persons copied on the email.

subject The subject of the email.

body The text of the email (body).

OUTPUT
None.

EXAMPLE
//Sample for using Workflow.SendMail
IWFWorkflowService svc = GetWorkflowService();
try
{
// email recipients
string to = "bill@tusca.com";
// CC
string cc = "bob@tusca.com";
//Subject of the Mail
string subject = "This is email Subject";
//Body of the Mail
string body = "This email Body";
svc.SendMail(to, cc, subject, body);
}
catch (Exception ex)
{
Console.WriteLine("Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


122 AgilePoint Web Services API Guide

SEND MAIL (EXTENDED METHOD)

DESCRIPTION
Sends an email through AgilePoint Server. The extended method enables you to send attachments.

SYNTAX
void SendMailEx(string from, string to, string cc, string subject, string body , string
attachments);

PARAMETERS
Parameter Description

From The sender of the email.

To The recipient of the email

cc Persons copied on the email.

Subject The text of the email (body).


File attachments included with the email. This parameter must use a file path from the file
Attachments
system (for example, C:\file.txt) on the machine where AgilePoint Server is installed.

OUTPUT
None.

EXAMPLE
//Sample for using Workflow.SendMailEx
IWFWorkflowService svc = GetWorkflowService();
try
{
string from = "john@tusca.com"; // or <Full Name>”email address”
string to = "bill@tusca.com";
string cc = "bob@tusca.com";
string subject = "Mail Subject";
string body = "Mail Body";
string attachments = "c:\\Temp\\Tempdoc.doc";
//Send Mail
svc.SendMailEx(from, to, cc, subject, body, attachments);
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


123 AgilePoint Web Services API Guide

OTHER WEB SERVICES


This section describes other additional web services.

QUERY AUDIT TRAIL

DESCRIPTION
Retrieves all audit trail items.

SYNTAX
WFAuditTrailItem[] QueryAuditTrail(String sql)

PARAMETERS
Parameter Description

sql A string that contains the where clause of the SQL statement you want to query.

OUTPUT
An array list of WFAuditTrailItem objects.

EXAMPLE
// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
// Checking where condition based on the CATEGORY COLUMN and PURPOSE COLUMN .
string where = "CATEGORY = 0 AND PURPOSE='Check-in process definition'";
try
{
// calling the QueryAuditTrail web method it return a array of Dataset.
WFAuditTrailItem[] result = svc.QueryAuditTrail(where);
foreach (WFAuditTrailItem item in result)// Iterating through WFAuditTrailItem
{
//Displaying the result on the console.
System.Console.Write("ItemCategory: {0} ,ItemDateOccurred: {1}",
item.Category,item.DateOccurred);
System.Console.Write("ItemDescription: {0} ,ItemObjectID: {1}",
item.Description, item.ObjectID);
System.Console.WriteLine("ItemPurpose: {0} ,ItemPerformer: {1}",
item.Purpose item.Performer);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
4.0.1 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


124 AgilePoint Web Services API Guide

QUERY DATABASE

DESCRIPTION
Queries the database with any valid sql query and returns the dataset as a string in XML format.

SYNTAX
string QueryDatabase(String sql)

PARAMETERS
Parameter Description

sql A string that contains the where clause of the SQL statement you want to query.

OUTPUT
An XML string that contains the dataset with the results of the database query.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string sql = "SELECT * FROM WF_AUDIT_TRAILS where CATEGORY = 0 AND PURPOSE='Check-in process
definition'";
try
{
// calling the QueryDatabase webmethod and passing the sql query as the argument.
string xml = svc.QueryDatabase(sql);
Console.WriteLine(“{0}”, xml);// Displaying the XML string on console.

System.IO.StringReader sr = new System.IO.StringBuilder(xml);


System.Data.DataSet ds = new System.Data.DataSet();
ds.LoadXml(sr);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


125 AgilePoint Web Services API Guide

QUERY DATABASE (EXTENDED METHOD)

DESCRIPTION
Queries the database with any valid SQL query and returns an array of 2 elements in XML string format.

SYNTAX
string[] QueryDatabaseEx(String sql)

PARAMETERS
Parameter Description

sql A string that contains the where clause of the SQL statement you want to query.

OUTPUT
2 elements in a string array, where string[0] is an XML string with the dataset of the query results and
string[1] is an XML string with the schema.

EXAMPLE
IWFWorkflowService svc = GetWorkflowService();
string sql = "SELECT * FROM WF_AUDIT_TRAILS where CATEGORY = 0 AND PURPOSE='Check-in process
definition'";
try
{
// calling the QueryDatabase webmethod and passing the sql query as the argument.
string[] xmls = svc.QueryDatabase(sql);
Console.WriteLine(“{0}”, xmls[0]);// Displaying the XML string on console.
Console.WriteLine(“{0}”, xmls[1]);// Displaying the schema on console.
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


126 AgilePoint Web Services API Guide

ADMINISTRATIVE SERVICE
This section describes service calls related to administrative functions. These calls are found under
admin.wsdl.

GET DATABASE INFORMATION

DESCRIPTION
Retrieves the database information of the current server configuration.

SYNTAX
DatabaseInfo GetDatabaseInfo()

PARAMETERS
None.

OUTPUT
A DatabaseInfo object that represents the database information of the system.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
DatabaseInfo dbInfo = svc.GetDatabaseInfo();
if (dbInfo != null)
{
Console.WriteLine("AgilePoint System Database Information:");
Console.WriteLine("Vendor: {0}", dbInfo.Vendor);
Console.WriteLine("Provider: {0}", dbInfo.Provider);
Console.WriteLine("Connection String: {0}", dbInfo.Connstr);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

/*
This example produces the following results:

AgilePoint System Database Information:


Vendor: MSSQLDatabase
Provider:
Connection String: application name=AgilePoint Server;connection lifetime=5;min pool
size=10;server=VIT-34;database=AgilePointDB;trusted_Connection=yes
*/

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


127 AgilePoint Web Services API Guide

GET DOMAIN GROUPS

DESCRIPTION
Retrieves all the domain group objects.

SYNTAX
KeyValue[] GetDomainGroups(String source, String filter);

PARAMETERS
Parameter Description
A string that contains the LDAP path to the domain. If the value is null, the AgilePoint
source
Server machine domain will be used.
A string that contains the wildcard-enabled group filter in the format (name=<<wildcard
filter
filter>>)

OUTPUT
Array of KeyValue objects. If the specified group is not found, the output is null.

EXAMPLE
IWFAdminService svc = GetAdminService();
string activeDirectoryLdapPath = ...// for example, LDAP://ou=Sales,dc=Frabrikam,dc=com
string groupNameFilter = "A*";
groupNameFilter = String.Format("(name={0})", groupNameFilter);
try
{
KeyValue[] grps = svc.GetDomainGroups(activeDirectoryLdapPath, groupNameFilter);
foreach (KeyValue grp in grps)
{
Console.WriteLine("Group Name:{0}; Group Distinct Name:{1};", grp.Key, grp.Value);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


128 AgilePoint Web Services API Guide

GET DOMAIN GROUP MEMBERS

DESCRIPTION
Retrieves the members of a domain group.

SYNTAX
DomainUser[] GetDomainGroupMembers (String groupDistinguishedName);

PARAMETERS
Parameter Description

groupDistinguishedName A string that contains the name of the group in LDAP format.

OUTPUT
An array of DomainUser objects.

EXAMPLE
IWFAdminService svc = GetAdminService();
string groupName = "Administrators";
string distinguishedGroupName = "LDAP://" + groupName;
try
{
DomainUser[] grpUsers = svc. GetDomainGroupMembers(distinguishedGroupName);
foreach (DomainUser usr in grpUsers)
{
Console.WriteLine("User Name:{0}; Full Name:{1};", usr.UserName, usr.FullName);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

/*
This example produces the following results:

User Name:Administrator; Full Name:Administrator


User Name:vitbdc/yuvarajn; Full Name:Yuvaraj Nagarajan
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


129 AgilePoint Web Services API Guide

GET DOMAIN NAME

DESCRIPTION
Retrieves the domain name to which AgilePoint Server connects.

SYNTAX
String GetDomainName();

PARAMETERS
None.

OUTPUT
A string containing the domain name of the AgilePoint Server machine.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{

string domainName = svc.GetDomainName();


Console.WriteLine(“AgilePoint System Domain Name={0}”, domainName);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
/* Sample of output
AgilePoint System Domain Name=LDAP://dc=Frabrikam,dc=com
*/

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


130 AgilePoint Web Services API Guide

GET DOMAIN USERS

DESCRIPTION
Retrieves all the user information in the domain that AgilePoint Server connects. It could be a local
Windows system user, or a domain controller on the network.

SYNTAX
DomainUser[] GetDomainUsers (String source, String filter);

PARAMETERS
Parameter Description
A string that contains the LDAP path to the domain. If the value is null, the AgilePoint
source
Server machine domain will be used.
A string that contains the wildcard-enabled group filter in the format (name=<<wildcard
filter
filter>>)

OUTPUT
Array of DomainUser objects. If the specified group does not exist, the return value is null.

EXAMPLE
IWFAdminService svc = GetAdminService();
string activeDirectoryLdapPath = ...// for example, LDAP://ou=Sales,dc=Frabrikam,dc=com
string userFilter = ""; // All Users
try
{

DomainUser[] users = svc.GetDomainUsers(activeDirectoryLdapPath, userFilter);


foreach (DomainUser user in users)
{
Console.WriteLine("Full Name:{0}; Login Name:{1};", user.FullName, user.UserName);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
/*
This example produces the following results:

Full Name:Manager; Login Name:VIT-34\Manager;


Full Name:Marcomm; Login Name:VIT-34\Marcomm;
Full Name:SharePoint Administrator; Login Name:VIT-34\sp_adm;
Full Name:Sujeet Kumar; Login Name:VIT-34\sujeetk;
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


131 AgilePoint Web Services API Guide

GET LOCALE

DESCRIPTION
Retrieves the default locale for the AgilePoint Server.

SYNTAX
string GetLocale();

PARAMETERS
None.

OUTPUT
Locale abbreviation—for example, en-US.

EXAMPLE
IWFAdminService svc = GetAdminService();
string activeDirectoryLdapPath = ...// for example, LDAP://ou=Sales,dc=Frabrikam,dc=com
string userFilter = ""; // All Users
try
{

string locale = svc.GetLocale();


Console.WriteLine("Locale = '{0}‟", locale);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
This example produces the following results:
Locale = 'en-US

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


132 AgilePoint Web Services API Guide

GET REGISTER USER

DESCRIPTION
Retrieves the user information for the registered user.

SYNTAX
RegisteredUser GetRegisterUser(String userName);

PARAMETERS
Parameter Description

userName A string that contains a user name – for example, DomainName\UserName.

OUTPUT
RegisteredUser object.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{

RegisteredUser registerUser = svc.GetRegisterUser("domain\\wilson.goodman");


Console.WriteLine("Name = '{0}‟, Depertment = „{1}‟",
registerUser.FullName,
registerUser.Department);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

This example produces the following results:


Name = 'CFO' Department = 'Finance'

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


133 AgilePoint Web Services API Guide

GET REGISTER USERS

DESCRIPTION
Retrieves all registered users.

SYNTAX
RegisteredUser[] GetRegisterUsers();

PARAMETERS
None.

OUTPUT
Returns an array of registered users.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{

RegisteredUser[] registerUsers = svc.GetRegisterUsers();


foreach (RegisteredUser regUser in registerUsers)
{
Console.WriteLine("Name = '{0}‟, Depertment = „{1}‟",
registerUser.FullName,
registerUser.Department);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


134 AgilePoint Web Services API Guide

GET REGISTER USER ICONS

DESCRIPTION
Retrieves an icon for a registered user.

SYNTAX
byte[] GetRegisteredUserIcon(String userName)

PARAMETERS
Parameter Description

userName A string that contains a registered user name.

OUTPUT
Return an array of bytes that contains image data.

EXAMPLE
For Future Use.

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


135 AgilePoint Web Services API Guide

GET SENDER EMAIL ADDRESS

DESCRIPTION
Retrieves the sender email address of the AgilePoint Server.

SYNTAX
string GetSenderEMailAddress();

PARAMETERS
None.

OUTPUT
The email address that is configured as the sender email address on the AgilePoint Server.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{

string senderEMailAddress = svc.GetSenderEMailAddress();


Console.WriteLine("Sender EMail Address = '{0}‟", senderEMailAddress);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
This example produces the following results:
Sender EMail Address = 'admin@your-domain.com'

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


136 AgilePoint Web Services API Guide

GET SMTP SERVER

DESCRIPTION
Retrieves the SMTP server of the current server configuration.

SYNTAX
string GetSmtpServer();

PARAMETERS
None.

OUTPUT
A string that contains the name of the AgilePoint system's SMTP server.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
string smtpServer = svc.GetSmtpServer();
Console.WriteLine("SMTP Server Name = '" + smtpServer + "'");
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
This example produces the following results:
SMTP Server Name = 'smtp.vitinfotech.com'

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


137 AgilePoint Web Services API Guide

GET SYSTEM PERFORMANCE INFORMATION

DESCRIPTION
Retrieves system performance information for AgilePoint Server.

SYNTAX
WFSysPerfInfo GetSysPerfInfo();

PARAMETERS
None.

OUTPUT
WFSysPerfInfo object.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
WFSysPerfInfo sysPerfInfo = svc.GetSysPerfInfo();
Console.WriteLine("1) ServerID = '{0}‟",sysPerfInfo.ServerID);
Console.WriteLine("2) MemoryAllocated = '{0}‟", sysPerfInfo.MemoryAllocated);
//...
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
/*
This example produces the following results:
1) ServerID = 'DEMO/4356'
2) MemoryAllocated = '7329'
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


138 AgilePoint Web Services API Guide

GET SYSTEM USER

DESCRIPTION
Retrieves the name of the system user.

SYNTAX
string GetSystemUser();

PARAMETERS
None.

OUTPUT
Returns the name of the system user as a string value.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
string systemUser = svc.GetSystemUser();
Console.WriteLine("AgilePoint System User= '{0}‟", systemUser);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

This example produces the following results:


AgilePoint System User = 'Administrator'

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


139 AgilePoint Web Services API Guide

QUERY REGISTER USERS

DESCRIPTION
Retrieves the list of registered users on the AgilePoint Server.

SYNTAX
RegisteredUser[] QueryRegisterUsers(string sql);

PARAMETERS
Parameter Description

sql A string that contains the where clause of the SQL statement you want to query.

OUTPUT
Returns a list of registered users.

EXAMPLE
IWFAdminService svc = GetAdminService();
String sqlWhereClause = "DEPARTMENT in ('PublicUsers', ...)”
try
{
RegisteredUser[] registeredUsers = adminService.QueryRegisterUsers(sqlWhereClause);
foreach (RegisteredUser user in registeredUsers)
{
Console.WriteLine("User Name = '{0}‟, Email = „{1}‟", user.UserName,user.EMailAddress);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

/*
This example produces the following results:
User Name = 'DEMO\Author' Email = 'author@DEMO.com'
User Name = 'DEMO\Employee' Email = 'employee@DEMO.com'
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


140 AgilePoint Web Services API Guide

REGISTER USER

DESCRIPTION
Registers a user on the AgilePoint system.

SYNTAX
void RegisterUser(RegisteredUser user);

PARAMETERS
Parameter Description
A RegisteredUser object that contains user information. For more information, see the
user
AgilePoint class reference.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
RegisteredUser newUser= new RegisteredUser();
newUser.FullName = "Accountant";
newUser.UserName = "DEMO\\Accountant";
newUser.Department = "Accounts";
newUser.EMailAddress = "accountant@DEMO.com";
newUser.Locale = "en-US";

svc.RegisterUser(newUser);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


141 AgilePoint Web Services API Guide

UNREGISTER USER

DESCRIPTION
Removes a user's registration from the AgilePoint system. Note that this call does not remove the user from
the local Windows system or the domain controller.

SYNTAX
void UnregisterUser(String userName);

PARAMETERS
Parameter Description

userName A string that contains the user name.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
string userName = ...// for example, “[Domain Name]\[User Account Name]”
try
{
svc.UnregisterUser(userName);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


142 AgilePoint Web Services API Guide

UPDATE REGISTERED USER

DESCRIPTION
Updates user data for a registered user.

SYNTAX
void UpdateRegisterUser(RegisteredUser user);

PARAMETERS
Parameter Description
A RegisteredUser object that contains user information. For more information, see the
user
AgilePoint class reference.

OUTPUT
None.

EXAMPLE
RegisteredUser user = new RegisteredUser();
user.UserName = “DEMO3\\cfo”;
user.FullName = “Andy”;
user.EMailAddress = “cfo@tusca.com”;
user.Title = “CFO”;
user.Department = “Marketing”;
user.Manager = “DEMO3\\Administrator”;
user.Locale = Thread.CurrentThread.CurrentUICulture.Name;

IWFAdminService svc = GetAdminService();


try
{
svc.UpdateRegisterUser( user );
}
catch( Exception ex )
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


143 AgilePoint Web Services API Guide

UPDATE REGISTERED USER ICON

DESCRIPTION
Updates the icon for a registered user.

SYNTAX
void UpdateRegisteredUserIcon(String userName, byte[] userIcon);

PARAMETERS
Parameter Description

userName A string that contains a user name.

userIcon Byte array representation of icon image.

OUTPUT
None.

VERSIONS SUPPORTED
4.6 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


144 AgilePoint Web Services API Guide

GROUP, ROLE, AND RIGHTS


This section describes service calls related to the groups, roles, and rights.

ADD GROUP

DESCRIPTION
Adds a group to the AgilePoint system.

SYNTAX
WFGroup AddGroup(String groupName, String description, String responsibleUser, bool enabled)

PARAMETERS
Parameter Description

groupName A string that contains the name of the group.

description A string that contains the description of group.


A string that contains the name of the responsible user of this group. The responsible user
responsibleUser
must be a registered AgilePoint user.
enabled A Boolean flag that sets the group.

OUTPUT
WFGroup object represented the group that is added.

EXAMPLE
IWFAdminService svc = GetAdminService();
string groupName = ...;
string description = ...;
string responsibleUser = @“[Domain Name]\[Account Name]”, // Group Lead User Name
bool enable = true;
try
{
WFGroup group = svc.AddGroup(groupName, description, responsibleUser, enable);
}
catch( Exception ex )
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


145 AgilePoint Web Services API Guide

ADD GROUP MEMBER

DESCRIPTION
Adds a user as a member of a group.

SYNTAX
WFGroupMember AddGroupMember(
String groupName,
String userName,
String description,
String clientData,
bool enabled)

PARAMETERS
Parameter Description

groupName A string that contains the name of the group to which you want to add the member.
A string that contains the user name for the user you want to add to the group. This
userName
member must be a registered AgilePoint user.
description A string that contains the description of the member.

clientData A string that contains the client data.

enabled A Boolean value: True enables the user; False disables the user.

OUTPUT
WFGroupMember object that contains the data for the new group member.

EXAMPLE
IWFAdminService svc = GetAdminService();
string groupName = ...;
string description = ...;
string userName = @“[Domain Name]\[Account Name]”, // Group Lead User Name
string clientData = null;
bool enable = true;
try
{
WFGroup group = svc.AddGroupMember(groupName, userName, description, clientData, enable);
}
catch( Exception ex )
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


146 AgilePoint Web Services API Guide

ADD ROLE

DESCRIPTION
Adds a role to the AgilePoint system.

SYNTAX
WFRole AddRole(String roleName, String description, int[] rights, bool enabled)

PARAMETERS
Parameter Description

roleName A string that contains the name of the role you want to add.

description A string that contains the description of the role.


Array of index values that specifies the rights that are assigned to the Role. See the
rights following table for appropriate indexes. WFAccessRights provides the enums offor
rights. See the sample code for more information.
enabled A Boolean value: True enables the user; False disables the user.

Rights Index

Register and modify the user information 0

Unregister a user 1

Add and modify role information 2

Remove a role 3

Add and modify group information 4

Remove a group 5

Modify and view system information 6

Add a process definition 7

Check in and check out a process definition 8

Delete or disable a process definition 9

Release a process definition 10

Initiate a process 11

Suspend and resume a process 12

Resend and cancel an email notification 13

Cancel a process 14

Rollback a process 15

Reassign a task 16

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


147 AgilePoint Web Services API Guide

Cancel a task 17

Create a task 18

Add, remove and modify delegation 19

Add, remove and modify report configuration 20

Achieve and restore processes 21

Add, remove and modify shared custom attributes 22

View process details 23

OUTPUT
WFRole object for the role that is added.

EXAMPLE
IWFAdminService svc = GetAdminService();
string roleName = ...// for example, “Process Manager”;
string description = ...;

/*integer array specifying the access rights for this role.


* 11 - Initiate a process
* 14 - Canclel a process
* 23 - view process details
*/
int[] rights = {
WFAccessRights.InitiateProcessInstance,
WFAccessRights.CancelProcessInstance,
WFAccessRights.ViewProcessDetails
};
try
{
WFRole role = svc.AddRole(roleName, description, rights, true);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


148 AgilePoint Web Services API Guide

ADD ROLE MEMBER

DESCRIPTION
Adds a user or a group to a role.

SYNTAX
WFRoleMember AddRoleMember(
String roleName,
String assigne,
String assigneType,
String clientData,
String objectID,
String objectType);

PARAMETERS
Parameter Description

roleName A string that contains the name of the role.

assignee The registered user name or group name.

assigneeType The type for the assignee: Either user or group.

clientData A string that contains the client data.

objectID Reserved for future use. Leave null.

objectType Reserved for future use. Leave null.

OUTPUT
WFRoleMember object.

EXAMPLE
IWFAdminService svc = GetAdminService();
string roleName = "Administrative";
string assignee = @"Demo3\Administrator";
string assigneeType = "User";

try
{
WFRoleMember member = svc.AddRoleMember(roleName, assigne, assigneType, "", null, null);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


149 AgilePoint Web Services API Guide

ENABLED GROUP MEMBER

DESCRIPTION
Enables or disables a user as a member of a group.

SYNTAX
WFGroupMember EnabledGroupMember(string groupName, string userName, bool enabled);

PARAMETERS
Parameter Description

groupName A string that contains the name of a group.

userName A string that contains the user name of the user to enable.

enabled A Boolean value: True enables the user; False disables the user.

OUTPUT
WFGroupMember object.

EXAMPLE
IWFAdminService svc = GetAdminService();
string groupName = "Administrative";
string userName = @"Demo3\Administrator";
bool enabled = false;
try
{
svc.EnabledGroupMember(groupName, userName, enabled);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


150 AgilePoint Web Services API Guide

GET ACCESS RIGHT NAMES

DESCRIPTION
Retrieves the names of all the access rights in the AgilePoint system.

SYNTAX
string[] GetAccessRightNames();

PARAMETERS
None.

OUTPUT
An array of strings that contain the names of all the access rights for the system.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
string[] permissionNames = svc. GetAccessRightNames();
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


151 AgilePoint Web Services API Guide

GET ACCESS RIGHTS

DESCRIPTION
Retrieves the access rights for a specified user.

SYNTAX
int[] GetAccessRights(String userName)

PARAMETERS
Parameter Description

userName A string that contains the user name of the user.

OUTPUT
An array of integers that represent the access rights of the user.

EXAMPLE
IWFAdminService svc = GetAdminService();
string userName = ...// for example, “vit-34\\ap_svc"
try
{
string[] accessNames = svc.GetAccessRightNames();
int[] userRights = svc.GetAccessRights(userName);

Console.WriteLine("The user has the following rights:");


foreach (int rightCode in userRights)
{
Console.WriteLine(accessNames[rightCode]);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

/*
This example produces the following results:

The user has the following rights:


Register and modify the user information
Unregister a user
Add and modify the role information
Remove a role
Add and modify the group information
Remove a group
Modify/View the system configuration
Add a process definition
Checkin and checkout a process definition
Delete and disable a process definition
...
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


152 AgilePoint Web Services API Guide

GET GROUP

DESCRIPTION
Retrieves a group object with the specified group name.

SYNTAX
WFGroup GetGroup (String groupName);

PARAMETERS
Parameter Description

groupName A string that contains the name of the group.

OUTPUT
WFGroup object. If the specified group does not exist, the output is null.

EXAMPLE
IWFAdminService svc = GetAdminService();
string groupName = ...// for example, "Administrators";
try
{
WFGroup grpInfo = svc.GetGroup(groupName);
Console.WriteLine("Group Name:{0}; Group Lead:{1}", grpInfo.Name, grpInfo.ResponsibleUser);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

/*
This example produces the following results:

Group Name:Administrators; Group Lead:\Administrator


*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


153 AgilePoint Web Services API Guide

GET GROUP MEMBERS

DESCRIPTION
Retrieves the members of a specified group.

SYNTAX
WFGroupMember[] GetGroupMembers(String groupName);

PARAMETERS
Parameter Description

groupName A string that contains the name of the group.

OUTPUT
An array of WFGroupMember objects.

EXAMPLE
IWFAdminService svc = GetAdminService();
string groupName = ...// for example, "Administrators";
try
{
WFGroupMember[] grpMembers = adminService.GetGroupMembers(groupName);
Console.WriteLine("AgilePoint Group {0} has {1} members:", groupName, grpMembers.Length);
foreach (WFGroupMember grpMember in grpMembers)
{
Console.WriteLine("Member Name:{0}", grpMember.Member);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

/*
This example produces the following results:

AgilePoint Group Administrators has 3 members:


Member Name:\Administrator
Member Name:VITBDC\yuvarajn
Member Name:vit-34\manager
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


154 AgilePoint Web Services API Guide

GET GROUPS

DESCRIPTION
Retrieves all the group objects in the system.

SYNTAX
WFGroup[] GetGroups();

PARAMETERS
None.

OUTPUT
An Array of WFGroup objects.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
WFGroup[] apGroups = svc.GetGroups();
Console.WriteLine("AgilePoint Group {0} has {1} members:", groupName, grpMembers.Length);
Console.WriteLine("AgilePoint Groups:");
foreach(WFGroup grp in apGroups)
{
System.Console.WriteLine("Name:{0};Group Lead:{1} ", grp.Name, grp.ResponsibleUser);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
/*
This example produces the following results:

AgilePoint Groups:
Name:Administrators;Group Lead:\Administrator
Name:Domain Users;Group Lead:VITBDC\amarnv
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


155 AgilePoint Web Services API Guide

GET ROLE

DESCRIPTION
Retrieves a role object by name.

SYNTAX
WFRole GetRole(String roleName);

PARAMETERS
Parameter Description

roleName A string that contains the name of the role.

OUTPUT
WFRole object with the specified role name.

EXAMPLE
IWFAdminService svc = GetAdminService();
string rolName = ...// for example, “Administrators”
try
{
WFRole role = adminService.GetRole(rolName);
Console.WriteLine("Name = '" + role.Name + "' Description = '" + role.Description + "'");
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

This example produces the following results:


Name = 'Administrators' Description = 'Administrators have complete
access to maintain system'

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


156 AgilePoint Web Services API Guide

GET ROLES

DESCRIPTION
Retrieves a list of all roles in the system.

SYNTAX
WFRole[] GetRoles();

PARAMETERS
None.

OUTPUT
An array of WFRole objects that includes all roles.

EXAMPLE
IWFAdminService svc = GetAdminService();

try
{
WFRole[] roles = adminService.GetRoles();
foreach (WFRole role in roles)
{
Console.WriteLine("Name = '{0}‟, Description = '{1}‟",role.Name, role.Description);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

This example produces the following results:


Name = 'Administrators' Description = 'Administrators have complete access to maintain system'

Name = 'Process Runtime Managers' Description = 'Process Runtime Managers have complete access to
manage runtime processes'

Name = 'process definition Designers' Description = 'process definition Designers have complete
access to add, modify and remove process templates'

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


157 AgilePoint Web Services API Guide

QUERY ROLE MEMBERS

DESCRIPTION
Retrieves the members assigned to a role that match a specified SQL statement.

SYNTAX
WFRoleMember[] QueryRoleMembers(string roleName, string sql);

PARAMETERS
Parameter Description

roleName A string that contains the name of the role.

sql A string that contains the where clause of the SQL statement you want to query.

OUTPUT
Returns array of WFRoleMember members of the role that match the specified SQL statement.

EXAMPLE
IWFAdminService svc = GetAdminService();
string roleName = ...// for examples, “Users”
string where = ...// for example, “ASSIGNEE_TYPE=‟User‟”
try
{
WFRoleMember[] roleMembers = svc.QueryRoleMembers(roleName, where);
foreach (WFRoleMember member in roleMembers)
{
Console.WriteLine("Assignee = '{0}‟, Created Date = '{1}‟",
member.Assignee,
member.CreatedDate.ToShortDateString()
);
}

}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
/*
This example produces the following results:
Assignee = 'DEMO\CONTROLLER' & Created Date = '9/18/2009'
Assignee = 'DEMO\CFO' & Created Date = '9/18/2009'
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


158 AgilePoint Web Services API Guide

REMOVE GROUP

DESCRIPTION
Removes a group from the AgilePoint system.

SYNTAX
void RemoveGroup(string groupName);

PARAMETERS
Parameter Description
A string that contains the name of the group to be removed.
groupName

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
string roleName = ...// for examples, “Users”
try
{
svc.RemoveGroup(roleName);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


159 AgilePoint Web Services API Guide

REMOVE GROUP MEMBER

DESCRIPTION
Removes a member from a group.

SYNTAX
void RemoveGroupMember(string groupName, string userName);

PARAMETERS
Parameter Description

groupName A string that contains the name of the group.

userName A string that contains the name of the user to be removed from the group.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
string roleName = ...// for examples, “Engineers”
string userName = ...// for example, @“VIT\ct-002”
try
{
svc.RemoveGroupMember(roleName, userName);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


160 AgilePoint Web Services API Guide

REMOVE ROLE

DESCRIPTION
Removes a role from the AgilePoint system.

SYNTAX
void RemoveRole(string roleName);

PARAMETERS
Parameter Description

roleName A string that contains the name of the role to be removed.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
string roleName = ...// for example, “Engineers”
try
{
svc.RemoveRole (roleName);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


161 AgilePoint Web Services API Guide

REMOVE ROLE MEMBER

DESCRIPTION
Removes a user or a group from a specified role.

SYNTAX
void RemoveRoleMember(string roleName, string assignee, string assigneeType, string objectID);

PARAMETERS
Parameter Description

roleName A string that contains the name of the role.

assignee The registered user name or group name to be removed.

assigneeType Type of assignee – either user or group.

objectID Reserved for future use.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
string roleName = ...// for example, “Engineers”
string userName = ...// for example, @“VIT\ct-002”
try
{
svc.RemoveRoleMember(roleName, userName, “User”, null);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


162 AgilePoint Web Services API Guide

UPDATE GROUP

DESCRIPTION
Updates information for a group.

SYNTAX
WFGroup UpdateGroup(String groupName, String description, String responsibleUser, bool enabled);

PARAMETERS
Parameter Description

groupName A string that contains the name of the group.

description A string that contains the description for the group.

responsibleUser A string that contains the name of the responsible user for the group.

enabled Flag used to determine if the group is enabled.

OUTPUT
An updated WFGroup.

EXAMPLE
IWFAdminService svc = GetAdminService();
String groupName = ...// for example, “TestGroup1”
String description = ... // for example, “This is new description of the user group”
String groupLeadUserName = ...// for example, “DEMO3\\Administrator”
try
{
WFGroup updatedGroup = Svc.UpdateGroup(groupName, description, groupLeadUserName, true);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


163 AgilePoint Web Services API Guide

UPDATE ROLE

DESCRIPTION
Updates information for a role.

SYNTAX
WFRole UpdateRole(String roleName, String description, int[] rights, bool enabled);

PARAMETERS
Parameter Description

roleName A string that contains the name of the role.

description A string that contains the description for the role.


Array of index values that specifies the rights that are assigned to the Role. See the
rights following table for appropriate indexes. WFAccessRights provides the enums offor
rights. See the sample code for more information.
enabled A Boolean value: True enables the user; False disables the user.

OUTPUT
An updated WFRole object.

EXAMPLE
IWFAdminService svc = GetAdminService();
String roleName = ...// for example, “TestRole”
String description = ...// for example, “This is new description for TestRole”
List<int> list = new List<int>();
list.Add(WFAccessRights.AddModifyGroup);
list.Add(WFAccessRights.AddModifyRole);
list.Add(WFAccessRights.AddModifyUser);
list.Add(WFAccessRights.AddProcessTemplate);
list.Add(WFAccessRights.AddRemoveModifyDelegation);
int[] rights = list.ToArray();

try
{
WFRole updatedRole = svc.UpdateRole(roleName, description rights, true);
}
catch( Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


164 AgilePoint Web Services API Guide

USER DELEGATION
This section describes service calls related to user delegation processes.

ADD DELEGATION

DESCRIPTION
Creates a rule for delegating one user’s tasks to another user. This method uses the WFDelegation class.
For more information, see the AgilePoint Class Reference.

SYNTAX
WFDelegation AddDelegation(WFDelegation delegation);

PARAMETERS
Parameter Description

An object that specifies the details of the delegation rule, including the user whose tasks
delegation will be delegated and the designated user to whom to delegate the tasks. For more
information, see WFDelegation the AgilePoint Class Reference.

OUTPUT
WFDelegation object.

EXAMPLE
IWFAdminService svc = GetAdminService();
WFDelegation delegation = new WFDelegation();

//Set the object properties.


delegation.FromUser = "Demo3\\Andy";
delegation.ToUser = "Demo3\\Joe";
delegation.StartDate = DateTime.Now;
delegation.EndDate = DateTime.Parse("27/10/2009");
delegation.Description = "Delegating Andy's task to Joe";

try
{
WFDelegation delegation = adminService.AddDelegation(delegation);
Console.WriteLine(“Delegation ID: {0}”, delegation.DelegationID);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


165 AgilePoint Web Services API Guide

ACTIVATE DELEGATION

DESCRIPTION
Activates a delegation.

SYNTAX
void ActivateDelegation(string delegationID)

PARAMETERS
Parameter Description

delegationID A string that represents the unique ID of a delegation object.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
String delegationID = ...;
try
{
svc.ActivateDelegation(delegationID);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


166 AgilePoint Web Services API Guide

CANCEL DELEGATION

DESCRIPTION
Cancels a currently operating delegation.

SYNTAX
void CancelDelegation(string delegationID)

PARAMETERS
Parameter Description

delegationID A string that represents the unique ID of a delegation object.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
String delegationID = ...;
try
{
svc.CancelDelegation(delegationID);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


167 AgilePoint Web Services API Guide

GET DELEGATION

DESCRIPTION
Retrieves a delegation object.

SYNTAX
WFDelegation GetDelegation(String delegationID);

PARAMETERS
Parameter Description

delegationID A string that represents the unique ID of a delegation object.

OUTPUT
WFDelegation object that specifies the user whose tasks will be delegated and the designated user to whom
to delegate tasks.

EXAMPLE
IWFAdminService svc = GetAdminService();
String delegationID = ...; // for example, "C9A40F4BDA26481FB822C398C4387901"
try
{
WFDelegation delegation = svc.GetDelegation(delegationID);
Console.WriteLine("Delegation Id:{0}; From User:{1}; To User:{2}; Status:{3}",
delegation.DelegationID,
delegation.FromUser,
delegation.ToUser,
delegation.Status);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}
/* Output
Delegation Id:C9A40F4BDA26481FB822C398C4387901; From User:VITBDC\yuvarajn; To User:VITBDC\ravis;
Status:Cancelled
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


168 AgilePoint Web Services API Guide

GET DELEGATIONS

DESCRIPTION
Retrieves a list of delegation objects that match the specified parameters. You can leave the parameters null
to indicate any.

SYNTAX
WFDelegation[] GetDelegations (String fromUser, String toUser, String status);

PARAMETERS
Parameter Description

fromUser A string value that represents the user whose tasks will be delegated.

toUser The designated user who will receive the delegated tasks.

Status The status of the delegation object.

OUTPUT
An array of WFDelegation objects.

EXAMPLE
IWFAdminService svc = GetAdminService();
String fromUser = ...// for example, @"vitbdc\yuvarajn"
String toUser = ...// for example, null for any
String status = WFDelegation.ACTIVE;
try
{
WFDelegation[] delegations = svc.GetDelegations( fromUser, toUser, status);
foreach(WFDelegation delegation in delegations)
{
Console.WriteLine("Delegation Id:{0}; From User:{1}; To User:{2}; Status:{3}, {4}=>{5}",
delegation.DelegationID,
delegation.FromUser,
delegation.ToUser,
delegation.Status,
delegation.StartDate,
delegation.EndDate);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


169 AgilePoint Web Services API Guide

REMOVE DELEGATION

DESCRIPTION
Removes a delegation from the AgilePoint system.

SYNTAX
void RemoveDelegation(string delegationID);

PARAMETERS
Parameter Description

delegationID A string that contains the unique ID of a delegation object.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
String delegationID = ...;
try
{
svc.RemoveDelegation(delegationID);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


170 AgilePoint Web Services API Guide

UPDATE DELEGATION

DESCRIPTION
Updates a delegation object that has already been created.

SYNTAX
WFDelegation UpdateDelegation(WFDelegation delegation);

PARAMETERS
Parameter Description

delegation A WFDelegation object that represents the delegation object to be updated.

OUTPUT
Returns an updated instance of WFDelegation.

EXAMPLE
IWFAdminService svc = GetAdminService();
WFDelegation delegation = new WFDelegation();
delegation.DelegationID = ...// unique ID
delegation.FromUser = ...// from user name
delegation.ToUser = ...// to user name
delegation.StartDate = ... // start date
delegation.EndDate = ...// end date

try
{
WFDelegation updatedDelegation = svc.UpdateDelegation( delegation );

}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


171 AgilePoint Web Services API Guide

REPORT CONFIGURATION METHODS


This section describes service calls related to reports.

ADD REPORT CONFIGURATION

DESCRIPTION
Adds a report configuration to the system.

SYNTAX
WFReportConfigure AddReportConfigure(string reportName, string configure)

PARAMETERS
Parameter Description

reportName A string that contains the name of the report.

configure The report configuration in XML format.

OUTPUT
WFReportConfigure object.

EXAMPLE
IWFAdminService svc = GetAdminService();
String reportName = ...// for example, “weekly task report”
String configure = ...// xml-serialization of WFReportConfiguration
try
{
WFReportConfigure reportConfig = svc.AddReportConfigure(reportName, configure);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


172 AgilePoint Web Services API Guide

GET ALL REPORT CONFIGURATIONS

DESCRIPTION
Retrieves all report configurations from the system.

SYNTAX
WFReportConfigure[] GetAllReportConfigure()

PARAMETERS
None.

OUTPUT
WFReportConfigure object.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
WFReportConfigure[] reportConfigs = svc.GetAllReportConfigure();
Console.WriteLine("This AgilePoint Server has {0} reports configured:", reportConfigs.Length);
foreach (WFReportConfigure config in reportConfigs)
{
Console.WriteLine("Report Name: {0}", config.ReportName);
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

/*
This example produces the following results:

This AgilePoint Server has 1 reports configured:


Report Name:Average Process Time By Automatic Activities
*/

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


173 AgilePoint Web Services API Guide

GET REPORT CONFIGURATION

DESCRIPTION
Retrieves a report configuration from the system.

SYNTAX
WFReportConfigure GetReportConfigure(string reportName)

PARAMETERS
Parameter Description

reportName A string that contains the name of the report.

OUTPUT
WFReportConfigure object.

EXAMPLE
IWFAdminService svc = GetAdminService();
String reportName = ...;
try
{
WFReportConfigure cfg = svc.GetReportConfigure(reportName);
Console.WriteLine("Report Name: {0}, config:{1}", cfg.ReportName, cfg.Configure);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


174 AgilePoint Web Services API Guide

REMOVE REPORT CONFIGURE

DESCRIPTION
Removes a report configuration from the system.

SYNTAX
void RemoveReportConfigure(string reportName);

PARAMETERS
Parameter Description

reportName A string that contains the name of the report.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
String reportName = ...;
try
{
svc.RemoveReportConfigure(reportName);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


175 AgilePoint Web Services API Guide

UPDATE REPORT CONFIGURATION

DESCRIPTION
Updates a report configuration in the AgilePoint system.

SYNTAX
WFReportConfigure UpdateReportConfigure(string reportName, string configure);

PARAMETERS
Parameter Description

reportName A string that contains the name of the report.

configure The report configuration in XML format.

OUTPUT
WFReportConfigure object.

EXAMPLE
IWFAdminService svc = GetAdminService();
String reportName = ...// for example, “weekly task report”
String configure = ...// xml-serialization of WFReportConfiguration
try
{
WFReportConfigure reportConfig = svc.UpdateReportConfigure(reportName, configure);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


176 AgilePoint Web Services API Guide

ORGANIZATION PROPERTIES
This section describes service calls related to various organization properties.

GET ORGANIZATION PROPERTIES

DESCRIPTION
Retrieves organization properties such as Title, Department and Location.

SYNTAX
KeyValue[] GetOrganizationProperties(string name)

PARAMETERS
Parameter Description

Name A string that contains the name of the organization property you want to retrieve.

OUTPUT
An array of KeyValue objects.

EXAMPLE
IWFAdminService svc = GetAdminService();
String name = ...// for example, “Departments”
try
{
KeyValue[] organizationProperties = svc.GetOrganizationProperties(name);
foreach (KeyValue property in organizationProperties)
{
Console.WriteLine("Property Name = 'Department' Property Value = '" + property.Value + "'");
}
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


177 AgilePoint Web Services API Guide

REMOVE ORGANIZATION PROPERTIES

DESCRIPTION
Removes an organization property from AgilePoint.

SYNTAX
void RemoveOrganizationProperties(string name);

PARAMETERS
Parameter Description

name A string that contains the name of the organization property to be removed.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
String name = ...// for example, “Departments”
try
{
svc. RemoveOrganizationProperties (name);
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


178 AgilePoint Web Services API Guide

UPDATE ORGANIZATION PROPERTIES

DESCRIPTION
Updates organization properties in the AgilePoint the system.

SYNTAX
void UpdateOrganizationProperties(string name, KeyValue[] list);

PARAMETERS
Parameter Description

name A string that contains the name of the organization property you want to update.

list A list of key-value pairs you want to add to the list of properties.

OUTPUT
None.

EXAMPLE
IWFAdminService svc = GetAdminService();
String name = ...// for example, “Titles”
List<KeyValue> list = new List<KeyValue>();
list.Add( new KeyValue( “MANAGER”, “Manager” ) );
list.Add( new KeyValue( “REG_SALES_DIRECTOR”, “Regional Sales Director” ) );
list.Add( new KeyValue( “GENERAL_MANAGER”, “General Manager” ) );
KeyValue[] properties = list.ToArray();
try
{
adm.UpdateOrganizationProperties(“Titles”, properties );
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


179 AgilePoint Web Services API Guide

COMPONENT ADMINISTRATION METHODS


This section describes service calls related to server component administration.

GET SERVER COMPONENT

DESCRIPTION
Retrieves a server component name.

SYNTAX
WFComponent GetServerComponent(string name)

PARAMETERS
Parameter Description

name A string that contains the name of the server component.

OUTPUT
WFComponent object.

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010


180 AgilePoint Web Services API Guide

GET SERVER COMPONENT NAMES

DESCRIPTION
Retrieves the server component names using the Admin Services.

SYNTAX
String[] GetServerComponentNames()

PARAMETERS
None.

OUTPUT
An array of strings that contain the server component names.

EXAMPLE
IWFAdminService svc = GetAdminService();
try
{
String[] names = svc.GetServerComponentNames();
}
catch (Exception ex)
{
Console.WriteLine(“Failed! “ + ShUtil.GetSoapMessage(ex));
}

VERSIONS SUPPORTED
3.2.0.4 and higher

AgilePoint, Inc. Confidential © 2010 AgilePoint, Inc. 1/16/2010

You might also like