Share via


WorkflowActivities class

inherits members from ClientObject

Contains methods that encapsulate Project Server workflow activities and methods, for use with version 4 of Windows Workflow Foundation (WF4).

Syntax

CSOM

class WorkflowActivities 

JSOM

PS.WorkflowActivities

REST Interface

Supported.

PS.WorkflowActivities

http://contoso.sharepoint.com/sites/pwa/_api/ProjectServer/ProjectServer/WorkflowActivities

Members

✓ - Read Support       ✓ʷ - Write Support

Methods

Name .NET JSOM REST Return Type Description
CheckInWithJobId(Guid projId, Guid jobId, Boolean force) void Queue a check-in job for the project if its checked-out.
CreateProjectFromListItem(Guid webId, Guid listId, Integer itemId, Guid eptId) Guid Creates a project from a SharePoint list item, where the project uses the specified enterprise project type (EPT).
EnterProjectStage(Guid projectId, Guid stageId) void Attempts to enter the specified workflow stage for the project.
LeaveProjectStage(Guid projectId) void Sets the project complete and leaves the current workflow stage.
PublishSummaryWithJobId(Guid projId, Guid jobId) void Queue a publish summary job for a project.
PublishWithJobId(Guid projectId, Guid jobId) void Queue a publish job.
ReadBooleanProperty(Guid projectId, String propertyId) Boolean Reads the value of the specified project property by using the SharePoint SPFieldType.Boolean type.
ReadCurrencyProperty(Guid projectId, String propertyId) Double Reads the value of of the specified project property by using the SharePoint SPFieldType.Currency type.
ReadDateTimeProperty(Guid projectId, String propertyId) DateTime Reads the value of of the specified project property by using the SharePoint SPFieldType.DateTime type.
ReadGuidProperty(Guid projectId, String propertyId) Guid Reads the value of of the specified project property by using the SharePoint SPFieldType.Guid type.
ReadIntegerProperty(Guid projectId, String propertyId) Integer Reads the value of of the specified project property by using the SharePoint SPFieldType.Integer type.
ReadNumberProperty(Guid projectId, String propertyId) Double Reads the value of of the specified project property by using the SharePoint SPFieldType.Number type.
ReadProjectProperty(Guid projectId, String propertyId) String Reads the String value of of the specified project property.
ReadTextProperty(Guid projectId, String propertyId) String Reads the value of of the specified project property by using the SharePoint SPFieldType.Text type.
ReadyToLeaveProjectStage(Guid projectId) ReadyToLeaveProjectStageValue Checks whether the current workflow stage requirements are satisfied.
UpdateBooleanProperty(Guid projectId, String propertyId, Boolean value) void Updates the value of the specified project property by using the SharePoint SPFieldType.Boolean type.
UpdateCurrencyProperty(Guid projectId, String propertyId, Double value) void Updates the value of of the specified project property by using the SharePoint SPFieldType.Currency type.
UpdateDateTimeProperty(Guid projectId, String propertyId, DateTime value) void Updates the value of of the specified project property by using the SharePoint SPFieldType.DateTime type.
UpdateGuidProperty(Guid projectId, String propertyId, Guid value) void Updates the value of of the specified project property by using the SharePoint SPFieldType.Guid type.
UpdateIdeaListItemStatus(Guid projectId, String status) void Updates the Status column in the SharePoint project idea list with a status string.
UpdateIntegerProperty(Guid projectId, String propertyId, Integer value) void Updates the value of of the specified project property by using the SharePoint SPFieldType.Integer type.
UpdateNumberProperty(Guid projectId, String propertyId, Double value) void Updates the value of of the specified project property by using the SharePoint SPFieldType.Number type.
UpdateProjectStageStatus(Guid projectId, Guid stageId, String statusInformation, UpdateProjectStageStatusFieldValue stageStatusValue, Boolean append) void Updates the status value and the status information for a Project Server workflow stage.
UpdateTextProperty(Guid projectId, String propertyId, String value) void Updates the value of of the specified project property by using the SharePoint SPFieldType.Text type.

#### Method Details

CheckInWithJobId(Guid projId, Guid jobId, Boolean force)

Queue a check-in job for the project if its checked-out.

Syntax
void CheckInWithJobId(Guid projId, Guid jobId, Boolean force)
Parameters
Name Type Description
projId Guid Id of the project.
jobId Guid Id to create job with.
force Boolean Force check in the project.
Return Value

void

CreateProjectFromListItem(Guid webId, Guid listId, Integer itemId, Guid eptId)

Creates a project from a SharePoint list item, where the project uses the specified enterprise project type (EPT).

Syntax
Guid CreateProjectFromListItem(Guid webId, Guid listId, Integer itemId, Guid eptId)
Parameters
Name Type Description
webId Guid that contains the list.
listId Guid that contains the project item.
itemId Integer within the list.
eptId Guid The GUID of the EPT.
Return Value

Guid

EnterProjectStage(Guid projectId, Guid stageId)

Attempts to enter the specified workflow stage for the project.

