Assigns an operation occurrence to a resource occurrence, by specifying
the detailing task.
If the operation occurrence is already assigned to
the resource occurrence, the detailing task only is updated on the existing
implement link.
Signature
ResourceOccurrence.AssignOperationWithDetailingTask(OperationOccurrence, Task : Integer)
Arguments
| Name |
Input / Output |
Required? |
Type |
Comment |
ResourceOccurrence |
In |
|
ResourceOccurrence |
Resource occurrence |
OperationOccurrence |
In |
|
ProdSystemOccurrence |
Operation occurrence to assign |
Task |
In |
|
DNBResourceTask |
Task to specify |
ReturnType
0: Success: the operation was already assigned to the resource
and the task has been correctly specified.
1: Success: the operation was sucessfully assigned to the
resource and the task has been correctly specified.
2: Success: the task has replaced an already specified task.
3: Success: the operation and task were already assigned to the
resource.
4: Failure: the task is not assignable for
OperationOccurrence.
5: Failure: the task does not correspond to a resource
accessible task.
6: Failure: the operation was not assigned and the attempt to
assign has failed (check if a resource process scope exists).
7: Failure: the task is already specified for a resource on
another operation.
8: Failure: OperationOccurrence is not an
operation (it might be a system/workplan).
9: Failure: other error.
Example
Let MyTaskMgr(DNBTaskManager)
Let MyListTask(List)
Let MyResourceOcc(ResourceOccurrence)
Let MyTask(DNBResourceTask)
Let MyOpOcc(ProdSystemOccurrence)
Let RetCode (Integer)
Set MyResourceOcc = Resource1//[Resource1 from Argument List, Provided by User Selection]
MyTaskMgr = GetTaskManager(MyResourceOcc)
MyTaskMgr.GetTaskList(MyListTask) // Assuming MyResourceOcc has one or more tasks
Set MyTask = MyListTask.GetItem(1) // Assuming MyResourceOcc has one or more tasks
Set MyOpOcc = Op1 //[Operation from Argument List, Provided by User Selection]
Set RetCode = MyResourceOcc.AssignOperationWithDetailingTask(MyOpOcc, MyTask )