PwsSaveProjectTask

Overview


This web service inserts or updates a single project task based on a detailed project task structure (PwsProjectTaskDetail). The service returns the identity (PwsProjectTaskRef) of the project task that has been inserted or updated. 

Request Format


PwsSaveProjectTask Request
  • PwsSaveProjectTask
    • serviceRequest: PwsSaveProjectTaskRq
      • RequestId: Int32
      • SessionTicket: String
      • DescriptionClearFlag: Boolean
      • DriveEsdAndDurationFromPlannedDatesFlag: Boolean
      • EarliestStartDateClearFlag: Boolean
      • EngagementTimestamp: String **deprecated**
      • ParentTaskClearFlag: Boolean
      • PredecessorsClearFlag: Boolean
      • ProjectIdentity: PwsProjectRef
      • ProjectTask: PwsProjectTaskDetail
      • StealLockFlag: Boolean **deprecated**
      • SubscriptionsClearFlag: Boolean
      • LocksToSteal: PwsEntityLockSummary[1.100]
      • ProjectorLockSetId: Int32
      • RateTaskTimestamp: String
      • PreviousSiblingTaskClearFlag: Boolean

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

No


Click here for more information.


SessionTicket

String

Yes


Click here for more information.

AftyRXSTlnMPzozuKwq0kQ==

DescriptionClearFlag

Boolean

No

false

If updating an existing task and flag is set to 'true', existing description is cleared.

false

DriveEsdAndDurationFromPlannedDatesFlag

Boolean

No

false

If set to 'true', the duration is calculated by determining the number of minutes between the planned start date and planned end date, taking into account holidays and location working minutes per day.

false

EarliestStartDateClearFlag

Boolean

No

false

If updating an existing task and flag is set to 'true', existing earliest start date is cleared.

false

EngagementTimestamp

String

**deprecated**




ParentTaskClearFlag

Boolean

No

false

If updating an existing task and flag is set to 'true', existing parent task is cleared.


PredecessorsClearFlag

Boolean

No

false

If updating an existing task and flag is set to 'true', existing predecessors are cleared.


ProjectIdentity

PwsProjectRef

Yes


The identity of the project. Click here for more information.


ProjectTask

PwsProjectTaskDetail

Yes


The detail of the project task. Click here for more information.


StealLockFlag

Boolean

**deprecated**




SubscriptionsClearFlag

Boolean

No

false

If set to 'true', subscription is cleared.

false

LocksToStealPwsEntityLockSummary[1.100]No
The detailed information of the locks that are to be stolen. If not specified, the request will fail if any requested locks are already held. If specified, the information supplied must exactly match the current state of existing locks or the attempt to steal the existing locks will fail. Typically, this service is invoked with LocksToSteal empty or null. If there are existing locks, they will be returned in the LockHolders member of PwsFault. This data can then be sent, as is, back to the server in a second invocation of this service, as LocksToSteal, if the caller desires to steal the locks.
ProjectorLockSetIdInt32No
A projector lock set id is an identifier for a group of one or more locks held as a unit.
RateTaskTimestampStringNo
This is an optimistic locking timestamp that, if provided on update request, will cause the request to fail when the timestamp stored in the database does not match the provided value.
PreviousSiblingTaskClearFlagBooleanNofalseIf updating an existing task and flag is set to 'true', existing previous sibling task is cleared. This is the equivalent to making it the first task underneath the parent, or the first root level task if it has no parent.

Request Usage Example(s)


