PwsSaveProjectTaskTypes

Overview


This web service inserts, updates or deletes project task type(s) based on a detailed project task type structure (PwsProjectTaskTypeDetail). 

Request Format


PwsSaveProjectTaskTypes Request

Request Elements


Element

Data Type

Required?

Default

Description

Sample Data

RequestId

Int32

 No

 

 Click here for more information.

1

SessionTicket

String

 Yes

 

 Click here for more information.

AXimxHvLSk12MuOkzXCGyg==

InactivateIfInUseFlag

Boolean

 Yes

 false

If this flag is set to true, and task types that have been omitted from the request (and thereby marked for deletion) will be set to inactive if in use and cannot be deleted.

true

LocksToSteal

PwsEntityLockSummary[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.


ProjectIdentity

PwsProjectRef

 Yes

 

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


ProjectTaskTypes

PwsProjectTaskTypeDetail[1..100]

 Yes

 

The project task type that is to be added, updated or deleted


ProjectorLockSetId

Int32

 No

 

A projector lock set id is an identifier for a group of one or more locks held as a unit.


RateTaskTimestamp

String

No 

 

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.


RevalueAction

String

 Yes

 N

This indicates how the service should respond if there are time cards that would become in need of revalue as a result of the changes. The valid values are:

  • N (No Revalue): Time cards are left as is and the save is completed.
  • R (Revalue): Time cards that can be revalued are revalued and the save is completed.
  • C (Check): The save operation will only proceed if there are no time cards that would be in need of revalue. RevalueReport in the response will provide details about the affected time cards.
N

Request Usage Example(s)


Example 01
<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:PwsSaveProjectTaskTypes>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>AXimxHvLSk12MuOkzXCGyg==</req:SessionTicket>
            <sch:InactivateIfInUseFlag>true</sch:InactivateIfInUseFlag>
            <sch:ProjectIdentity>
               <com:ProjectCode>P001605-001</com:ProjectCode>
            </sch:ProjectIdentity>
            <sch:ProjectTaskTypes>
               <com:PwsProjectTaskTypeDetail>
                  <com:ProjectTaskTypeName>Task 1</com:ProjectTaskTypeName>
                  <com:AllowedProjectRateTypeIdentities>
                     <com:PwsProjectRateTypeRef>
                        <com:ProjectRateTypeUid>1152921504607445053</com:ProjectRateTypeUid>
                     </com:PwsProjectRateTypeRef>
                     <com:PwsProjectRateTypeRef>
                        <com:ProjectRateTypeUid>1152921504607445057</com:ProjectRateTypeUid>
                     </com:PwsProjectRateTypeRef>
                  </com:AllowedProjectRateTypeIdentities>
                  <com:DefaultProjectRateTypeIdentity>
                     <com:ProjectRateTypeUid>1152921504607445057</com:ProjectRateTypeUid>
                  </com:DefaultProjectRateTypeIdentity>
                  <com:InactiveFlag>false</com:InactiveFlag>
                  <com:NarrativeRequiredFlag>false</com:NarrativeRequiredFlag>
                  <com:NewExternalSystemIdentifier>Task 1</com:NewExternalSystemIdentifier>
                  <com:StandardTaskTypeIdentity>
                     <com:StandardTaskTypeUid>1152921504606848773</com:StandardTaskTypeUid>
                  </com:StandardTaskTypeIdentity>
                  <com:InheritPurchaseOrderNumberFlag>true</com:InheritPurchaseOrderNumberFlag>
               </com:PwsProjectTaskTypeDetail>
            </sch:ProjectTaskTypes>
            <sch:RevalueAction>N</sch:RevalueAction>
         </pws:serviceRequest>
      </pws:PwsSaveProjectTaskTypes>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


PwsSaveProjectTaskTypes Response

Response Elements


Element

Data Type

Description

Messages

PwsMessage[]

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

ResponseId

Int32

 Click here for more information.

Status

RequestStatus

 Click here for more information

ServerTimestampUtc

DateTime

 Click here for more information.

InactivatedFlag

Boolean

This flag is set to true if one or more tasks have been marked as inactive as a result of the update

RateTaskTimestamp

String

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.

StolenLocks

PwsEntityLockSummary

This 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.

RevalueReport

PwsRevalueReport

Information about time cards on the project that were affected or would be affected by the change. Populated only when RevalueAction is R (Revalue) or C (Check). If RevalueAction is R, the values included in this structure reflect what was done. If RevalueAction is C, the values reflect what would be done if the service were invoked again with RevalueAction set to R.

Response Usage Example(s)


Example 01
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsSaveProjectTaskTypesResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsSaveProjectTaskTypesResult 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/">
               <b:PwsMessage>
                  <b:AdditionalErrorText>Message 136: This request was executed against the QA [appqa.projectorpsa.com] environment.</b:AdditionalErrorText>
                  <b:ErrorCode>NonProductionEnvironment</b:ErrorCode>
                  <b:ErrorNumber>136</b:ErrorNumber>
                  <b:ErrorText>This web service request was executed against a non-production instance of Projector.</b:ErrorText>
                  <b:Type>Information</b:Type>
                  <b:ReferenceId1 i:nil="true"/>
                  <b:ReferenceId2 i:nil="true"/>
               </b:PwsMessage>
            </Messages>
            <ResponseId xmlns="http://projectorpsa.com/CommonServices/">1</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2020-11-30T18:17:07.0099106Z</ServerTimestampUtc>
            <a:InactivatedFlag>true</a:InactivatedFlag>
            <a:RateTaskTimestamp>AAAAABcxbqA=</a:RateTaskTimestamp>
            <a:StolenLocks i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <a:RevalueReport i:nil="true" xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
         </PwsSaveProjectTaskTypesResult>
      </PwsSaveProjectTaskTypesResponse>
   </s:Body>
</s:Envelope>

PwsSaveProjectTaskTypes - Common Errors and Warnings

ErrorNumberErrorCodeErrorText
15002ProjectNotSpecifiedForSaveTaskTypeNo project was specified for saving project task type.
54645ProjectTaskTypeNameIsRequiredThe project task type name is required for new project task types.
54646ProjectTaskTypeNameAlreadyInUseThe specified project task type name is already in use.
54647ProjectRateTypeIsRequiredThe default project rate type is required for new project task types.
54650ProjectRateTypeNotFoundThe specified default project rate type does not exist.
55069TaskTypePurchaseOrderSpecifiedWhenInheritingPurchase order number may not be specified when inheriting purchase order number.
57556TaskTypeNotSpecifiedThe standard task type is required for new project task types.