ArcFM Desktop Developer Guide
Enabled Method (IMMPxSubtask)


Version: 10.2.1b and 10.2.1b SP1

Resource Center Home

IMMPxNode
Returns true if the subtask's preconditions are satisfied.
Syntax
'Declaration
 
Function Enabled( _
   ByVal pPxNode As IMMPxNode _
) As Boolean
'Usage
 
Dim instance As IMMPxSubtask
Dim pPxNode As IMMPxNode
Dim value As Boolean
 
value = instance.Enabled(pPxNode)
bool Enabled( 
   IMMPxNode pPxNode
)

Parameters

pPxNode
IMMPxNode

Return Value

Boolean
Example
The following code sample demonstrates how the IMMPxSubtask::Enabled method may be implemented.
Visual Basic Copy Code
Private Function IMMPxSubtask_Enabled(ByVal pPxNode As Miner.Interop.Process.IMMPxNode) As Boolean
    If pPxNode Is Nothing Then Exit Function

    Dim pWorkRequest As mmWorkflowCore.IMMWMSWorkRequest
    Dim pWfmExt As mmWorkflowCore.IMMWorkflowManager
    Dim sNodeType As String
    Dim pHelper As Miner.Interop.Process.IMMPxHelper2

    Set pWfmExt = m_pPxApp.FindPxExtensionByName("MMWorkflowManager")
    If pWfmExt Is Nothing Then Exit Function

    Set pHelper = m_pPxApp.Helper
    sNodeType = pHelper.GetNodeTypeName(pPxNode.NodeType)

    Dim pWMSNode As mmWorkflowCore.IMMWMSNode
    Set pWMSNode = pWfmExt.GetWMSNode(sNodeType, pPxNode.id, False, True)
    If pWMSNode Is Nothing Then Exit Function

    Dim bUserIsOwner As Boolean
    Select Case sNodeType
        Case gk_sWRNodeName
            Dim pWrNode As IMMWMSWorkRequest
            Set pWrNode = pWMSNode
            bUserIsOwner = (m_pPxApp.User.id = pWrNode.OwnerID)
        Case gk_sDesignNodeName
            Dim pDNNode As IMMWMSDesign
            Set pDNNode = pWMSNode
            bUserIsOwner = (m_pPxApp.User.id = pDNNode.OwnerID)
        Case Else
            bUserIsOwner = False
    End Select

    IMMPxSubtask_Enabled = bUserIsOwner
End Function
Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

IMMPxSubtask Interface
IMMPxSubtask Members

 

 


Send Comment