Page tree

    Puede editar el código para la acción de flujo Circuito derivado a fin de insertar un circuito derivado condicional en una cadena de reglas.

    De forma predeterminada, la interfaz de usuario crea dos bloques de código: uno que contiene las condiciones True/False para el circuito derivado y otro que comprueba la condición y desencadena el evento afirmativo (Yes) o negativo (No).
    ' ====================================================
    ' The ConfigureAction function implements a branch.
    ' It is called with the event which triggered the rule and the action.
    ' ============================================================
    Public Sub ConfigureAction( _
    ByVal triggerEvent As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent, _
    ByVal action As Creo.PWS.Automation.GenericDataModel.BranchAction)
    If (Me.Condition1(triggerEvent) AndAlso Me.Condition2(triggerEvent)) Then
    'This is how we make the branch trigger the "Yes" event
    action.SetYes
    Else
    'This is how we make the branch trigger the "No" event
    action.SetNo
    End If
    End Sub

    ' =============================================================
    ' The condition functions test the event which triggered the rule
    ' If it returns true the Yes branch will be taken by the ConfigureAction function.
    ' If it returns false the No branch will be taken.
    ' =============================================================
    Private Function Condition1( _
    ByVal item As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent) _
    As Boolean
    Return (item.NewApprovalState = _
    Creo.PWS.Automation.PrinergyDataModelTypes.ApprovalState.Approved)
    End Function
    Private Function Condition2( _
    ByVal item As Creo.PWS.Automation.PrinergyDataModel.PageApprovalChangedEvent) _
    As Boolean
    Return '<your condition here>
    End Function

    • No labels