Example 01 - create a new task
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:sch="http://projectorpsa.com/DataContracts/Shared/Scheduling/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveProjectTask>
         <pws:serviceRequest>
            <req:SessionTicket>AftyRXSTlnMPzozuKwq0kQ==</req:SessionTicket>
            <sch:DescriptionClearFlag>false</sch:DescriptionClearFlag>
            <sch:DriveEsdAndDurationFromPlannedDatesFlag>false</sch:DriveEsdAndDurationFromPlannedDatesFlag>
            <sch:EarliestStartDateClearFlag>false</sch:EarliestStartDateClearFlag>
            <sch:ParentTaskClearFlag>false</sch:ParentTaskClearFlag>
            <sch:PredecessorsClearFlag>false</sch:PredecessorsClearFlag>
            <sch:ProjectIdentity>
               <com:ProjectCode>P001053-001</com:ProjectCode>
            </sch:ProjectIdentity>
            <sch:ProjectTask>
               <com:CompletedFlag>false</com:CompletedFlag>
               <com:Description>Task from WS-001 (3)</com:Description>
               <com:DurationMinutes>300</com:DurationMinutes>
               <com:EarliestStartDate>2018-01-31z</com:EarliestStartDate>
               <com:FullWbsCode>4</com:FullWbsCode>
               <com:OpenForTimeFlag>true</com:OpenForTimeFlag>
               <com:ParentTaskIdentity>
                  <com:ProjectTaskUid>1152921504608738152</com:ProjectTaskUid>
               </com:ParentTaskIdentity>
               <com:PlannedEndDateTime>2018-03-05z</com:PlannedEndDateTime>
               <com:PlannedStartDateTime>2018-03-01z</com:PlannedStartDateTime>
               <com:Predecessors>
                  <!--Zero or more repetitions:-->
                  <com:PwsProjectTaskPredecessor>
                     <com:LagMinutes>10000</com:LagMinutes>
                     <com:LinkType>SS</com:LinkType>
                     <com:PredecessorProjectTaskIdentity>
                        <com:ProjectTaskUid>1152921504608738153</com:ProjectTaskUid>
                     </com:PredecessorProjectTaskIdentity>
                  </com:PwsProjectTaskPredecessor>
               </com:Predecessors>
               <com:PreviousSiblingTaskIdentity>
                  <com:ProjectTaskUid>1152921504608738153</com:ProjectTaskUid>
               </com:PreviousSiblingTaskIdentity>               
               <com:ProjectTaskTypeIdentity>
                  <com:ProjectTaskTypeUid>1152921504608111232</com:ProjectTaskTypeUid>
               </com:ProjectTaskTypeIdentity>
               <com:TaskName>WS-003</com:TaskName>
               <com:InheritPurchaseOrderNumberFlag>false</com:InheritPurchaseOrderNumberFlag>
               <com:PurchaseOrderNumber>PO-003</com:PurchaseOrderNumber>
               <com:Subscriptions>
                  <!--Zero or more repetitions:-->
                  <com:PwsProjectTaskSubscription>
                     <com:UserIdentity>
                        <com:UserReferenceSystemId>019</com:UserReferenceSystemId>
                     </com:UserIdentity>
                  </com:PwsProjectTaskSubscription>
               </com:Subscriptions>
               <com:UserDefinedFields>
                  <!--Zero or more repetitions:-->
                  <com:PwsUserDefinedFieldDetail>
                     <com:UdfName>Phase 1 MS</com:UdfName>
                     <com:BooleanValue>false</com:BooleanValue>
                     <com:DataType>B</com:DataType>
                  </com:PwsUserDefinedFieldDetail>
               </com:UserDefinedFields>
            </sch:ProjectTask>
            <sch:StealLockFlag>true</sch:StealLockFlag>
            <sch:SubscriptionsClearFlag>true</sch:SubscriptionsClearFlag>
         </pws:serviceRequest>
      </pws:PwsSaveProjectTask>
   </soapenv:Body>
