Activity (Object)

The object that represents an activity.

It groups the most important methods related to an activity and enables to get the management interfaces (hierarchy management, control flow management, * ...).

Properties


Property AttrCount() As (Read Only)
This property returns the number of attributes of the current activity.
Returns:
oNbAttr The number of attributes
Property BeginningDate() As
This property returns the beginning date of the current activity.
Returns:
oBegin The beginning date of the current activity
Property CalculatedBeginTime() As (Read Only)
This property returns and calculated time cyle on the current activity.
Returns:
oCBT The calculated begin time of the current activity
Property CalculatedCycleTime() As (Read Only)
This property returns and sets the calculated time cyle on the current activity.
Returns:
oCCT The calculated time cycle of the current activity
Property ChildrenActivities() As (Read Only)
This property returns the interface which manages the children hierarchy on the activity. Please note that it used to return all children, but from R20SP4 it returns only exposed children, which could be different from all children.
Property CycleTime() As
This property returns and set the time cyle on the current activity.
Returns:
oCT The time cycle of the current activity
Parameters:
iCT
The specified time cycle of the current activity
Property Description() As
This property returns and set the description on the current activity.
Returns:
oDescriptionBSTR The description of the current activity
Parameters:
iDescriptionBSTR
The specified description of the current activity
Property EndDate() As (Read Only)
This property returns the end date of the current activity.
Returns:
oEnd The end date of the current activity. Till V5R13, this method is returning S_OK even if there is no good implementation. Starting from V5R14 this method will return E_NOIMPL. Hence all the scripts that use this method would have to be updated to accomodate this change.
Property Items() As (Read Only)
This property returns the interface which manages the items or input products/components assigned to the current activity
Property NextCFActivities() As (Read Only)
This property returns the interface which manages the downstream control flow hierarchy on the activity.
Property NextPRFActivities() As (Read Only)
This property returns the interface which manages the downstream product flow hierarchy on the activity.
Property Outputs() As (Read Only)
This property returns the interface which manages the output products/components of the current activity
Property Parameters() As (Read Only)
This property returns the interface which manages the knowlegde parameters of the activity.
Property PossiblePrecedenceActivities() As (Read Only)
This property returns list of Possible Precedence Activities defined on Current Activity.
Parameters:
oActivities
List of Activities that must precede the Current Activity
Property PrecedenceActivities() As (Read Only)
This property returns list of Precedence Activities defined on Current Activity.
Parameters:
oActivities
List of Activities that must precede the Current Activity
Property PreviousCFActivities() As (Read Only)
This property returns the interface which manages the upstream control flow hierarchy on the activity.
Property PreviousPRFActivities() As (Read Only)
This property returns the interface which manages the upstream product flow hierarchy on the activity.
Property ProcessID() As (Read Only)
This property returns process identifier on the current activity.
Parameters:
oProcessID
The process ID of the current activity
Property Relations() As (Read Only)
This property returns the interface which manages the knowlegde relations of the activity.
Property Resources() As (Read Only)
This property returns the interface which manages the resources hierarchy on the activity.
Property Type() As (Read Only)
This method returns the type of the current activity.
Parameters:
oType
The type of the current activity

Methods


Sub AddActivityConstraint( iActivity, iConstraintType)
Create a constraint between current activity and input activity
Parameters:
iActivity
Activity with which the constraint to be created.
iConstraintType
Type of the Constraint. It may be one of the following: Precedence_Constraint, Start_Constraint, End_Constraint,
Returns:
S_OK On Success
S_FALSE If a constraint already exists.
E_FAIL If the constraint is NOT created.
Sub AddAttr( iAttributeName, AttrType, iAttributePromptName)
Adds attribute to an Activity.
Parameters:
iAttributeName
Name of the attribute to add
AttrType
Type of the attribute to add. It may be one of the following: Integer_Attribute or 0 for integer, Double_Attribute or 1 for double, or String_Attribute or 2 for string
iAttributePromptName
Prompt Name of the attribute to add
Func AttrName( iIndex) As
This method returns the name for the specified attribute.
Parameters:
iIndex
The attribute index
oName
The attribute name
Func AttrValue( iIndex) As
This method returns the value for the specified attribute.
Parameters:
iIndex
The attribute identifier
Returns:
oAttVal The attribute value
Func CreateChild( iTypeOfChild) As
This method creates a new child activity of the requested type.
Parameters:
iTypeOfChild
The type of the child activity to create.
oCreatedChild
The new created child activity.
Sub CreateLink( iSecondActivity)
This method creates a link from the current activity to another activity.
Parameters:
iSecondActivity
The activity that will be linked to the current activity.
Sub GetActivityConstraints( iConstraintType, oConstrtList)
Get List of constraint activities that exists on the current Activity
Parameters:
iConstraintType
Type of the Constraints to be returned. It may be one of the following: Precedence_Constraint, Start_Constraint, End_Constraint, All_Constraints
Returns:
oConstrtList ( Allocate the memory.If not, it allocates internally and you need to clean it after usage)
List of Activities with which the current activity has constraints
Returns:
oConstraintTypeList (It is an optional output used only if user interested) ( Allocate the memory.If not, it allocates internally and you need to clean it after usage)
List of constraint types for each actvity that exists in oConstrtList
Current activity has a constraint with first activity in oConstrtList and its constraint type is mentioned in first field of oConstraintTypeList
Func GetTechnologicalObject( iApplicationType) As
Returns the process's applicative data which type is the given parameter. The data returned can be either a collection or a simple object.
Parameters:
iApplicationType
The type of applicative data searched.
Example:
 This example retrieves the GraphEditor position for the
 Loading1 activity.
 
 Dim GEPosition 
 Set GEPosition = Loading1.GetTechnologicalObject("GEPosition")
 
Func IsSubTypeOf( iName) As
This method allows to test the type of a specific activity.
Parameters:
iName
The name of the type to test
Returns:
oVal The logical value returned by the test
Sub RemoveActivityConstraint( iActivity, iConstraintType)
Remove a constraint between current activity and input activity
Parameters:
iActivity
Activity with which the constraint to be removed.
iConstraintType
Type of the Constraint to be removed. It may be one of the following: Precedence_Constraint, Start_Constraint, End_Constraint, All_Constraints
Returns:
S_OK On Success
S_FALSE If a constraint does not exists.
E_FAIL If the constraint can not be removed or the Function fails because of any reason.
Sub RemoveAttr( iAttributeName)
Removes attributes to an Activity type.
Parameters:
iAttributeName
Name of the attribute to remove
Sub RemoveLink( iSecondActivity)
This method removes a link existing on the current activity.
Parameters:
iSecondActivity
The activity on which the link will be removed.
Sub SetProcessID( iProcessID, iCheckUnique)
Sets the process ID of the current activity
Parameters:
iProcessID
Input Process ID string
iCheckUnique
Option to enable uniqueness check