Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the number of jobs of the specified correlations, job states, and message types in the Project Server Queuing Service.
Namespace: [QueueSystem Web service]
Service reference: http://ServerName:32843/[Project Service Application GUID]/PSI/QueueSystem.svc
Web service reference: http://ServerName/ProjectServerName/_vti_bin/PSI/QueueSystem.asmx?wsdl
Syntax
'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/GetJobCount", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetJobCount ( _
CorrelationGUIDs As Guid(), _
jobStates As JobState(), _
messageTypes As QueueMsgType() _
) As Integer
'Usage
Dim instance As QueueSystem
Dim CorrelationGUIDs As Guid()
Dim jobStates As JobState()
Dim messageTypes As QueueMsgType()
Dim returnValue As Integer
returnValue = instance.GetJobCount(CorrelationGUIDs, _
jobStates, messageTypes)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/GetJobCount", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public int GetJobCount(
Guid[] CorrelationGUIDs,
JobState[] jobStates,
QueueMsgType[] messageTypes
)
Parameters
- CorrelationGUIDs
Type: []
Array of job correlation GUIDs.
- jobStates
Type: []
Array of JobState enumeration values.
- messageTypes
Type: []
Array of QueueMsgType enumeration values.
Return Value
Type: System.Int32
Count of jobs with { [corrID1 OR corrID2 OR …] AND [state1 OR state2 OR …] AND [type1 OR type2 OR …]}
Remarks
Any of the parameters can be a null reference (Nothing in Visual Basic). For example, if CorrelationGUIDs and jobStates are both a null reference (Nothing in Visual Basic), GetJobCount returns the total number of jobs of the specified messageTypes.
If CorrelationGUIDs is a null reference (Nothing in Visual Basic), GetJobCount counts all correlations. If jobStates is a null reference (Nothing in Visual Basic), count all job states. If messageTypes is a null reference (Nothing in Visual Basic), count all message types.
Project Server Permissions
Permission |
Description |
|---|---|
Allows the user to manage the Project Server queue. Global permission. |
Examples
The following example returns the total number of queue jobs in the corGuid1 OR corGuid1 correlations that are of the ProjectPublish type AND in the Success state. The q variable is an initialized instance of [QueueSystem Web service].QueueSystem.
Guid[] correlationGuids = { corGuid1, corGuid2 };
WebSvcQueueSystem.JobState[] jobStates = { WebSvcQueueSystem.JobState.Success };
WebSvcQueueSystem.QueueMsgType[] jobTypes = { WebSvcQueueSystem.QueueMsgType.ProjectPublish };
int numJobs = q.GetJobCount(null, jobStates, jobTypes);
The following example returns the number of publish jobs plus the number of save jobs in the OnHold OR Failed state.
[QueueSystem Web service].JobState[] jobStates = { WebSvcQueueSystem.JobState.OnHold,
WebSvcQueueSystem.JobState.Failed };
WebSvcQueueSystem.QueueMsgType[] jobTypes = { WebSvcQueueSystem.QueueMsgType.ProjectPublish,
WebSvcQueueSystem.QueueMsgType.ACProjectSave };
int numJobs = q.GetJobCount(null, jobStates, jobTypes);
The following example returns the total number of jobs in the OnHold OR Failed state.
[QueueSystem Web service].JobState[] jobStates = { WebSvcQueueSystem.JobState.OnHold,
WebSvcQueueSystem.JobState.Failed };
int numJobs = q.GetJobCount(null, jobStates, null);