</soapenv:Envelope>
Example 02 - update an existing task
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pws="http://projectorpsa.com/PwsProjectorServices/" xmlns:req="http://projectorpsa.com/DataContracts/Requests/" xmlns:sch="http://projectorpsa.com/DataContracts/Shared/Scheduling/" xmlns:com="http://projectorpsa.com/DataContracts/Shared/Common/">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsSaveProjectTask>
         <pws:serviceRequest>
            <req:SessionTicket>AftyRXSTlnMPzozuKwq0kQ==</req:SessionTicket>
            <sch:DescriptionClearFlag>false</sch:DescriptionClearFlag>
            <sch:DriveEsdAndDurationFromPlannedDatesFlag>false</sch:DriveEsdAndDurationFromPlannedDatesFlag>
            <sch:EarliestStartDateClearFlag>false</sch:EarliestStartDateClearFlag>
            <sch:ParentTaskClearFlag>false</sch:ParentTaskClearFlag>
            <sch:PredecessorsClearFlag>false</sch:PredecessorsClearFlag>
            <sch:ProjectIdentity>
               <com:ProjectCode>P001053-001</com:ProjectCode>
            </sch:ProjectIdentity>
            <sch:ProjectTask>
               <com:ProjectTaskUid>1152921504608747352</com:ProjectTaskUid>
               <com:CompletedFlag>false</com:CompletedFlag>
               <com:Description>Task from WS-001 (4)</com:Description>
               <com:DurationMinutes>300</com:DurationMinutes>
               <com:EarliestStartDate>2018-01-31z</com:EarliestStartDate>
               <com:FullWbsCode>4</com:FullWbsCode>
               <com:OpenForTimeFlag>true</com:OpenForTimeFlag>
               <com:ParentTaskIdentity>
                  <com:ProjectTaskUid>1152921504608738152</com:ProjectTaskUid>
               </com:ParentTaskIdentity>
               <com:PlannedEndDateTime>2018-03-05z</com:PlannedEndDateTime>
               <com:PlannedStartDateTime>2018-03-01z</com:PlannedStartDateTime>
               <com:Predecessors>
                  <!--Zero or more repetitions:-->
                  <com:PwsProjectTaskPredecessor>
                     <com:LagMinutes>12000</com:LagMinutes>
                     <com:LinkType>FS</com:LinkType>
                     <com:PredecessorProjectTaskIdentity>
                        <com:ProjectTaskUid>1152921504608738153</com:ProjectTaskUid>
                     </com:PredecessorProjectTaskIdentity>
                  </com:PwsProjectTaskPredecessor>
               </com:Predecessors>
               <com:PreviousSiblingTaskIdentity>
                  <com:ProjectTaskUid>1152921504608738153</com:ProjectTaskUid>
               </com:PreviousSiblingTaskIdentity>               
               <com:ProjectTaskTypeIdentity>
                  <com:ProjectTaskTypeUid>1152921504608111232</com:ProjectTaskTypeUid>
               </com:ProjectTaskTypeIdentity>
               <com:TaskName>WS-004</com:TaskName>
               <com:InheritPurchaseOrderNumberFlag>false</com:InheritPurchaseOrderNumberFlag>
               <com:PurchaseOrderNumber>PO-004</com:PurchaseOrderNumber>
               <com:Subscriptions>
                  <!--Zero or more repetitions:-->
                  <com:PwsProjectTaskSubscription>
                     <com:UserIdentity>
                        <com:UserReferenceSystemId>019</com:UserReferenceSystemId>
                     </com:UserIdentity>
                  </com:PwsProjectTaskSubscription>
               </com:Subscriptions>
               <com:UserDefinedFields>
                  <!--Zero or more repetitions:-->
                  <com:PwsUserDefinedFieldDetail>
                     <com:UdfName>Phase 1 MS</com:UdfName>
                     <com:BooleanValue>false</com:BooleanValue>
                     <com:DataType>B</com:DataType>
                  </com:PwsUserDefinedFieldDetail>
               </com:UserDefinedFields>
            </sch:ProjectTask>
            <sch:StealLockFlag>true</sch:StealLockFlag>
            <sch:SubscriptionsClearFlag>true</sch:SubscriptionsClearFlag>
         </pws:serviceRequest>
      </pws:PwsSaveProjectTask>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsSaveProjectTask Response

Response Elements


Element

Data Type

Description

Sample Data

Messages

PwsMessage[]

The web service response status and message. Click here for more information.


ResponseId

Int32

Click here for more information.

0

Status

RequestStatus

Click here for more information

Ok

ServerTimestampUtc

DateTime

Click here for more information.

2018-03-05T15:44:50.3461017Z

ProjectTaskIdentity

PwsProjectTaskRef

The identity of the project task that was just saved. Click here for more information.


EngagementTimestamp

String

**deprecated**


LockStolenFromUserIdentity

PwsUserRef

**deprecated**


RateTaskTimestampStringThis is an optimistic locking timestamp that, if provided on update request, will cause the request to fail when the timestamp stored in the database does not match the provided value.
StolenLocksPwsEntityLockSummaryThis structure contains information about the locks that were stolen in order to complete this request, Will be included only when LocksToSteal is specified in the request.

Response Usage Example(s)


Example 01
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsSaveProjectTaskResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsSaveProjectTaskResult xmlns:a="http://projectorpsa.com/DataContracts/Shared/Scheduling/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Messages xmlns="http://projectorpsa.com/CommonServices/" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">0</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2018-03-22T15:22:21.9254018Z</ServerTimestampUtc>
            <a:ProjectTaskIdentity xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:ExternalSystemIdentifier i:nil="true"/>
               <b:ProjectTaskId i:nil="true"/>
               <b:ProjectTaskUid>1152921504608747352</b:ProjectTaskUid>
            </a:ProjectTaskIdentity>
            <a:EngagementTimestamp>AAAAAA/O3Ks=</a:EngagementTimestamp>
         </PwsSaveProjectTaskResult>
      </PwsSaveProjectTaskResponse>
   </s:Body>
</s:Envelope>

PwsSaveProjectTask - Common Errors and Warnings

ErrorNumberErrorCodeErrorText
10111RequiredFieldMissingA required field is missing: PredecessorProjectTaskIdentity
16009TaskDescriptionMayNotBeSpecifiedWhenClearFlagSetThe task description may not be specified when the associated clear flag is set.
54205ProjectTaskReferenceInvalidA specified project task identity was incomplete. Each project task identity must specify either a project task id, project task uid or project task external system identifier.
54655PreviousSiblingNotChildOfParentThe task identified as this task's previous sibling is not a child of the task specified as the parent task (or it is not a top level task if the specified parent task is null or being cleared).
54657ProjectTaskNameIsRequiredThe project task name is required for new project tasks.
55066TaskPurchaseOrderSpecifiedWhenInheritingPurchase order number may not be specified when inheriting purchase order number.