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.

Similar Messages

  • Custom Rule Rename in SCOM 2012

    Hi. I have renamed a rule I set up and it shows the new name in Rules, but when it alerts the 'name' field in active alerts still seems to show the old name. If I want it to show the new name am I guessing that I would have to delete the rule and recreate
    it?

    Hello, No you don't have to recreate the rule. In the console, chose authoring, find your rule, right click on your rule and chose properties. Select configuration and under responses select Alert, and chose edit and change the Alert Name.
    Good Luck.
    Rickard

  • How to create Profile Based Rule in Endeca Studio Developer

    Hi,
    Can anybody tell me how to create Profile based rule in the Endeca Studio Developer. and how to fecth the data in the JSP. what are the parameter required to pass in the ENEQuery
    Thanks
    Shailesh

    I use visual studio 2012.
    I dont see rule set editor which can help me create busineesss rule.
    Where can I find it?
    Hi Rajesh,
    If you want to learn more information about RuleSet Editor in .net framework 4.5, check out https://msdn.microsoft.com/en-us/library/ee960221(v=vs.110).aspx
    for more information. 
    Best regards,
    Angie
    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.

  • 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.

  • 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

  • Migrate WWI and Expert Rules to new server

    Hello,
    Does anyone have any "best practice" document or information related to migrating WWI and Expert rules from an existing server to a new server?  The "cookbook" provided in SAP Note for WWI installation does not mention anything regarding "re-install" or "migration.
    Thanks in advance.

    Hello Thomas,
    I do not have a document available for you, but I would do it like this:
    Make sure you have the same Word Version installed on both PCs
    Make sure the word settings are the same (Trusted Locations / Macro Security etc.)
    Make sure you have the same printers/printer drivers and default printer definied on both PCs
    Copy WWI and Expert Folder from one PC to the other to the same location
    Make sure you have the same PATH Variables defined on both PCs
    Makre sure DCOM settings are the same of MS Word and Adobe
    If you send PDFs make sure Adobe Reader and the tool you use to create PDFs is installed on both PCs the exact same way
    SetUp the Windows Services for EH&S Management Server, WWI and Expert on the new server exactly the way they have been on the old server.
    If your new PC has a different OS or newer Office Version I would do a complete new installation via the EH&S Management Server / CGSADM. Make sure to copy your Rules files and Graphics from the old PC to the new PC.
    Hope this helps
    Mark

  • Business rule in essbase studio

    Hi Experts,
    Plz tell me if i can write business rules in Essbase Studio 11.1.2 ??
    Thanks in advance!
    Regards,
    Lolita

    So your SQL is taking the absolute value of the dates (first assigned to - created) and then multiplying it by 24? And if there's a null, value it with a zero?
    In a BSO database, the formula for this would look like:
    ReportedAssignedHRs = @ABS((FIRST_ASSIGNED_TO_FCR_GMT_DATE - UNIT_GMT_CREATED_DATE) * 24) ;
    That of course assumes you load the first assigned to and the created members to the outline.
    You could stick this as a member formula in the outline (and then you wouldn't technically need the "ReportAssignedHRs =" bit although you can put it in) or have it as part of a calc script.
    In an ASO database, the formula would be in the outline (I suspect it makes sense there in a BSO database as well, but maybe not if summing the dates doesn't make sense):
    Abs(([FIRST_ASSIGNED_TO_FCR_GMT_DATE] - [UNIT_GMT_CREATED_DATE]) * 24)
    In both technologies, if there's no value, by default it's null or missing, so there's no need to put in a null value via an IF or CASE statement.
    Regards,
    Cameron Lackpour
    Edited by: CL on Aug 31, 2011 9:39 AM
    Whoops, should add you can now put the ASO formula into a sort of, kind of calc script and the Missing or Null value in Essbase usually gets reported as Null, not zero. You could force a zero but why?

  • 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

  • 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.

  • 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.

Maybe you are looking for

  • Trouble getting the default  user directory under Windows XP

    I m trying to get the default user directory under windows XP SP3. To do so, I'm using System.getProperty("user.home"); I was expecting to get a path like "C:\Documents and Settings\user", nstead of that I get "C:\Documents and Settings\user\Destop".

  • Query time out

    Hi, My application is hosted on http://htmldb.oracle.com/. One of my page always gets timed out recently. I have query like the following: 1. "bugcritc" is a table stored some bugs I cared select bug_num from bugcritc -- 0.03 sec, 65 rows returned 2.

  • Integrate Standalone Proxy into EJB-Module

    Hello, I want to integrate a webservice-call into a standalone EJB-Method. Therefore I have created a standalone proxy DC and added public parts of type "assembly" and of type "compilation". After creating a DC of type EJB-Module I reference the stan

  • InDesign vs. Illustrator

    My company has Illustrator but I got a request for InDesign.  From the product comparision, it seems like Illustrator does everything InDesign does.  Can Illustrator be used in lieu for InDesign?

  • 47ZV650U - Screen Visible on the top only

    I have a 47ZV650U and there is a horizontal line that separates the top 1/8 of the screen from the bottom. Above the 1/8 portion, the screen is active and working properly. On the bottom of the horizontal line, the screen is gray (black or blank) wit