Complex Conditions in Filters?

Could I code any complex regex conditions in a content filter beyond what the rules editor allows me to do?
For example, since now i know how to use a dictionary to lookup authorized senders for encrypting with CRES (thanks to an earlier responder), I need a condition such as this:
IF (msg flagged AND sender-from dictionary)
ENCRYPT
ELSE IF (msg flagged AND sender-not-in-dictionary)
BOUNCE with error to sender
ELSE
SEND UNENCRYPTED
Any suggestion?
Thanks.
Sent from Cisco Technical Support iPhone App

Hello John,
"Could I code any complex regex conditions in a content filter beyond what the rules editor allows me to do?"
No you can't, GUI or CLI the content fitlers do not allow for complex regex.  However, the CLI's message filters allow for 'else' and 'if not' statememts.  Unlike content filters,  message filters are not directional (inbound vs. outbound emails), so you have to define a direction for them.  If you do not,  the appliance will start to look at traffic coming from the internet and leaving for the internet.  This will increase load on the unit, as it has to look at all traffic.
The best way to accomplish this task would be via  an LDAP membership profile, and a special outbound mail policy, and your defuault catch all outbound mail policy.  A user can only match one mail policy, even if they exist in more than one. 
Steps I would take to  accomplish this task:
Most likely you already have an LDAP system,  this repository has all your users, and they are most likely already in buckets/groups.  
IT Admins
Accounts
Business
Guests
etc...
EncryptEmail -- new group
1.  you will need an LDAP profile on your appliance (system administration-- LDAP ) ## will control group membership queries, mail from, authentication .. among many other
2. create a group in your LDAP system called -- "EncryptEmail"  ##  -- name is yours to define,  add all your  users allowed to encrypt to the group.
2A-- create an LDAP group profile 'ldap_server'
2B --Create an LDAP group query 'ldap_server.group'
3. create an  outbound Encrypt filter that looks for the encrypt flag set to  \[SEND SECURE\] ##-- single escapes-- content filter will handle the second escape, or what ever flag you are actually looking for.
4. create an outgoing mail policy that will be for your 'ldap_server_profile.group-query.EncryptEmail' ###as people get added or removed,  your LDAP system membership will be altered'  you don't have to touch the mail policy again
(mail policies-- outgoing mail policies ADD LDAP Group Query  -- select your group query, and add the name of your group, example is using "EncryptEmail"),  when you click add it will look something like this
ldap_server.group-query.EncryptEmail
5. now activate your  -outbound Encrypt filter- only on the  your outbound mail policy that has the LDAP group on it.
NOTE:
Encryption will only be done for the people that match on your LDAP outbound mail policy, and have their subject flag on. Other traffic from these users will also match, but will not be encrypted.  Since content filters can be activated on different mail policies, you can also activate any other policy type content filter you have for all your users on this outbound policy too. By default it will enherit AS and AV Scanning, so you should not have to add them. if you have done something that stops this, then, please enable AS and AV on the new mail policy too.
Now to deal with the users that are not in your encrypt LDAP group,  and flagged/subject thier email for encryption 
\[SEND SECURE\]
6. on your default outbound mail policy,  create an new outbound mail content filter that has one conditions
6A Condition:  "looks for your encrypt flag/subject"
6B  First Action: if the flag/subject is found:  Notify action -- notify the sender and the administrator--
6C Second Action: if the flag/subject is found:  Bounce action --  this is final,  and the email will be returned.
7.  active your new content filter on the default 'catch all' outbound mail policy.
Submit and commit all your work a long the way.
you are done.  I strongly advice you to test the steps with a couple of testing mail policies that only have IT guys in the them.  once working, you can push the work to prod.
If you still want to do this via a message filter,
CLI -- filters-- new
you can use something like this:
====================================================
To_encrypt_NOT_encrypt:
if ((recv-listener == "InboundMail") AND (mail-from-dictionary-match("users_allow_encrypt")) AND (subject == "\\[SEND SECURE\\]"))
encrypt('encryption_profile');
else {
if ((subject == "\\[SEND SECURE\\]") AND (NOT mail-from-dictionary-match("users_allow_encrypt")))
notify("[email protected], $EnvelopeSender");    
bounce();
====================================================
cheers,
-Alvaro

Similar Messages

  • Can't find FILTER CONDITION for filters or Function_Name for Functions

    In the Data Warehouse 11gr1 views all_iv_xform...
    I can't seem to find the Filter Conditions for filters and function name for functions that are called.
    I have looked at the other views in the documentation for the API's but can't seem to find this information.
    Any body have any ideas where this information is?
    thanks
    greG

    select map_component_id, position, source_parameter_name
    from ALL_IV_XFORM_MAP_PARAMETERS
    where map_component_id in (
    SELECT map_component_id
    FROM ALL_IV_XFORM_MAP_COMPONENTS
    WHERE MAP_ID IN (
    select MAP_ID
    from ALL_IV_XFORM_MAPS
    where MAP_NAME = :p_map_name
    AND OPERATOR_TYPE = 'Filter'
    Using map_component_id and position from above query you can see your filter condition defined in property_value:
    select map_component_name, property_name, property_value
    from ALL_IV_XFORM_MAP_PROPERTIES
    where map_component_id = :p_comp_id;

  • Complex condition in process flow transition

    From a mapping i have three outgoing transitions:
    1: "KM_UTIL_PKG"."GETTESTMODE"() = 0
    2: "KM_UTIL_PKG"."GETTESTMODE"() = 1
    3: unconditional
    the process flow validates ok, deploys ok but when it is executed the error message is :
    ORA-06550: line 1, column 1085: PLS-00201: identifier 'KM_UTIL_PKG.GETTESTMODE' must be declared ORA-06550: line 1, column 1058: PL/SQL: Statement ignored.
    Although the function is there.
    What am i doing wrong ?. Has anyone an example of the expected syntax in the transition condition editor > complex condition window ?
    Ron

    Try giving just = 0 and = 1 without the function call, as the function call is already appended in the where clause.
    For example I was able to make it work by just giving IS NULL and IS NOT NULL.
    Also there is VALIDATE button within the window where we give the complex condition. Try to validate the condition there itself.
    Best,
    Manohar

  • Complex conditional mappings - XSLT constructs

    Hi,
    Please confirm if following such complex conditional mappings are possible using
    BPEL Jdev and how can these be achieved
    I could not find anything in XSLT constructs of BPEL or either tutorials which
    would help me in ascertaining if the following types are possible in BPEL.
    the items that fall before "_" below are the elements
    suffixes source and target indicates that elements are of target or source
    xsd
    constants are indicated by _constant
    if (x_source=c1_constant or x_source=c2_constant)
    then
    b_target=(b_source "concatenated with" d_source)
    else b_target=b_source
    if (a_source>a1_constant)
    and
    if (x_source!=c1_constant or x_source!=c2_constant)
    then
    a_target=a_source
    We are planning to Use BPEL/B2B for EDI. Our current EDI systems have such kind
    of complex mappings requirements where those are resolved by EDI tool, wanted
    to check if same is possible in BPEL and how can this be achieved
    Thanks
    Sachin Sutar

    Of course, use an XSL to transform from source XSD to destination XSD.
    Check out http://www.w3.org/TR/xslt to see conditional processing in XSLT. You may either use xsl:if and xsl:choose for conditional processing in XSL.

  • Complex condition in OWB

    Hi ,
    I have designed the process flow where i have a plsql transformation which is further connected to route activity, route has to take decision if the plsql transformation value is 'yes' then run the mapping else route the other flow which will run the status procedure to log the message of the end of activity.
    procedure------route----1 to end the activity and log 2, run the mapping based ok plsql return value.
    I tried to use complex condition but it says the return value should be declare.
    how can i use the retun value in complex condition

    If you configure the process flow and go to Transformation Activities and your PLSQL transformation, keep expanding under Execution Settings there is a property 'Use return as Status', by default this is false, change to true and you can use a PLSQL function return value as a value to test in expressions.
    Cheers
    David

  • [OWB 10g] Complex Condition in a transition

    Hi all,
    I want to do a complex condition from my "AND1" component to my "END_SUCCESS".
    Here is a picture of my problem :
    [http://craweb.free.fr/owb/flux.png]
    In fact, I want to do this condition (you can see it in the previous picture) :
    IF after the "AND1" component the number of warnings <= 50 THEN
    redirect to "END_SUCCESS" (equivalent to "SUCCESS" enumerated condition)
    ELSIF after the "AND1" component it's "SUCCESS" THEN
    refirect to "END_SUCCESS"
    ELSE
    redirect to "END_WARNING"
    END IF;
    I have a problem with "NUMBER_OF_WARNINGS" variable and I don't know how to write my complex condition.
    Please, is anyone can help ?
    Regards,
    VD.
    Edited by: user7960834 on 24 juin 2009 00:36

    I have found the solution by creating a function.
    Thanks for help anyway.

  • Set complex condition of process flow transition by OMB skript

    Hi,
    i would like to set a complex condition for a process flow transition with OMB+.
    If i use:
    OMBALTER PROCESS_FLOW 'somename' ADD TRANSITION 'yyy' FROM ACTIVITY 'a' to 'b' SET PROPERTIES (TRANSITION_CONDITION) VALUES ('some complex condition')
    the skript sets the condition but the radiobutton within the transition condition editor still point to 'Enumerated Condition' and the complex condition editor sheet, where my condition should be printed is empty. But the Object details within the Process editor shows my condition correct.
    We use 11gR1 11.1.0.7.0 (OWB & DB).
    Has anybody a clue if i am able to set the transitioncondition to COMPLEX ? Or is it a bug ?
    Your Help is appreciated, thanks
    Thomas

    Hi Thomas
    You use the property COMPLEX_CONDITION on the activity for complex transition condition expressions.
    Cheers
    David

  • How to code complex conditions

    Hi Everyone,
    First, please forgive if I don't use programming terminology correctly, I am a beginner with no background in informatics.
    My question will be a general one: What is the good approach to code complicated conditions?
    I have a good example to start with which is actually a concrete task that I need to do in my small application:
    TODO: Shorten/abbreviate a person's full name to fit in to a 16 characters.
    For example: Johnathan Necromancer --> J Necromancer
    There are many possibilities how to do it based on the length of the first, last and middle names and there is an order of preference for these solutions.
    So if possible abbreviate only the first name like above; if it's still too long then then leave the space out, and so on. These would be the preferences demonstrated with examples:
    1. J L Smith
    2. JL Smith
    3. JLSmith
    4. John Languely S
    5. John Lang B S
    6. John L S
    7. JohnLS
    8. J L S
    9. JLS
    How to code it? With nested if -s or with if-else blocks or in an other way?
    First I did it with nested if -s, but it was kind of mess after a while, so the most straightforward way for me was to do it as follows:
    (Simply 'calculate' the abbreviated names in the preferred order and return if it fits into the 16 characters.)
    if (displayName.length() > 16) {
                   String[] dn = displayName.split("\\s+");
                   String lName = dn[dn.length - 1];
                   StringBuffer dName16 = new StringBuffer();
                   // J L Smith
                   dName16 = new StringBuffer();
                   for (int i = 0; i < dn.length - 1; i++) {
                        dName16.append(dn.charAt(0) + " ");
                   dName16.append(lName);
                   if (dName16.length() <= 16){
                        return new String(dName16);
                   // JL Smith
                   dName16 = new StringBuffer();
                   for (int i = 0; i < dn.length - 1; i++) {
                        dName16.append(dn[i].charAt(0));
                   dName16.append(" " + lName);
                   if (dName16.length() <= 16){
                        return new String(dName16);
                   // JLSmith
                   dName16 = new StringBuffer();
                   for (int i = 0; i < dn.length - 1; i++) {
                        dName16.append(dn[i].charAt(0));
                   dName16.append(lName);
                   if (dName16.length() <= 16){
                        return new String(dName16);
    //more code..
    I would like to know how to approach these kind of situations effectively and clearly in the least error prone way. How to code complex conditions? Is there any book or theory about it?
    I am not sure it is clear what I am asking, but I will follow up with more description on what I mean later. But please comment, ask, advice anything in the meantime - I would really appreciate any help with this.
    Thank you in advance!
    lemonboston                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    So this would be it. What do you think, what should I improve?
    public class Main {
         public static void main(String[] args) {
              String[] names = { "Bud Spencer", "Matthew MacFadyen",
                        "Juan Carlos Santiago Sanchez Estrella Ramirez",
              "Maria De Dios Otero" };
              for (String n : names) {
                   System.out.println(n + " -->\n" + abbreviateName(n, 16) + "\n");
         private static String abbreviateName(String fullName, int maxLength) {
              if (fullName.length() <= maxLength) {
                   return fullName;
              } else {
               * preferred formats for abbreviation:
               * J L Smith
               * JL Smith
               * JLSmith
               * John Languely S
               * John L S
               * JohnLS
               * J L S
               * JLS
               * if none works, return the first maxLength characters
                   String[] nameArr = fullName.split("\\s+");
                   String lastName = nameArr[nameArr.length - 1];
                   ArrayList<StringBuffer> abbreviatedList = new ArrayList<StringBuffer>();
                   StringBuffer abbreviatedName;
                   // J L Smith
                   abbreviatedName = new StringBuffer();
                   for (int i = 0; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr.charAt(0) + " ");
                   abbreviatedName.append(lastName);
                   abbreviatedList.add(abbreviatedName);
                   // JL Smith
                   abbreviatedName = new StringBuffer();
                   for (int i = 0; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0));
                   abbreviatedName.append(" " + lastName);
                   abbreviatedList.add(abbreviatedName);
                   // JLSmith
                   abbreviatedName = new StringBuffer();
                   for (int i = 0; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0));
                   abbreviatedName.append(lastName);
                   abbreviatedList.add(abbreviatedName);
                   // John Languely S
                   abbreviatedName = new StringBuffer();
                   for (int i = 0; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i] + " ");
                   abbreviatedName.append(lastName.charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // John L S
                   abbreviatedName = new StringBuffer();
                   abbreviatedName.append(nameArr[0] + " ");
                   abbreviatedName.append(lastName.charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // JohnLS
                   abbreviatedName = new StringBuffer();
                   abbreviatedName.append(nameArr[0]);
                   for (int i = 1; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // J L S
                   abbreviatedName = new StringBuffer();
                   for (int i = 1; i < nameArr.length - 2; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0) + " ");
                   abbreviatedName.append(lastName.charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // JLS
                   abbreviatedName = new StringBuffer();
                   for (int i = 1; i < nameArr.length - 1; i++) {
                        abbreviatedName.append(nameArr[i].charAt(0));
                   abbreviatedList.add(abbreviatedName);
                   // return the first one that fits in to maxLength
                   for (StringBuffer shortName : abbreviatedList) {
                        if (shortName.length() <= maxLength) {
                             return new String(shortName);
                   // If none of the above works, simply keep the first maxLenght character               
                   return fullName.substring(0, maxLength - 1);

  • How deploy a transition using complex condition by OMB+?

    Hello,
    I can’t deploy a process flow package using OMB+
    But, it doesn't work because of a transition with complex condition.
    I will try to explain my problem on the best :
    I am working in OWB 10g R2.
    I developped several process flow of this modele:
    - I have a package module named : PFL_MODULE
    - In this package module, I have created four process flow package :
    PPK_ODS
    PPK_DWH
    PPK_DMT
    PPK_SCH
    In each package I have three or four process flow.
    To deploy it, I use OMB+
    I created this script :
    +# move to apropriate context+
    OMBCC '/$project_name/PFL_MODULE'
    +puts "Current context is [OMBDCC]"+
    +puts ""+
    +# Connect to the default control center+
    +puts "Connect to the default control center"+
    +puts ""+
    +OMBCONNECT CONTROL_CENTER+
    +puts "Deploying workflows :"+
    OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'PROCESS_FLOW_PACKAGES' \
    ADD ACTION 'PPK_ODS' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') \
    SET REFERENCE PROCESS_FLOW_PACKAGE 'PPK_ODS' \
    ADD ACTION 'PPK_DWH' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') \
    SET REFERENCE PROCESS_FLOW_PACKAGE 'PPK_DWH' \
    ADD ACTION 'PPK_DMT' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') \
    SET REFERENCE PROCESS_FLOW_PACKAGE 'PPK_DMT' \
    ADD ACTION 'PPK_SCH' \
    SET PROPERTIES (OPERATION) VALUES ('CREATE') \
    SET REFERENCE PROCESS_FLOW_PACKAGE 'PPK_SCH' \
    OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'PROCESS_FLOW_PACKAGES'
    OMBDROP DEPLOYMENT_ACTION_PLAN 'PROCESS_FLOW_PACKAGES'
    +puts [OMBCOMMIT]+
    +puts "Workflows are deployed"+
    when I tested it, everything worked !
    But, recently, I had to modify one of my process flow. This process flow is in PPK_SCH package (and it named PRC_SCH_FULL)
    I had to change a transition using an enumerated condition (SUCCESS, ERROR) by a transition using a complex condition.
    My condition is very simple, I test one of my variable ("PRC_SCH_FULL"."VAR_END" =1)
    When I deploy my new process flow by the control center in OWB it works.
    But, when I deploy it by my script I have an error message :
    *OMB05602 : An unknown Deployment error has occured for Object Type DeploymentContextImpl.generate WBGeneratedObject[] is null or length 0 for PPK_SCH.*
    I'm sure the problem is in transition because when I put an enumerted condition back, it works again.
    So, How can I do to deploy my process flow package that contains a process flow with complex condition in a transition?
    thank you in advance for any suggestions.
    Jue.
    Edited by: Jue on 20 juil. 2011 05:06

    If I get what you said, then you have 2 enumerated and one complex condition?
    Rules for Valid Transitions
    For a transition to be valid, it must conform to the following rules:
    All activities, apart from START and END, must have at least one incoming transition.
    Only the AND and OR activities can have more than one incoming transition.
    Only a FORK activity can have more than one unconditional outgoing transition.
    A FORK activity can have only unconditional outgoing transitions.
    An activity that has an enumerated set of outcomes must have either an outgoing transition for each possible outcome or an unconditional outgoing transition.
    An activity can have zero or more outgoing complex expression transitions.
    An activity, with an outgoing complex expression transition, must have an unconditional outgoing transition.
    An END_LOOP transition must have only one unconditional transition to its associated FOR_LOOP or WHILE_LOOP activity.
    The transition taken by the exit outcome of a FOR_LOOP or WHILE_LOOP must not connect to an activity that could be carried on as a result of the "loop."

  • How can I have complex arrangement of filters?

    I would like to separate my incoming mail
    first those messages where [from] is in any of my address lists.
    I would then want to apply a set of filters sorting them into folders with the residual going into a separate folder.
    Then I would like to have those messages go through the junk filters and another set of filters with the residual going into a separate folder.
    I cannot find how to specify that is message is in ANY of my address list. I work around that by having several filter.
    I cannot find how to specify ELSE.
    this is what I would like to do.
    [From] [Is in my address book folders] [collected addresses] ==> set of filters A
    [From] [Is in my address book folders] [personal addresses] ==> set of filters A
    From] [Is in my address book folders] [discussion lists] ==> set of filters A
    [From] [Isn’t in my address book folders] [collected addresses] ==> set of filters B
    [From] [Isn’t in my address book folders] [personal addresses] ==> set of filters B
    From] [Isn’t in my address book folders] [discussion lists] ==> set of filters B
    Set of filters A
    A1 ==> Family folder
    A2 ==> Travel offers folder
    A3 ==> discussion and news folders
    A3 ==> projects folders
    A4 ==> Business folders
    A5 ==> Human rights folder
    A6 -auto answer on vacation ==> trash
    A7 out of office ==> trash
    else ==> known sender folder
    Set of filters B
    Junk filters
    B1 common scams1 ==> trash
    B2 common scams2 ==>trash
    Else ==> suspicious email folder.

    Thank you for your help.
    I am posting this workaround for your points 2,3, and 4. In case it might help others.
    The '''order of the filters can work as an implicit ELSE''' since each subsequent filter only works on messages that have not been moved to another folder.
    # create a stack of filters that meet conditions you can specify and that move messages to specific folders. This can be many filters that are executed in the order in the list.
    # create a filter with as many lines as necessary to move residual messages that are from senders in your address books. I call this folder "known senders". In my situation that is a filter with 4 conditions joined by OR. (I.,e, that filter is an ANY filter.
    # '''create a psuedo-ELSE''' filter by testing whether the subject in residual messages is a very improbable string like if subject isn't '~@#$%^&*()(*&^%$#@!' move it to a specific folder. I call that folder "suspicious mail"

  • Can we have more than 2 "and/or" conditions in filters in advanced mode in power view?

    Hi,
    I need to check 3 conditions in filter in advanced mode in power view. Is it possible out-of-box. Can we customize the advanced mode filters or do we have some configurable options for same.
    Thanks,
    Bhawna.

    Hi Bhawna,
    I'm the Dev Owner for the filtering experience in Power View.  Sorry it took so long for me to reply.
    In the Power View Advanced Filter cards, you cannot currently add more than two conditions.  What Rhys meant about having as many AND filter conditions as you like is that because all of the filter cards are AND-ed together, you can effectively have
    more than two filter conditions by adding multiple 'LastModifiedDate' cards.
    Unfortunately this won't help you if you're looking to OR more than two conditions.
    Adding the ability to have more than two conditions in a single Advanced Filter card is something that is near and dear to my heart, but it does open questions of nesting and grouping which would need to be addressed first in order to be able to offer a
    complete solution.
    Hope this helps,
    Jeremy

  • Complex model-driven filters

    Hello,
    I'm working on an application using the model-driven LCDS tools. The initial proof of concept has been fairly successful but I'm running into problems trying to customise the java assemblers which are generated from the model.
    For certain entities I need to filter the "fill" results based on the authenticated user's permissions and a few other tables. For various reasons the logic required to perform this filtering is rather complex and can't be carried out using JPQL. As far as I know there is no way to do the equivalent of a hibernate "named query" which seems to leave me with three options:
    Customise the assembler (derived from FiberAssembler) and query the database myself from within the "fill" method. I haven't found any examples which override the fill method, I've tried it myself but have had difficulty correctly constructing the final object graph (particularly the lazy loaded properties)
    Filter the objects in the derived assembler after they have been returned by the base FiberAssembler. I'd rather not have to do this, also the returned objects are of a generated type which makes them hard to work with.
    Scrap the model driven approach and start again using HibernateAssemblers (I could do what I need using a named query)
    Can anyone provide any advice or examples of overriding the FiberAssembler "fill" method for this sort of complex filtering?
    Thanks,
    Ben

    Hello,
    I'm working on an application using the model-driven LCDS tools. The initial proof of concept has been fairly successful but I'm running into problems trying to customise the java assemblers which are generated from the model.
    For certain entities I need to filter the "fill" results based on the authenticated user's permissions and a few other tables. For various reasons the logic required to perform this filtering is rather complex and can't be carried out using JPQL. As far as I know there is no way to do the equivalent of a hibernate "named query" which seems to leave me with three options:
    Customise the assembler (derived from FiberAssembler) and query the database myself from within the "fill" method. I haven't found any examples which override the fill method, I've tried it myself but have had difficulty correctly constructing the final object graph (particularly the lazy loaded properties)
    Filter the objects in the derived assembler after they have been returned by the base FiberAssembler. I'd rather not have to do this, also the returned objects are of a generated type which makes them hard to work with.
    Scrap the model driven approach and start again using HibernateAssemblers (I could do what I need using a named query)
    Can anyone provide any advice or examples of overriding the FiberAssembler "fill" method for this sort of complex filtering?
    Thanks,
    Ben

  • Complex conditional sum formatting

    I am working on a document that breaks down backpacking supplies per camper.  I have a formula that allows me to add pounds and ounces, however I want to add a conditional sum so that under total weight I can have Camper 1, 2 and 3’s total weight.  Because of the formula adding lbs and oz I can’t get the conditional sum formula to work. 
    Formula for adding lbs and oz: =INT((SUM(C2:C30)*16+SUM(D2:D30))/16)&" lbs. "&MOD((SUM(C2:C30)*16+SUM(D2:D30))/16,1)*16&" oz."
    Sample:

    Do all the calculations using a single unit. Ounces.
    Add a column after column D to convert each pair of numbers into ounces only.
    E2: =16*C+D
    Fill down to E9
    Place the weight summaries onto a separate table. This allows you to reference whole columns without running into "own cell" errors.
    If desired, convert the totals back to pounds and ounces using Quotient and MOD.
    Formulas on the summary table:
    B2: =QUOTIENT(SUM(Table 1 :: $E),16)&" lb. "&MOD(SUM(Table 1 :: $E),16)&" oz. "
    B3, filled down to B4: =QUOTIENT(SUMIF(Table 1 :: $F,A3,Table 1 :: $E),16)&" lb. "&MOD(SUMIF(Table 1 :: F,A3,Table 1 :: $E),16)&" oz. "
    Regards,
    Barry

  • How to create multiple idocs based on complex condition

    HI Users,
    my scenario is jms(xml file) to idoc. for each file have multiple records for each record i need to create multiple idocs.
    source structure:
    <lineitem>
    <student sid="cid">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="char">147</reference>
    </hreference>
    now condition is One input message must create only one output message for each unique  rtype="number" and sid="cid" combination.
    for example
    1. rtype="number" and sid="cid" the value combination means 123456 for this one idoc
    2.  rtype="number" and sid="cid" the value combination means 789456 for this one idoc
    --> the below file shows with out sid="cid"
    <lineitem>
    <student sid="abc">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="number">147</reference>
    </hreference>
    in this case we have to consider only rtype="number" so here we need to create  3 idocs.
    Could anyone help me in this regard.
    Thanks in advance

    Hi Swathip,
    Change the occurence of the IDoc to "unbounded", so that multiple IDocs can get create
    Try with below logic
    If (SID = "CID")
    Then
         If(rtype = "number")
              concat(student,reference ) ---> removeContext ---> Idoc          
    Else
         rtype ---> removeContext ---> Idoc
    If combination of unique  student and reference can occur more than once in the XML, use sort command and splitByValue (Value Change)
    Edited by: chandra shekhar on Jul 3, 2011 12:53 PM

  • Complex Condition Type for Discount Needs Assistance

    Is it possible to have this kind of requirements ?
    No of cases               Powder Tea/Fruit                            
                                Base    Cash    Total           
    1-9 cs                   10.00   10.00   20.00           
    10-19 cs               20.00   10.00   30.00            
    20-49 cs               25.00   10.00   35.00         
    50 cs & above       30.00   10.00   40.00          
    No of cases                Water  
                              Base      Cash    Total 
    1-9 cs                 3.00       2.00      5.00
    10-19 cs              8.00       2.00     10.00
    20-49 cs              13.00      2.00     15.00       
    50 cs & above       20.00      2.00     22.00
    No of cases                 RTD-PET   
                               Base   Cash  Total
    1-9 cs                  4.00      3.00    7.00
    10-19 cs              7.00      3.00   10.00
    20-49 cs             12.00     3.00    15.00    
    50 cs & above      17.00     3.00     20.00
    Sample products
    POWDER TEA/FRUIT
         1. Mango powder
         2. Lemon powder
    RTD PET
        1. Pineapple 500 ml
        2. Orange 500 ml
    WATER
        1 Purewater
    Scenario 1:
    Customer is purchasing the following:
    Mango powder - 25 cs
    How much will be the total discount?  SInce the customer orrdered 25 cs, the total discount that will be given is Php 35.00 based on matrix above.
    However,,
    Scenario 2.
    If the customer purchased a combination of
    Mango powder -10 cs
    Pineapple 500 ml - 20 cs
    Purewater - 20 cs
    The total discount that should be give are:
      Mango powder - PHP 40.00
      Pineapple - PHP 20.00
      Purewater - __PHP 22.00__
            total discount : PHP 82.00
    The prolem we encountered is we cannot do the total of all products given on the matrix above.The system reads the discount per line item. We need to generate first the total orders so we can get the correct computed discount base on the matrix.

    Hi Jefferson Thomas Javier,
              To take in account the whole quantity of items to calculated the discount condition, you should make the condition type of discount as a Group condition (it is a check box within the configuration of the condition price), in this way the quatity taken to calculate the discount is the sum of all items.
    Thanks,
    Mariano.

Maybe you are looking for