PwsRequestOrBookRoleHours

Overview


This web service is used to request and/or schedule hours on an existing role. This web service also allows users to specify a candidate for an existing role as a requester or scheduler.

Request Format


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

ATWHktwSz1Ga38IARiym4w==

FinalizeOrder

PwsProjectRoleApproveFinalizeOrder

No

 

The caller may optionally choose to finalize the role after saving the scheduling changes. To do so, a FinalizeOrder should be specified. This structure allows the caller to specify parameters to the finalize operation, such as an effective date, the constraint, if any, to apply, and who to notify. This is available only for schedulers.


Mode

String

 Yes

 

"A" for Scheduler.

"R" for Requester.

R

ProjectRoles

PwsProjectRoleHours[]

 Yes

 

This array represents the scheduling data to be saved for one or more project roles, including the candidate identity, hours and allocation notes.


SubmitOrder

PwsProjectRoleSubmitOrder

No

 

The caller may optionally choose to submit the role after saving the scheduling changes. To do so, a SubmitOrder should be specified. This structure allows the caller to specify parameters to the submit operation, such as an effective date, the constraint, if any, to apply, and who to notify. This is available only for requesters.


Request Usage Example(s)


Requester Example
<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/" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsRequestOrBookRoleHours>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>ATWHktwSz1Ga38IARiym4w==</req:SessionTicket>
            <sch:Mode>R</sch:Mode>
            <sch:ProjectRoles>
               <com:PwsProjectRoleHours>
                  <com:CandidateResourceClearFlag>false</com:CandidateResourceClearFlag>
                  <com:CandidateResourceIdentity>
                     <com:ResourceDisplayName>Matt</com:ResourceDisplayName>
                     <com:ResourceReferenceSystemId>IT (USA) - 01</com:ResourceReferenceSystemId>
                  </com:CandidateResourceIdentity>
                  <com:ClearExistingHoursFlag>false</com:ClearExistingHoursFlag>
                  <com:HoursBuckets>
                     <com:PwsProjectRoleHoursBucket>
                        <com:BucketStartDate>2020-01-06T00:00:00.000Z</com:BucketStartDate>
                        <com:DailyMinutes>
                           <arr:short>480</arr:short>
                           <arr:short>480</arr:short>
                           <arr:short>480</arr:short>
                           <arr:short>480</arr:short>
                           <arr:short>480</arr:short>
                           <arr:short>0</arr:short>
                           <arr:short>0</arr:short>
                        </com:DailyMinutes>
                        <com:SchedulingMode>D</com:SchedulingMode>
                     </com:PwsProjectRoleHoursBucket>
                  </com:HoursBuckets>
                  <com:LeaveRequestOpenFlag>true</com:LeaveRequestOpenFlag>
                  <com:NotesBuckets>
                     <com:PwsProjectRoleNotesBucket>
                        <com:BucketStartDate>2020-01-06T00:00:00.000Z</com:BucketStartDate>
                        <com:Notes>
                           <arr:string>Monday</arr:string>
                           <arr:string>Tuesday</arr:string>
                           <arr:string>Wednesday</arr:string>
                           <arr:string>Thursday</arr:string>
                           <arr:string>Friday</arr:string>
                           <arr:string>Saturday</arr:string>
                           <arr:string>Sunday</arr:string>
                        </com:Notes>
                     </com:PwsProjectRoleNotesBucket>
                  </com:NotesBuckets>
                  <com:ProjectRoleIdentity>
                     <com:ProjectRoleUid>1152921504609839438</com:ProjectRoleUid>
                  </com:ProjectRoleIdentity>
               </com:PwsProjectRoleHours>
            </sch:ProjectRoles>
            <sch:SubmitOrder>
               <sch:ConstraintType>N</sch:ConstraintType>
               <sch:EffectiveDate>2020-01-06T00:00:00.000Z</sch:EffectiveDate>
               <sch:SchedulerNotes>Submitting Hours for Review</sch:SchedulerNotes>
            </sch:SubmitOrder>
         </pws:serviceRequest>
      </pws:PwsRequestOrBookRoleHours>
   </soapenv:Body>