Syntax
void EnterProjectStage(Guid projectId, Guid stageId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
stageId Guid The GUID of the workflow stage.
Return Value

void

LeaveProjectStage(Guid projectId)

Sets the project complete and leaves the current workflow stage.

Syntax
void LeaveProjectStage(Guid projectId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
Return Value

void

PublishSummaryWithJobId(Guid projId, Guid jobId)

Queue a publish summary job for a project.

Syntax
void PublishSummaryWithJobId(Guid projId, Guid jobId)
Parameters
Name Type Description
projId Guid The GUID of the project.
jobId Guid Id to create job with.
Return Value

void

PublishWithJobId(Guid projectId, Guid jobId)

Queue a publish job.

Syntax
void PublishWithJobId(Guid projectId, Guid jobId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
jobId Guid Id to create job with.
Return Value

void

ReadBooleanProperty(Guid projectId, String propertyId)

Reads the value of the specified project property by using the SharePoint SPFieldType.Boolean type.

Syntax
Boolean ReadBooleanProperty(Guid projectId, String propertyId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
Return Value

Boolean

ReadCurrencyProperty(Guid projectId, String propertyId)

Reads the value of of the specified project property by using the SharePoint SPFieldType.Currency type.

Syntax
Double ReadCurrencyProperty(Guid projectId, String propertyId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
Return Value

Double

ReadDateTimeProperty(Guid projectId, String propertyId)

Reads the value of of the specified project property by using the SharePoint SPFieldType.DateTime type.

Syntax
DateTime ReadDateTimeProperty(Guid projectId, String propertyId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
Return Value

DateTime

ReadGuidProperty(Guid projectId, String propertyId)

Reads the value of of the specified project property by using the SharePoint SPFieldType.Guid type.

Syntax
Guid ReadGuidProperty(Guid projectId, String propertyId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
Return Value

Guid

ReadIntegerProperty(Guid projectId, String propertyId)

Reads the value of of the specified project property by using the SharePoint SPFieldType.Integer type.

Syntax
Integer ReadIntegerProperty(Guid projectId, String propertyId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
Return Value

Integer

ReadNumberProperty(Guid projectId, String propertyId)

Reads the value of of the specified project property by using the SharePoint SPFieldType.Number type.

Syntax
Double ReadNumberProperty(Guid projectId, String propertyId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
Return Value

Double

ReadProjectProperty(Guid projectId, String propertyId)

Reads the String value of of the specified project property.

Syntax
String ReadProjectProperty(Guid projectId, String propertyId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
Return Value

String

ReadTextProperty(Guid projectId, String propertyId)

Reads the value of of the specified project property by using the SharePoint SPFieldType.Text type.

Syntax
String ReadTextProperty(Guid projectId, String propertyId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
Return Value

String

ReadyToLeaveProjectStage(Guid projectId)

Checks whether the current workflow stage requirements are satisfied.

Syntax
ReadyToLeaveProjectStageValue ReadyToLeaveProjectStage(Guid projectId)
Parameters
Name Type Description
projectId Guid The GUID of the project.
Return Value

ReadyToLeaveProjectStageValue

UpdateBooleanProperty(Guid projectId, String propertyId, Boolean value)

Updates the value of the specified project property by using the SharePoint SPFieldType.Boolean type.

Syntax
void UpdateBooleanProperty(Guid projectId, String propertyId, Boolean value)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
value Boolean The Boolean value to update.
Return Value

void

UpdateCurrencyProperty(Guid projectId, String propertyId, Double value)

Updates the value of of the specified project property by using the SharePoint SPFieldType.Currency type.

Syntax
void UpdateCurrencyProperty(Guid projectId, String propertyId, Double value)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
value Double The Currency value to update.
Return Value

void

UpdateDateTimeProperty(Guid projectId, String propertyId, DateTime value)

Updates the value of of the specified project property by using the SharePoint SPFieldType.DateTime type.

Syntax
void UpdateDateTimeProperty(Guid projectId, String propertyId, DateTime value)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
value DateTime The DateTime value to update.
Return Value

void

UpdateGuidProperty(Guid projectId, String propertyId, Guid value)

Updates the value of of the specified project property by using the SharePoint SPFieldType.Guid type.

Syntax
void UpdateGuidProperty(Guid projectId, String propertyId, Guid value)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
value Guid The Guid value to update.
Return Value

void

UpdateIdeaListItemStatus(Guid projectId, String status)

Updates the Status column in the SharePoint project idea list with a status string.

Syntax
void UpdateIdeaListItemStatus(Guid projectId, String status)
Parameters
Name Type Description
projectId Guid The GUID of the project.
status String The status message to write to the idea status column.
Return Value

void

UpdateIntegerProperty(Guid projectId, String propertyId, Integer value)

Updates the value of of the specified project property by using the SharePoint SPFieldType.Integer type.

Syntax
void UpdateIntegerProperty(Guid projectId, String propertyId, Integer value)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
value Integer The Integer value to update.
Return Value

void

UpdateNumberProperty(Guid projectId, String propertyId, Double value)

Updates the value of of the specified project property by using the SharePoint SPFieldType.Number type.

Syntax
void UpdateNumberProperty(Guid projectId, String propertyId, Double value)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
value Double The Number value to update.
Return Value

void

UpdateProjectStageStatus(Guid projectId, Guid stageId, String statusInformation, UpdateProjectStageStatusFieldValue stageStatusValue, Boolean append)

Updates the status value and the status information for a Project Server workflow stage.

Syntax
void UpdateProjectStageStatus(Guid projectId, Guid stageId, String statusInformation, UpdateProjectStageStatusFieldValue stageStatusValue, Boolean append)
Parameters
Name Type Description
projectId Guid The GUID of the project.
stageId Guid The GUID of the workflow stage.
statusInformation String The status information value to update.
stageStatusValue UpdateProjectStageStatusFieldValue enumeration.
append Boolean True if the information text is appended;false if the information text is replaced.
Return Value

void

UpdateTextProperty(Guid projectId, String propertyId, String value)

Updates the value of of the specified project property by using the SharePoint SPFieldType.Text type.

Syntax
void UpdateTextProperty(Guid projectId, String propertyId, String value)
Parameters
Name Type Description
projectId Guid The GUID of the project.
propertyId String The GUID of the property to read.
value String The Text value to update.
Return Value

void

See Also

ProjectContext