Custom Rule - Count of Event ID

I have a custom rule in SCOM 2012 for event ID 4648 in the security log. This will only alert when parameter 6 equals a specific user id. That works fine.
But, I want to get a count of how many times event id 4646 appears in the log for this user. How do I do that?
Thank you in advance.

Adding more info:
How an Alert is Produced
http://technet.microsoft.com/en-us/library/hh212847.aspx
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place.

Similar Messages

  • Migration of Fxcop Custom Rules to Visuatl Studio 2012

    I have an existing custom rule which was written in visual studio 2008 using fxocp SDK 1.35 and Microsoft.CCI 1.35. Now i am migrating it to latest version of Fxcop 11.0 and Microsoft .cci 11.0 using Vistual Studio 2012.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    //using Microsoft.FxCop.Sdk.Introspection;
    //using Microsoft.Cci;
    using Microsoft.FxCop.Sdk;
    using System.Collections;
    using System.IO;
    namespace LDOFxCopCustomRules.Rules.Design
    class DisposableObjectsShouldBeDisposed : BaseDesignRules
    string sFileName = System.Configuration.ConfigurationSettings.AppSettings["FolderForOutput"] + "\\" + @"DisposableObjectsShouldBeDisposed.Xls";
    bool bDisplayErrors = String.IsNullOrEmpty(System.Configuration.ConfigurationSettings.AppSettings["FolderForOutput"]);
    //string sExceptionLogFileName = @"D:\RTE.txt";
    static string sLockString = "Lock";
    string sFormat = "{0}\t{1}\t{2}\t{3}\n";
    string sAssemblyName;
    string sClassName;
    string sLineNumber;
    // Fields
    private Hashtable m_fieldsOwnedByType;
    private Hashtable m_fieldsWithDispose;
    private Method m_method;
    // Methods
    public DisposableObjectsShouldBeDisposed()
    : base("DisposableObjectsShouldBeDisposed")
    this.m_fieldsWithDispose = new Hashtable();
    this.m_fieldsOwnedByType = new Hashtable();
    if (!bDisplayErrors && !File.Exists(sFileName))
    if (!bShowInAllReport)
    lock (sLockString)
    File.WriteAllText(sFileName, string.Format(sFormat, "Assembly", "Class", "Method (fully qualified name)", "Line number"));
    public override ProblemCollection Check(Member member)
    string sTemp = member.FullName;
    bool bFinally = false;
    bool bDataReader = false;
    bool bDisposedCalled = false;
    int nDataReaderCount = 0;
    Local oCheckLocal;
    Method oMethod = null;
    int nCurrent = 0;
    InstructionList oList = null;
    this.m_method = RuleUtilities.GetMethod(member);
    if (this.m_method == null)
    return null;
    this.m_fieldsWithDispose.Clear();
    this.m_fieldsOwnedByType.Clear();
    //if (!this.m_method.DeclaringType.IsAssignableTo(SystemTypes.IDisposable))
    // return null;
    //if (RuleUtilities.ExtendsControl(this.m_method.DeclaringType))
    // return null;
    //if (!RuleUtilities.IsDisposeBool(this.m_method) && (!RuleUtilities.IsDisposeMethod(this.m_method) || HasDisposeBoolMethod(this.m_method.DeclaringType)))
    // return null;
    if (this.m_method.DeclaringType.IsAssignableTo(SystemTypes.IDisposable))
    if (RuleUtilities.ExtendsControl(this.m_method.DeclaringType))
    return null;
    if (!RuleUtilities.IsDisposeBool(this.m_method) && (!RuleUtilities.IsDisposeMethod(this.m_method) || HasDisposeBoolMethod(this.m_method.DeclaringType)))
    return null;
    sClassName = m_method.DeclaringType.Name.Name;
    sAssemblyName = m_method.DeclaringType.DeclaringModule.ContainingAssembly.ModuleName;
    MemberList members = this.m_method.DeclaringType.Members;
    for (int i = 0; i < members.Length; i++)
    switch (members[i].NodeType)
    case NodeType.Field:
    Field field = members[i] as Field;
    if (!field.IsStatic && field.Type.IsAssignableTo(SystemTypes.IDisposable))
    this.m_fieldsWithDispose[field] = null;
    break;
    case NodeType.InstanceInitializer:
    case NodeType.Method:
    this.VisitMethod(members[i] as Method);
    break;
    new DisposeVisitor(this.m_fieldsWithDispose).Visit(this.m_method);
    if (this.m_fieldsWithDispose.Count > 0)
    foreach (Field field2 in this.m_fieldsWithDispose.Keys)
    if (this.m_fieldsOwnedByType.Contains(field2))
    string str = RuleUtilities.Format(this.m_method.DeclaringType);
    string str2 = RuleUtilities.Format(field2.Type);
    sLineNumber = field2.SourceContext.StartLine.ToString();
    Problem item = new Problem(base.GetResolution(new string[] { str, field2.Name.Name, str2 }), field2.Name.Name);
    if (bDisplayErrors)
    base.Problems.Add(item);
    else
    if (bShowInAllReport)
    lock (LockClass.objLockAllReport)
    File.AppendAllText(sSingleReportName, string.Format(sSingleReportFormat, sAssemblyName, sClassName, m_method.FullName, sLineNumber, "DisposableObjectsShouldBeDisposed"));
    else
    lock (sLockString)
    File.AppendAllText(sFileName, string.Format(sFormat, sAssemblyName, sClassName, m_method.FullName, sLineNumber));
    else
    if (member.NodeType == NodeType.Method)
    oMethod = member as Method;
    // The below block is to identify if any of the method's class is implemented from the interface IDataReader.
    // If that is the case, the method will be skipped and next method will be picked.
    // Ideally, this should be changed to scanning each class, skipping if it has implemented IDataReader and then
    // scan the methods for proper usage of IDataReader. But due to time constraints, this change is not done
    TypeNode typ = oMethod.DeclaringType;
    InterfaceList intList = typ.Interfaces; // get the list of interfaces of the class and check for IDataReader
    foreach (Interface intf in intList)
    if (intf.FullName.Contains("IDataReader"))
    return null;
    // Start the actual logic
    if (oMethod != null)
    oList = oMethod.Instructions;
    Instruction oInstruction;
    for (nCurrent = 0; nCurrent < oList.Length; nCurrent++)
    oInstruction = oList[nCurrent];
    if (oInstruction.OpCode == OpCode._Locals)
    LocalList oLocalList = oInstruction.Value as LocalList;
    int nCount = oLocalList.Length;
    for (int nIdx = 0; nIdx < nCount; nIdx++)
    if (oLocalList[nIdx].Type.Name.Name == "IDataReader")
    bDataReader = true;
    nDataReaderCount++;
    if (nDataReaderCount > 0)
    if (oInstruction.OpCode == OpCode._Finally)
    bFinally = true;
    if (bFinally)
    if (oInstruction.OpCode == OpCode.Callvirt)
    oCheckLocal = oList[nCurrent - 1].Value as Local;
    if (oCheckLocal != null && oCheckLocal.Type != null && oCheckLocal.Name != null && oCheckLocal.Type.Name.Name != null && oCheckLocal.Type.Name.Name == "IDataReader")
    bDisposedCalled = true;
    //nDataReaderCount--;
    // Microsoft.FxCop.Sdk.Problem oProblem = new Microsoft.FxCop.Sdk.Problem(base.GetResolution(sTemp1), oMethod.Name.Name);
    if (bDataReader && !bDisposedCalled)
    sClassName = oMethod.DeclaringType.Name.Name;
    sAssemblyName = oMethod.DeclaringType.DeclaringModule.ContainingAssembly.ModuleName;
    sLineNumber = nCurrent > 0 && nCurrent < oList.Length? oList[0].SourceContext.StartLine.ToString().Trim() : string.Empty;
    if (bDisplayErrors)
    Microsoft.FxCop.Sdk.Problem oProblem = new Microsoft.FxCop.Sdk.Problem(base.GetResolution(sTemp), sClassName);
    base.Problems.Add(oProblem);
    else
    if (bShowInAllReport)
    lock (LockClass.objLockAllReport)
    File.AppendAllText(sSingleReportName, string.Format(sSingleReportFormat, sAssemblyName, sClassName, m_method.FullName, sLineNumber, "DisposableObjectsShouldBeDisposed"));
    else
    lock (sLockString)
    File.AppendAllText(sFileName, string.Format(sFormat, sAssemblyName, sClassName, oMethod.FullName, sLineNumber));
    return base.Problems;
    private static bool HasDisposeBoolMethod(TypeNode type)
    MemberList members = type.Members;
    int num = 0;
    int length = members.Length;
    while (num < length)
    Method method = members[num] as Method;
    if ((method != null) && RuleUtilities.IsDisposeBool(method))
    return true;
    num++;
    return false;
    public override Statement VisitAssignmentStatement(AssignmentStatement assignment)
    MemberBinding target = assignment.Target as MemberBinding;
    if (target != null)
    Field boundMember = target.BoundMember as Field;
    if (((boundMember != null) && (boundMember.DeclaringType == this.m_method.DeclaringType)) && (assignment.Source is Construct))
    this.m_fieldsOwnedByType[boundMember] = null;
    return base.VisitAssignmentStatement(assignment);
    // Properties
    public override TargetVisibilities TargetVisibility
    get
    return TargetVisibilities.All;
    // Nested Types
    private class DisposeVisitor : StandardVisitor
    // Fields
    private Hashtable m_fieldsWithDispose;
    private Method m_method;
    private Hashtable m_recursionCache = new Hashtable();
    private Hashtable m_variableToFieldMap = new Hashtable();
    // Methods
    internal DisposeVisitor(Hashtable fieldsWithDispose)
    this.m_fieldsWithDispose = fieldsWithDispose;
    public override Statement VisitAssignmentStatement(AssignmentStatement assignment)
    Local target = assignment.Target as Local;
    if (target != null)
    MemberBinding source = assignment.Source as MemberBinding;
    if (source != null)
    Field boundMember = source.BoundMember as Field;
    if ((boundMember != null) && (boundMember.DeclaringType == this.m_method.DeclaringType))
    this.m_variableToFieldMap[target] = boundMember;
    return base.VisitAssignmentStatement(assignment);
    public override Method VisitMethod(Method method)
    this.m_method = method;
    return base.VisitMethod(method);
    public override Expression VisitMethodCall(MethodCall call)
    MemberBinding callee = call.Callee as MemberBinding;
    if (callee != null)
    Method boundMember = callee.BoundMember as Method;
    if (boundMember == null)
    return base.VisitMethodCall(call);
    MemberBinding targetObject = callee.TargetObject as MemberBinding;
    Field key = null;
    if (targetObject == null)
    Local local = callee.TargetObject as Local;
    if (local != null)
    key = this.m_variableToFieldMap[local] as Field;
    else
    key = targetObject.BoundMember as Field;
    if (((key != null) && this.m_fieldsWithDispose.ContainsKey(key)) && (((boundMember.Name.Name == "Dispose") || (boundMember.Name.Name == "Close")) || ((boundMember.Name.Name == "Clear") && boundMember.DeclaringType.IsAssignableTo(FrameworkTypes.HashAlgorithm))))
    this.m_fieldsWithDispose.Remove(key);
    else if ((boundMember.DeclaringType == this.m_method.DeclaringType) && !this.m_recursionCache.Contains(boundMember))
    this.m_recursionCache[boundMember] = null;
    this.VisitMethod(boundMember);
    return base.VisitMethodCall(call);
    Below errors are raised. Please let me know the solution
    1. Error 2 Inconsistent accessibility: base class 'Microsoft.FxCop.Sdk.StandardVisitor' is less accessible than class 'LDOFxCopCustomRules.Rules.Design.DisposableObjectsShouldBeDisposed.DisposeVisitor' D:\LDOFxCopCustomRules\DisposableObjectsShouldBeDisposed.cs 287 23 LDOFxCopCustomRules
    Error 3 'Microsoft.FxCop.Sdk.StandardVisitor' is inaccessible due to its protection level D:\LDOFxCopCustomRules\DisposableObjectsShouldBeDisposed.cs 287 40 LDOFxCopCustomRules
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    //using Microsoft.FxCop.Sdk.Introspection;
    //using Microsoft.Cci;
    using Microsoft.FxCop.Sdk;
    using System.Collections;
    using System.IO;
    namespace LDOFxCopCustomRules.Rules.Design
    class AvoidUnusedParameters : BaseDesignRules
    string sFileName = System.Configuration.ConfigurationSettings.AppSettings["FolderForOutput"] + "\\" + @"AvoidUnusedParameters.Xls";
    bool bDisplayErrors = String.IsNullOrEmpty(System.Configuration.ConfigurationSettings.AppSettings["FolderForOutput"]);
    //string sExceptionLogFileName = @"D:\RTE.txt";
    static string sLockString = "Lock";
    string sFormat = "{0}\t{1}\t{2}\t{3}\n";
    string sAssemblyName;
    string sClassName;
    string sLineNumber;
    private Hashtable m_parameterUsage;
    public AvoidUnusedParameters()
    : base("AvoidUnusedParameters")
    this.m_parameterUsage = new Hashtable();
    if (!bDisplayErrors && !File.Exists(sFileName))
    if (!bShowInAllReport)
    lock (sLockString)
    File.WriteAllText(sFileName, string.Format(sFormat, "Assembly", "Class", "Method (fully qualified name)", "Line number"));
    public override ProblemCollection Check(Member member)
    Method method = member as Method;
    if (!ShouldAnalyze(method))
    return null;
    this.m_parameterUsage.Clear();
    if (CallGraph.FunctionPointersFor(method).Length > 0)
    return null;
    if (method.DeclaringType.IsAssignableTo(SystemTypes.Delegate))
    return null;
    if (RuleUtilities.IsEventHandling(method))
    return null;
    if (RuleUtilities.IsVisualBasicModule(method.DeclaringType.DeclaringModule) && (method.Name.Name == "Dispose__Instance__"))
    return null;
    if (RuleUtilities.HasCustomAttribute(method, SystemTypes.ConditionalAttribute))
    return null;
    for (int i = 0; i < method.Instructions.Length; i++)
    switch (method.Instructions[i].OpCode)
    case OpCode.Ldarg_0:
    case OpCode.Ldarg_1:
    case OpCode.Ldarg_2:
    case OpCode.Ldarg_3:
    case OpCode.Ldarg_S:
    case OpCode.Ldarga_S:
    case OpCode.Ldarg:
    case OpCode.Ldarga:
    Parameter parameter = method.Instructions[i].Value as Parameter;
    this.m_parameterUsage[parameter] = null;
    break;
    sClassName = method.DeclaringType.Name.Name;
    sAssemblyName = method.DeclaringType.DeclaringModule.ContainingAssembly.ModuleName;
    sLineNumber = method.SourceContext.StartLine.ToString();
    for (int j = 0; j < method.Parameters.Length; j++)
    Parameter key = method.Parameters[j];
    if (!this.m_parameterUsage.ContainsKey(key))
    FixCategories breaking = FixCategories.Breaking;
    if (!method.IsVisibleOutsideAssembly)
    breaking = FixCategories.NonBreaking;
    string str = RuleUtilities.Format(method);
    string name = method.Parameters[j].Name.Name;
    Problem item = new Problem(base.GetResolution(new string[] { name, str }), name);
    item.FixCategory = breaking;
    if (bDisplayErrors)
    base.Problems.Add(item);
    else
    if (bShowInAllReport)
    lock (LockClass.objLockAllReport)
    File.AppendAllText(sSingleReportName, string.Format(sSingleReportFormat, sAssemblyName, sClassName, method.FullName, sLineNumber, "AvoidUnusedParameters"));
    else
    lock (sLockString)
    File.AppendAllText(sFileName, string.Format(sFormat, sAssemblyName, sClassName, method.FullName, sLineNumber));
    this.m_parameterUsage.Clear();
    return base.Problems;
    private static bool IsVSUnitTestInitializer(Method method)
    if ((method.IsStatic && (method.ReturnType == SystemTypes.Void)) && ((method.Parameters.Length == 1) && (method.Parameters[0].Type.Name.Name == "TestContext")))
    for (int i = 0; i < method.Attributes.Length; i++)
    AttributeNode node = method.Attributes[i];
    if ((node.Type.Name.Name == "AssemblyInitializeAttribute") || (node.Type.Name.Name == "ClassInitializeAttribute"))
    return true;
    return false;
    private static bool ShouldAnalyze(Method method)
    if (method == null)
    return false;
    if ((method.Parameters.Length == 0) && method.IsStatic)
    return false;
    if (method.IsVirtual)
    return false;
    if (method.IsExtern)
    return false;
    if (method.IsAbstract)
    return false;
    if (RuleUtilities.IsFinalizer(method))
    return false;
    if (method.Name.Name == "__ENCUpdateHandlers")
    return false;
    Module declaringModule = method.DeclaringType.DeclaringModule;
    if (method.Name.Name.StartsWith("__", StringComparison.Ordinal) && RuleUtilities.IsAspAssembly(declaringModule))
    return false;
    if (RuleUtilities.IsISerializableConstructor(method))
    return false;
    if (IsVSUnitTestInitializer(method))
    return false;
    if (RuleUtilities.MethodOrItsTypeMarkedWithGeneratedCode(method))
    return false;
    return true;
    // Properties
    public override TargetVisibilities TargetVisibility
    get
    return TargetVisibilities.All;
    Below Errors are raised
    Error 8 The name 'SystemTypes' does not exist in the current context D:\AvoidUnusedParameters.cs 53 49 LDOFxCopCustomRules
    Error 9 'Microsoft.FxCop.Sdk.RuleUtilities' does not contain a definition for 'IsVisualBasicModule' D:\AvoidUnusedParameters.cs 61 27 LDOFxCopCustomRules
    Error 11 'Microsoft.FxCop.Sdk.BaseIntrospectionRule.FixCategories' is a 'property' but is used like a 'type' D:\AvoidUnusedParameters.cs 98 17 LDOFxCopCustomRules
    Error 12 The best overloaded method match for 'Microsoft.FxCop.Sdk.RuleUtilities.Format(Microsoft.FxCop.Sdk.AttributeNode)' has some invalid arguments D:\AvoidUnusedParameters.cs 103 30 LDOFxCopCustomRules
    Error 13 Argument 1: cannot convert from 'Microsoft.FxCop.Sdk.Method' to 'Microsoft.FxCop.Sdk.AttributeNode' D:\AvoidUnusedParameters.cs 103 51 LDOFxCopCustomRules
    Error 14 The name 'SystemTypes' does not exist in the current context D:\AvoidUnusedParameters.cs 136 55 LDOFxCopCustomRules
    Error 16 The type or namespace name 'Module' could not be found (are you missing a using directive or an assembly reference?) D:\LDOFxCopCustomRules\AvoidUnusedParameters.cs 180 9 LDOFxCopCustomRules
    Error 17 'Microsoft.FxCop.Sdk.RuleUtilities' does not contain a definition for 'IsAspAssembly' D:\AvoidUnusedParameters.cs 181 90 LDOFxCopCustomRules
    Error 18 'Microsoft.FxCop.Sdk.RuleUtilities' does not contain a definition for 'MethodOrItsTypeMarkedWithGeneratedCode' D:\AvoidUnusedParameters.cs 193 27 LDOFxCopCustomRules

    Hi sathishkumarV,
    I am trying to involve someone familiar with this topic to further look at this issue. There might
    be some time delay. Appreciate your patience.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error in Custom Rule EVALUATE_AGENT_VIA_RULE

    Hi,
    I am working on a workflow and have created a custom rule for a workflow. When I simulate this rule, it returns 1 users but when workflow is triggered, Possible agents and Actual agents are blank.
    i am getting error in Rule EVALUATE_AGENT_VIA_RULE
    Resolution of rule AC95000017 for task TS00008267: no agent found
    Workflow WS95000137 no. 000000424779 activity 0000000044 role 'AC95000017'
    No agent found.
    Could someone please explain if I have missed anything while defining.
    Regards,
    Siva

    Hi,
    Document Number and Document Type are the input paramers for my custom Rule ,
    When documents changes Based on condition(RA orVA) Only my workflow needs to be trigger. for that i have provided the condition in Basic data tab of my workflow. after that if it is a RA send a mail vendor (one activity step and i have used this step as Background) then it should go for PR USER  for Approval( for that i have created one Custom Rule and  mentioned in user decision tab).
    I have passed binding form workflow to Rule  Document Number , and Document Type.
    Swhactor table i am using in rule.. am geting the correct USER here when i simulte(test this RULE).
    What is the relation from event contaner to workflow container here?
    Regards,
    Siva

  • Custom Rule - Problem in passin values From Rule Container to WF Container?

    Hi Guys,
    I am having hard time passing values back from my custom rule. I have created a custom rule to determine the agents in PFAC which takes in the Person number as import element of container. It determines the Manager as agent and I am passing Managers Person Number back to workflow. If he dont approve the Request then it will be passed to his boss. In this case I will pass this imported Mangers Person number back to rule so that his boss will be determined as agent. I  have created ZRULE function module. I am passing value back from Rule container to Workflow Container using following code.
    swc_set_element ac_container 'SUPERPERNR'  lf_super_pernr.
    I have created a element SUPERPERNR on rule container and workflow container as well .The problem is in the Rule container I am not able to create SUPERPERNR as export parameter. The tick mark is grayed out and there is no option for setting it as export.
    My question is do I have create a Export element on Rule container or Not? If i just write the code
    ( swc_set_element ac_container 'SUPERPERNR'  lf_super_pernr ) will it set the value in WF container? In my case it is not setting. I have to bind the values from rule container to WF container and if My rule container element is not allowing me to click the tick mark as export how can i pass value of of rule container back to WF Container?
    Please help me guys.
    Thanks,
    Manish.

    Hi Manish,
         Same scenario I have developed in my system. This all steps I did in my system.
    1) Created a Z function module which takes import parameter (Parameter name = 'EMP') in the
        format 'US100123'.
    2) This in turn fetches back the supevisor or boss as an export parameter (Parameter name = 'BOSS') in
         the format 'US100245'.
    3) This function module is attached to a BUS object(SWO1).
    4) While attaching this function module to BUS object you need not do any manual coding it is done
        automatically.
    5) Implement, release and generate this BUS object.
    6) Create a new variable in your workflow (Parameter name = 'ZSUPERVISOR') for storing the value
        which is returned by the Z method.
    7) Create a new task.
    8) Put in your BUS object name, then your Z method name, select background processing checkbox.
    9) Press save, it will ask for transfer of missing elements, select yes.
    10) Then you will see a green button below your Z method name click on it.
    11) Top portion contains your Z method variables, below to it you have the import parameter window in
          this window you should have &EMP& -> &EMP&., below to import parameter window you have
          export parameter window in this window you should have &BOSS& <- &BOSS&. (This is method
          binding).
    12) Now click on enter button then click on back button it will generate the task binding automatically
         just press yes.
    13) Now click on binding exist button.
    14) Here you have the Workflow container variables as well as the system container variables.
    15) In the import parameter window left portion is for your workflow variables and right portion is for your 
          method variables. In my case i had sent workflow initiator and fetched his supervisor. The Import
          parameter binding was &WF_INTIATOR& -> &EMP&. and the export parameter binding part was
          &ZSUPERVISOR& <- &BOSS&.
    16) Save the task and run the workflow.
    Regards.
    Vaibhav Patil.

  • Junk Mail: applying custom rules disables junk database

    Using default settings my junk mail filter works most of the time. But there are several persistent streams of spam that never get recognized as junk, and custom rules would identify them easily. But everytime I try, suddenly all the other junk that was being flagged comes through to my in box. I've selected "Trust junk mail headers in messages" and "Filter junk mail before applying my rules" but it has no effect.
    Also, the minute I add custom rules, "Erase Junk Mail" greys out and cannot be selected anymore. I have to first send my junk box to trash, then erase my trash.
    I've read the help files and they don't address this at all. (Same problem in 10.6)

    Don't have 3.0 on my computer but go to the Mail menu and choose Preferences.
    The click on Junk Mail then on Advanced and see what color is chosen in the setting and the conditions under which it is set.

  • Count digital events on a Counter with pci-6602 with callback on CVI

    Hi,
    I'm using a PCI-6602 card with CVI 8.5 and I need to trig on event.
    On every pulse I received, I need to do some actions like increasing a counter, send a message on Rs232 etc.. I don't want to do any loop checking that the counter value has changed. I would like to use a callback to execute this code only on the edge or counter value event.
    My problem is that I don't know which function can do this. Is there any way to get an event on a pci-6602? 
     Thanks 
    James 
    Solved!
    Go to Solution.

    Hello.
    It's completely possible to create a callback that will allow you to do what you want when a edge will occur on an external signal you define.
    To do this, you can for exemple create a counting edges task that will use one of the 6602 counters,and the set your external signal to be the source of your sample clock.You'll then be able to register a callback with the function DAQmxRegisterSignalEvent, and your callback will be called each time an edge will occur on your specified sample clock source.
    Here's 2 links that explain the events in DAQmx and how to handle them in CVI. The example ReadDigChan-ChangeDetectionEvent.pr that ships with DAQmx examples (Hardware Input and Output<<DAQmx<<Digital measurements) can be very useful to understand how to do. This example creates a signal event callback to detect change detection for digital inputs.
    Regards.

  • Custom Rules upload in 5.3

    Hello,
    I have a proof of concept project for GRC 5.3 implementation and  have configured the GRC RAR as per the config Guide and the Rule upload was done accordingly. In the configrued system, I am seeing the GLOBAL Rule set and all the rules generated against it.
    The real problem started when I started to load the custom Rule Files (BP,Functions.txt etc etc ) for all the custom rules we plan to use. I tried to load the  custom Files from CONFIGURATION tab -> RULE UPLOAD.
    - I am seeing some error messages and now I dont know if I have damaged the existing rules and need to fix the Global itself ?
    - How do I bring in the customized Text Files for Rules ?
    Thanks,
    Farah
    HERE IS A SNAPSHOT OF ERRORS :
    Business process ID: AP00 cannot be deleted because a Function ID exists
    Business process ID: BS00  cannot be deleted because a Risk ID exists
    Business process ID: CA00  cannot be deleted because a Risk ID exists
    Business process ID: CR00 cannot be deleted because a Function ID exists
    Business process ID: EC00 cannot be deleted because a Function ID exists
    Business process ID: FI00  cannot be deleted because a Risk ID exists
    Business process ID: HR00  cannot be deleted because a Risk ID exists
    Business process ID: MM00  cannot be deleted because a Risk ID exists
    Business process ID: PM00  cannot be deleted because a Risk ID exists
    Business process ID: PR00  cannot be deleted because a Risk ID exists
    Business process ID: SD00  cannot be deleted because a Risk ID exists
    Business process ID: SR00 cannot be deleted because a Function ID exists
    Business process upload not complete due to above errors

    Hello Alpesh,
    So if I am understanding it right, I should manually create a new Rulesset from the Rule Architect tab and for the decription call it custom
    and then start uploading the Rules against it .
    I will try it now and see if I can upload it without any errors or warning.
    Thanks,
    Farah

  • How to use customized rule in step mail workflow

    Dear All:
    I have created a customized rule,which is working fine when I simulate it, it is fetching SAP user from a ztable which I created.
    My requirement is how to use the rule in my workflow which have one "send mail" step. As in "send mail" under Receipt Type I cant find rule option.
    Kindly help me.
    Rahul.

    1.Create a method GET_ACTORS using RH_GET_ACTORS,
    2.Create a container element 'Actors' type string with multiline.
    3.Create Task, where you can call the Method GET_ACTORS  and pass the Container values of 'Actors' from Method->Task->Workflow
    4.Create a Step type before creating the Step mail and include the previous Task.
    5.Now you can create the step Mail. Give the Recipient Type as 'Expression'-> Select the Container Element 'Actors' from WF container
    But remember the values should be Passed from the task to Workflow in Binding correctly.
    Regards,
    Sriyash

  • WS20000050 - Custom rule in step 372 - Error during execution

    I have attached a custom rule in Step 372 of workflow WS20000050
    WS20000050 works fine with standard rule (168)
    Custom rule is tested and simulated and it returns the Person 'P' and User 'US'
    WS20000050 genarates fine with no errors (4 information only)
    Errors after execution in SWIA is
    Error when processing node '0000000372' (ParForEach index 000000)
    Error when creating a component of type 'Step'
    Error when creating a work item
    Agent determination for step '0000000372' failed
    Error in resolution of rule 'AC92000002' for step '0000000372'
    Element OBJID is not available in the container
    next node in error
    Work item 000000426198: Object FLOWITEM method EXECUTE cannot be executed
    Error when processing node '0000000372' (ParForEach index 000000)
    I tried to delete OBJID from the binding for the rule but the same error repeats
    Any help is appreciated

    Element OBJID is not available in the container
    Make proper binding from workflow to rule, the value OBJID is not reaching the rule conatiner.
    Error in resolution of rule 'AC92000002' for step '0000000372'
    Rule is not returning any agent chek that?

  • Bug: Edit color by Hexa in Custom Rule...

    Edit color by Hexa in Custom Rule the color has changed when
    change focus...
    The correctly is lock color when entry hexa code to do more
    entrys in others colors...

    Hello,
    I fear you are experiencing the same problem as these users:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=622&threadid =1236424&enterthread=y
    What is your OS and browser? Please reply on the above thread
    so we can consolidate information.
    Thank you,
    Sami

  • Custom rule unexpected behaviour ("check comments demo")

    The standard "check comments demo" of DM3, via Tools > Design Rules > Custom rules.
    That rule fires on all tables. The warning is a bit unusual. It's the name of the rule, but I have been expecting one of the ruleMessage-s that are programmed in the code...
    See the screen [http://img854.imageshack.us/img854/8080/20110530163257001.jpg|http://img854.imageshack.us/img854/8080/20110530163257001.jpg]
    Can you help me fix that?
    Edited by: T. on May 30, 2011 7:55 AM

    I see you have copied text from library and put it as script. Script and library are used/evaluated in different way - function has return statement, last expression is taken as return value for script.
    In your case - you just need to invoke the function defined (you have definition, no usage):
    checkcomments(table);
    Philip

  • Does customized rule work in RDF view model?

    We create a RDF view model from relational tables.
    Based on the mapped triples, we created some customized rules in the user defined rule base.
    Drop the entailment and create the entailment again.
    But query on RDF view model with user defined rule base seems to be nothing happening.
    Could you please confirm if RDF view model support user defined rule base?
    Thanks.

    Inference based on user-defined rules is not currently supported for (non-materialized) RDFView models. If you need such inference, please consider materializing the RDF triples using the SEM_APIS.export_rdfview_model procedure. This procedure would take the invocation-time snapshot of the contents of the tables or views and map to appropriate RDF triples and store those RDF triples into a staging table, which can then be loaded (or bulk-loaded) into a regular RDF model.
    Thanks,
    - Souri.

  • OLSP not working for custom rule criteria to filter BWKEY

    Hi,
    I am using PC10.0.
    I created a rule criteria for BWKEY values and assigned. I assigned it the table T001K and the connector to the target system.
    I then assigned it to custom made OLSP. However when the results come out, it doesn't consider the values I entered within the filter for BWKEY.
    The filters for the rule criteria that I created don't work. However the filters for the SAP provided rule criteria; 'COMPANY CODE' works.
    The tables in my configurable subscenario include MBEW and T001K, both of which have BWKEY. The business rules don't use the same filters as that of the OLSP.
    I can't find any error. The OLSP filter just doesn't want to work when I run the job. Certain BWKEY records within MBEW remain within the job results.
    I've attached images of the rule criteria.
    What could be the problem and how can I resolve it?
    Thank you.

    Based from what I've found, OLSP seems to only work for:
    Sales Org
    Plant
    Company Code
    Purchase Org.
    Is there an SAP note that can be used to get OLSP created from custom rule criteria to work in PC10.0?

  • Udev problems still - 060-3 won't process my custom rules

    Following the problems with 060-1, I went back to 058-4 - everything was fine, as expected. When I saw 060-2 and then 060-3 in current, I figured I'd give it another shot. It looked fine initially i.e. it didn't break my network. However, none of my custom rules for USB devices are working under 060-3.
    So I'm back to 058-4 - and everything's fine again.

    i have two rules files in /etc/udev/rules.d :
    00-perso.rules
    10-udev.rules
    all my usb stick rules are in my perso files.
    even if the pero file should be treated first, my usb sticks and ipod were not detected and treated according to my perso rules.
    I had to comment out most of the scsi rules in 10-udev.rules for it to work:
    # scsi block devices
    #BUS="scsi", KERNEL="sd[a-z]", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    #BUS="scsi", KERNEL="sd[a-z][0-9]*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    #BUS="scsi", KERNEL="sd[a-i][a-z]", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    #BUS="scsi", KERNEL="sd[a-i][a-z][0-9]*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    #BUS="scsi", KERNEL="s[grt][0-9]*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    #BUS="scsi", KERNEL="scd[0-9]*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    #BUS="scsi", KERNEL="st[0-9]*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    #BUS="scsi", KERNEL="nst[0-9]*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", SYMLINK="%c{1} %c{2}"
    only after that my usb sticks were detected and processed by udev with my own rules.
    I just installed ARCH for the first time a few days ago so i don't know if this problem was due to the new udev version or not.
    hope this helps

  • GRC PC 2.5 creation of customized rules

    Dear GRC gurus,
    I have been told that GRC PC 2.5 is not ready for creating own customized rules.
    however I can see that the GRC PC 2.5 function "Automated test cutomizing" is there just to do so.
    also, GRC PC 2.5. manuals describe the process to create own rules, via R/3 Query functionality.
    I would like to know at what extent is possible to create own customized rules (beyond those provided in the standar Business Content). And if possible, please give me an example of ad-hoc rules that you have created.
    Many thanks in advance for your comments

    HH,
    We should distinguish between pre-delivered rules and rules pertaining to SAP Query, ABAP or non-SAP queries.
    There are 104 pre-delivered rules delivered with PC 2.5. Pre-delivered rules have a fixed set of selection criteria that cannot be extended or replaced with custom criteria.  In PC 3.0 you will be able to configure and customize these rules but not in PC 2.5.  Custom rules can be built for all the other types. 
    You configure rules in PC 2.5 to run queries or ABAP programs in backend systems.  We haven't implemented customized rules yet, but we've played around with them a little.  You can set a rule in PC 2.5 to run a query on a backend system and return the results for analysis to PC 2.5.  If the return value is above a certain value, below a certain value or equals a certain value, based on the rule criteria, it would pass or fail the test. 
    I hope that helps.
    Matt
    I hope this helps.
    Matt

Maybe you are looking for