All Classes Namespaces Functions Properties Pages
Public Member Functions | List of all members
DynamicResourceService Class Reference

Provides methods to manage dynamic resource variables, allowing resources for an activity to be updated when executing a job. More...

Public Member Functions

string AddResource (string sessionId, ResourceIdentity resourceIdentity, string existingDynamicResourceXml)
 Adds the specified resource to existing dynamic resource variable XML (existing variable could be empty indicating we are adding the first resource to the variable XML). More...
 
string AddResources (string sessionId, ResourceIdentityCollection resourceIdentityCollection, string existingDynamicResourceXml)
 Adds the specified resources to existing dynamic resource variable XML (existing variable could be empty indicating we are adding the first resources to the variable XML). More...
 
string AddResourcesUsingJobRole (string sessionId, RoleIdentity roleIdentity, JobIdentity jobIdentity, string existingDynamicXml)
 Adds the specified role to existing dynamic resource variable XML (existing variable could be empty indicating we are adding the first role to the variable XML). More...
 
DynamicResourceInfo DeleteResource (string sessionId, ResourceIdentity resourceIdentity, string existingDynamicResourceXml)
 Removes the specified resource from existing dynamic resource variable XML. More...
 
DynamicResourceInfo DeleteResources (string sessionId, ResourceIdentityCollection resourceIdentityCollection, string existingDynamicXml)
 Removes the specified resources from existing dynamic resource variable XML. More...
 
int GetNumberOfResources (string sessionId, string dynamicXml)
 Retrieves the number of resources present in the specified XML. More...
 

Description

Provides methods to manage dynamic resource variables, allowing resources for an activity to be updated when executing a job.

Member Functions

string AddResource ( string  sessionId,
ResourceIdentity  resourceIdentity,
string  existingDynamicResourceXml 
)

Adds the specified resource to existing dynamic resource variable XML (existing variable could be empty indicating we are adding the first resource to the variable XML).

Parameters
sessionIdA string that uniquely identifies the Session for the current logged on user. If the SessionId is invalid then an exception will be raised.
resourceIdentityA ResourceIdentity identity object indicates the resource we are adding to the dynamic resource variable XML. Cannot be null
Name Type Comment Required
Id String The Id of the resource that is being added Yes/No Either Id or Name needs to be set
Name String The User Name or Resource Name of the resource that is being added Yes/No Either Id or Name needs to be set
ResourceType Int16 The type of resource. NOT used by this API No
existingDynamicResourceXmlThe existing dynamic resource XML. Could be empty if adding first resource
Returns
The updated dynamic resource variable XML that will now contain the added resource.
Security
No restrictions apply.
string AddResources ( string  sessionId,
ResourceIdentityCollection  resourceIdentityCollection,
string  existingDynamicResourceXml 
)

Adds the specified resources to existing dynamic resource variable XML (existing variable could be empty indicating we are adding the first resources to the variable XML).

Parameters
sessionIdA string that uniquely identifies the Session for the current logged on user. If the SessionId is invalid then an exception will be raised.
resourceIdentityCollectionA collection of ResourceIdentity object that identify resources that are to be added to the dynamic resource variable XML. Cannot be null
ResourceIdentity members.
Name Type Comment Required
Id String The Id of the resource that is being added Yes/No Either Id or Name needs to be set
Name String The User Name or Resource Name of the resource that is being added Yes/No Either Id or Name needs to be set
ResourceType Int16 The type of resource. NOT used by this API No
existingDynamicResourceXmlThe existing dynamic resource in XML format.
Returns
The updated dynamic resource variable XML that will now contain the added resources.
Security
No restrictions apply.
string AddResourcesUsingJobRole ( string  sessionId,
RoleIdentity  roleIdentity,
JobIdentity  jobIdentity,
string  existingDynamicXml 
)

Adds the specified role to existing dynamic resource variable XML (existing variable could be empty indicating we are adding the first role to the variable XML).

Parameters
sessionIdA string that uniquely identifies the Session for the current logged on user. If the SessionId is invalid then an exception will be raised.
roleIdentityA RoleIdentity identity object that is used to identify the role to add. Cannot be null
Name Type Comment Required
Id String The role id. NOT used by this API No
Name String The role name. Yes
jobIdentityA JobIdentity identity object that is used to identify the job containing the role to be added. Cannot be null
Name Type Comment Required
Id String The job id Yes
existingDynamicXmlThe existing dynamic resource XML containing the resources/roles.
Returns
The updated dynamic resource variable XML that will now contain the added role.
Security
No restrictions apply.
DynamicResourceInfo DeleteResource ( string  sessionId,
ResourceIdentity  resourceIdentity,
string  existingDynamicResourceXml 
)

Removes the specified resource from existing dynamic resource variable XML.

Parameters
sessionIdA string that uniquely identifies the Session for the current logged on user. If the SessionId is invalid then an exception will be raised.
resourceIdentityA ResourceIdentity identity object indicates the resource we are removing from the dynamic resource variable XML. Cannot be null
Name Type Comment Required
Id String The Id of the resource that is being removed Yes/No Either Id or Name needs to be set
Name String The User Name or Resource Name of the resource that is being removed Yes/No Either Id or Name needs to be set
ResourceType Int16 The type of resource. NOT used by this API No
existingDynamicResourceXmlThe existing dynamic resource XML.
Returns
An instance of a DynamicResourceInfo object containing the updated resource XML along with the number of resources left after the resource is removed.
Security
No restrictions apply.
DynamicResourceInfo DeleteResources ( string  sessionId,
ResourceIdentityCollection  resourceIdentityCollection,
string  existingDynamicXml 
)

Removes the specified resources from existing dynamic resource variable XML.

Parameters
sessionIdA string that uniquely identifies the Session for the current logged on user. If the SessionId is invalid then an exception will be raised.
resourceIdentityCollectionA collection of ResourceIdentity object that identify the resources that are to be removed from the dynamic resource variable XML. Cannot be null
ResourceIdentity members.
Name Type Comment Required
Id String The Id of the resource that is being removed Yes/No Either Id or Name needs to be set
Name String The User Name or Resource Name of the resource that is being removed Yes/No Either Id or Name needs to be set
ResourceType Int16 The type of resource. NOT used by this API No
existingDynamicXmlThe existing dynamic resources in XML format.
Returns
An instance of a DynamicResourceInfo object containing the updated resources XML along with the number of resources left after the resources are removed.
Security
No restrictions apply.
int GetNumberOfResources ( string  sessionId,
string  dynamicXml 
)

Retrieves the number of resources present in the specified XML.

Parameters
sessionIdA string that uniquely identifies the Session for the current logged on user. If the SessionId is invalid then an exception will be raised.
dynamicXmlThe dynamic resource XML containing the resources.
Returns
Number of resources in the supplied XML.
Security
No restrictions apply.