</soapenv:Envelope>
Scheduler Example
<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/" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header/>
   <soapenv:Body>
      <pws:PwsRequestOrBookRoleHours>
         <pws:serviceRequest>
            <req:RequestId>1</req:RequestId>
            <req:SessionTicket>ARwMngBGKwdzQCzOjMwz0w==</req:SessionTicket>
            <sch:FinalizeOrder>
               <sch:ConstraintType>N</sch:ConstraintType>
               <sch:EffectiveDate>2020-01-06T00:00:00.000Z</sch:EffectiveDate>
               <sch:ProjectManagerNotes>Scheduling Hours</sch:ProjectManagerNotes>
               <sch:SendBookingEmailFlag>true</sch:SendBookingEmailFlag>
               <sch:SendPmBookingEmailFlag>false</sch:SendPmBookingEmailFlag>
            </sch:FinalizeOrder>
            <sch:Mode>A</sch:Mode>
            <sch:ProjectRoles>
               <com:PwsProjectRoleHours>
                  <com:CandidateResourceClearFlag>false</com:CandidateResourceClearFlag>
                  <com:ClearExistingHoursFlag>false</com:ClearExistingHoursFlag>
                  <com:CopyRequestedHoursFlag>true</com:CopyRequestedHoursFlag>
                  <com:LeaveRequestOpenFlag>false</com:LeaveRequestOpenFlag>
                  <com:ProjectRoleIdentity>
                     <com:ProjectRoleUid>1152921504609839438</com:ProjectRoleUid>
                  </com:ProjectRoleIdentity>
                  <!--com:Timestamp>?</com:Timestamp-->
               </com:PwsProjectRoleHours>
            </sch:ProjectRoles>
         </pws:serviceRequest>
      </pws:PwsRequestOrBookRoleHours>
   </soapenv:Body>
</soapenv:Envelope>

Response Format


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

1

Status

RequestStatus

Click here for more information.

Ok

ServerTimestampUtc

DateTime

Click here for more information.

2020-02-05T18:32:37.2718391Z

ApprovedProjectRoles

PwsProjectRoleApprovalResult[]

If a scheduler chose to finalize the roles, this array contains the results of the finalize operations.


SubmittedProjectRoles

PwsProjectRoleSubmissionResult[]

If a requester chose to submit the roles, this array contains the results of the submit operations.


Response Usage Example(s)


Requester Example
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsRequestOrBookRoleHoursResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsRequestOrBookRoleHoursResult 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/">1</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2020-02-05T18:32:37.2718391Z</ServerTimestampUtc>
            <a:ApprovedProjectRoles xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
            <a:SubmittedProjectRoles xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsProjectRoleSubmissionResult>
                  <b:OverallocationFlag>false</b:OverallocationFlag>
                  <b:ProjectRoleIdentity>
                     <b:ExternalSystemIdentifier i:nil="true"/>
                     <b:ProjectRoleId i:nil="true"/>
                     <b:ProjectRoleUid>1152921504609839438</b:ProjectRoleUid>
                  </b:ProjectRoleIdentity>
               </b:PwsProjectRoleSubmissionResult>
            </a:SubmittedProjectRoles>
         </PwsRequestOrBookRoleHoursResult>
      </PwsRequestOrBookRoleHoursResponse>
   </s:Body>
</s:Envelope>


Scheduler Example
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <PwsRequestOrBookRoleHoursResponse xmlns="http://projectorpsa.com/PwsProjectorServices/">
         <PwsRequestOrBookRoleHoursResult 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/">1</ResponseId>
            <Status xmlns="http://projectorpsa.com/CommonServices/">Ok</Status>
            <ServerTimestampUtc xmlns="http://projectorpsa.com/CommonServices/">2020-02-05T18:40:35.4908317Z</ServerTimestampUtc>
            <a:ApprovedProjectRoles xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/">
               <b:PwsProjectRoleApprovalResult>
                  <b:OverallocationFlag>false</b:OverallocationFlag>
                  <b:ProjectRoleIdentity>
                     <b:ExternalSystemIdentifier i:nil="true"/>
                     <b:ProjectRoleId i:nil="true"/>
                     <b:ProjectRoleUid>1152921504609839438</b:ProjectRoleUid>
                  </b:ProjectRoleIdentity>
                  <b:TotalApprovedOrFinalizedMinutes>2400</b:TotalApprovedOrFinalizedMinutes>
               </b:PwsProjectRoleApprovalResult>
            </a:ApprovedProjectRoles>
            <a:SubmittedProjectRoles xmlns:b="http://projectorpsa.com/DataContracts/Shared/Common/"/>
         </PwsRequestOrBookRoleHoursResult>
      </PwsRequestOrBookRoleHoursResponse>
   </s:Body>
</s:Envelope>


PwsRequestOrBookRoleHoursResponse - Common Errors and Warnings

Error NumberError CodeError Text
50024EntityNotFoundError 50024, State 3: Entity not found ### [context:][entityName:Resource][refStructureName:PwsResourceRef]
50406InvalidParametersForWebServiceParameter values provided are invalid.
55048CannotChangeRequestedResourceAllocatedCriteriaError 55048, State 1: Requested resource may not be changed because the role has allocated criteria ### [roleName:Developer]
55209NoPermissionToBookHoursError 55209, State 1: No permission to book hours (user = 207246, project role = 2992462) ### [roleName:Developer]