Table of contents
API
TOC
Collapse the table of content
Expand the table of content

WorkflowActivities class

Nadin Merali|Last Updated: 5/6/2017

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.NETJSOMRESTReturn TypeDescription
CheckInWithJobId(Guid projId, Guid jobId, Boolean force)voidQueue a check-in job for the project if its checked-out.
CreateProjectFromListItem(Guid webId, Guid listId, Integer itemId, Guid eptId)GuidCreates a project from a SharePoint list item, where the project uses the specified enterprise project type (EPT).
EnterProjectStage(Guid projectId, Guid stageId)voidAttempts to enter the specified workflow stage for the project.
LeaveProjectStage(Guid projectId)voidSets the project complete and leaves the current workflow stage.
PublishSummaryWithJobId(Guid projId, Guid jobId)voidQueue a publish summary job for a project.
PublishWithJobId(Guid projectId, Guid jobId)voidQueue a publish job.
ReadBooleanProperty(Guid projectId, String propertyId)BooleanReads the value of the specified project property by using the SharePoint SPFieldType.Boolean type.
ReadCurrencyProperty(Guid projectId, String propertyId)DoubleReads the value of of the specified project property by using the SharePoint SPFieldType.Currency type.
ReadDateTimeProperty(Guid projectId, String propertyId)DateTimeReads the value of of the specified project property by using the SharePoint SPFieldType.DateTime type.
ReadGuidProperty(Guid projectId, String propertyId)GuidReads the value of of the specified project property by using the SharePoint SPFieldType.Guid type.
ReadIntegerProperty(Guid projectId, String propertyId)IntegerReads the value of of the specified project property by using the SharePoint SPFieldType.Integer type.
ReadNumberProperty(Guid projectId, String propertyId)DoubleReads the value of of the specified project property by using the SharePoint SPFieldType.Number type.
ReadProjectProperty(Guid projectId, String propertyId)StringReads the String value of of the specified project property.
ReadTextProperty(Guid projectId, String propertyId)StringReads the value of of the specified project property by using the SharePoint SPFieldType.Text type.
ReadyToLeaveProjectStage(Guid projectId)ReadyToLeaveProjectStageValueChecks whether the current workflow stage requirements are satisfied.
UpdateBooleanProperty(Guid projectId, String propertyId, Boolean value)voidUpdates the value of the specified project property by using the SharePoint SPFieldType.Boolean type.
UpdateCurrencyProperty(Guid projectId, String propertyId, Double value)voidUpdates the value of of the specified project property by using the SharePoint SPFieldType.Currency type.
UpdateDateTimeProperty(Guid projectId, String propertyId, DateTime value)voidUpdates the value of of the specified project property by using the SharePoint SPFieldType.DateTime type.
UpdateGuidProperty(Guid projectId, String propertyId, Guid value)voidUpdates the value of of the specified project property by using the SharePoint SPFieldType.Guid type.
UpdateIdeaListItemStatus(Guid projectId, String status)voidUpdates the Status column in the SharePoint project idea list with a status string.
UpdateIntegerProperty(Guid projectId, String propertyId, Integer value)voidUpdates the value of of the specified project property by using the SharePoint SPFieldType.Integer type.
UpdateNumberProperty(Guid projectId, String propertyId, Double value)voidUpdates 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)voidUpdates the status value and the status information for a Project Server workflow stage.
UpdateTextProperty(Guid projectId, String propertyId, String value)voidUpdates 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
NameTypeDescription
projIdGuidId of the project.
jobIdGuidId to create job with.
forceBooleanForce 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
NameTypeDescription
webIdGuidthat contains the list.
listIdGuidthat contains the project item.
itemIdIntegerwithin the list.
eptIdGuidThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
stageIdGuidThe 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
NameTypeDescription
projectIdGuidThe 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
NameTypeDescription
projIdGuidThe GUID of the project.
jobIdGuidId to create job with.
Return Value

void

PublishWithJobId(Guid projectId, Guid jobId)

Queue a publish job.

Syntax
void PublishWithJobId(Guid projectId, Guid jobId)
Parameters
NameTypeDescription
projectIdGuidThe GUID of the project.
jobIdGuidId 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe 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
NameTypeDescription
projectIdGuidThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe GUID of the property to read.
valueBooleanThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe GUID of the property to read.
valueDoubleThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe GUID of the property to read.
valueDateTimeThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe GUID of the property to read.
valueGuidThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
statusStringThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe GUID of the property to read.
valueIntegerThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe GUID of the property to read.
valueDoubleThe 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
NameTypeDescription
projectIdGuidThe GUID of the project.
stageIdGuidThe GUID of the workflow stage.
statusInformationStringThe status information value to update.
stageStatusValueUpdateProjectStageStatusFieldValueenumeration.
appendBooleanTrue 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
NameTypeDescription
projectIdGuidThe GUID of the project.
propertyIdStringThe GUID of the property to read.
valueStringThe Text value to update.
Return Value

void

See Also

ProjectContext

© 2018 Microsoft