Role: Active Task is the object used to access and manage the active task set for all the resources assigned for the activity.
The following code snippet can be used to obtain the Active Task from the activity.
Dim objChildActivity As Activity
Dim objActiveActivity As ActiveTask
Set objActiveActivity = objChildActivity.GetTechnologicalObject("ActiveTask")
Methods
- Sub GetActiveTask( iResource, oTask)
-
Retrieves the Active Task for an activity for a particular Resource.
- Parameters:
-
- iResource
- The resources. dd>
- oTask
- The Active Task. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The status could be successfully queried from the activity
- E_FAIL
- The query failed.
- Example:
- The following example get the active task of the particular resource in the activity.
Dim oActiveAct As ActiveTask Dim iResPrgMngr As ResourceProgramManager Dim oTask As Task .. oActiveAct.GetActiveTask iResPrgMngr, oTask
- Sub SetActiveTask( iResource, iTask)
-
Defines the Active Task for an activity for a particular Resource.
- Parameters:
-
- iResource
- The resources that owns the Task. dd>
- iTask
- The Tasks to be made active. dd>
- Returns:
- An HRESULT.
Legal values:- S_OK
- The Active Task was corrrectly set
- E_FAIL
- The Active Task was not corrrectly set
- Example:
- The following example sets Active Task for an activity for a particular Resource.
Dim iActiveAct As ActiveTask Dim iResPrgMngr As ResourceProgramManager Dim iTask As Task .. oActiveAct.SetActiveTask iResPrgMngr, iTask