Building a "switch" condition

Hiya!
Im trying to build a little "switch" function, similiar to
this one...
on(release) {
if(testing = "a"){
testing = "b"
} else {
testing = "a"
The result will always return "a"
its annoying
Any tips?

Yes. I've done this many times myself.
When doing a comparison you need to use the comparison
operator not the assignment operator. In other words.
if(testing="a")
is not the same as
if(testing == "a")
It will make all the difference.

Similar Messages

  • BPM switch condition xPath

    All,
    Inside the BPM there is a switch condition -
    which checks whether ( InXML\Item1\Key = "COMPNAME" AND InXML\Item1\Value="HRB" ) - if this condition is true, then it sends the whole xml to a particular receiver.
    For this condition to work - does the Item1 node (with COMPNAME key value) be first? Currently we are getting it in random places within the Item1 nodes.
    Sample Input message -
    <InXML>
    <Item1>
    <Key>CODE</Key>
    <Value>CC</Value>
    </Item1>
    <Item1>
    <Key>COMPNAME</Key>
    <Value>HRB</Value>
    </Item1>
    <Item1>
    <Key>REGSTATUS</Key>
    <Value>Y</Value>
    </Item1>
    <Item1>
    <Key></Key>
    <Value></Value>
    </Item1>
    </InXML>
    Thanks.

    I think my initial question is not clear... let me rephrase it.
    In the following XML there are 4 Item1 nodes. Does the one that is bold (this is the one that will satisfy the condition), need to be the first in the 4 or will it work immaterial of the position within the Item1 node collection?
    <InXML>
    <Item1>
    <Key>CODE</Key>
    <Value>CC</Value>
    </Item1>
    <Item1>
    <Key>COMPNAME</Key>
    <Value>HRB</Value>
    </Item1>
    <Item1>
    <Key>REGSTATUS</Key>
    <Value>Y</Value>
    </Item1>
    <Item1>
    <Key></Key>
    <Value></Value>
    </Item1>
    </InXML>

  • BPM- Switch Condition ?

    Hi All,
    I have a question regarding the usage of Switch condition (Like Option) in BPM.
    For Example I want to give a condition such that I should pass all the messages starting with 'J' followed by any letter.
    Thanks in advance

    The Operator that you are talking about is the Contains Pattern...
    Have your Left Operand the node that you have to impose the condition on
    Middle Operand as the Contains Pattern
    Right Operand as Constant and it should be
    * J  (or J* )
    just check it not quite sure......dont have an access to 7.0 right now
    Check with this
    For more info refer: http://help.sap.com/saphelp_nw70/helpdata/en/67/49767669963545a071a190b77a9a23/content.htm
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Jul 29, 2009 9:38 AM

  • Contains (String function) is not working in switch condition .

    Hi All ,
    I have a interface in which there are two projects.
    1 notification interface
    2 DFW interface .
    Project 1 Has Mediator in it where I am checking a Filter condition on DESTINATION PARTNER ID as below
    contains($in.request/inp1:TSOHoldCommon/inp1:Destination_Partner_ID,'DFW')
    as you all know this is the string function(containd) I have used.
    But there is a problem I am facing , when i use the same condition in DFW INTERFACE in all the switch conditions i have used .
    So now the problem is in switch condition used in BPEL of DFW INTERFACE.
    I have a asign statement after this condition,and i am getting assign pending so flow is faulting.
    please help me in this regard or give me any suggestions for fixing this .
    BPEL VERSION 1.1
    SOA 11.1.1.6

    Please post the error log which you are getting in EM.
    Thanks,
    Ashutosh

  • Switch: Condition table B499 cannot be used

    Hello,
    When trying to create a Access sequence using the condition table 499, (Movement Type) the following error message is occuring:
    "Switch: Condition table B499 cannot be used".
    When we check the switch(DIMP_GENERAL_APP) relevant for this, the status is "OFF"
    Our question is By activating the switch are there any implications?
    Kishore

    hi, whould you please give some more detail instruction? thanks.

  • Switch doest not evaluate the switch conditions

    Hello again,
    I have the following, fine working, switch condition:
    <case condition="bpws:getVariableData('name') = 'aktiv'">
    Some lines later within the same source, I have the following, not working, switch condition:
    <case condition="bpws:getVariableData('lieferrichtung') = 'ABS'">
    or
    <case condition="bpws:getVariableData('lieferrichtung') = 'BEZ'">
    The variable types are in both cases xsd:string (SimpleType), and the variables are local to a scope.
    Here a "printout" from the variable "lieferrichtung" while runtime:
    <lieferrichtung>BEZ</lieferrichtung>
    or
    <lieferrichtung>ABS</lieferrichtung>
    What's wrong?
    Best regards
    Harald
    For anyone who can not believe my question, here are the sources:
    <switch name="prüfeZustandsnamen">
    <case condition="bpws:getVariableData('name') = 'aktiv'">
    <bpelx:annotation>
    <bpelx:pattern>NameIsAktiv</bpelx:pattern>
    </bpelx:annotation>
    <assign name="getZustandOid">
    <copy>
    <from expression="concat('/ns1:getZustaendeResponse/ns1:getZustaendeReturn[', bpws:getVariableData('iterator'), ']/ns19:OID')"/>
    <to variable="xpath"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('getZustaende_getZustaende_OutputVariable','parameters',bpws:getVariableData('xpath'))"/>
    <to variable="zustandOid"/>
    </copy>
    <copy>
    <from variable="count"/>
    <to variable="iterator"/>
    </copy>
    </assign>
    </case>
    <otherwise/>
    </switch>
    <switch name="prüfeLieferrichtung">
    <case condition="bpws:getVariableData('lieferrichtung') = 'ABS'">
    <bpelx:annotation>
    <bpelx:pattern>isAbsatz</bpelx:pattern>
    </bpelx:annotation>
    <sequence name="Sequence_13">
    <assign name="setSchlüsselMitBkVES">
    <copy>
    <from expression="concat('11XVE-SALES----7 ', bpws:getVariableData('getVertragsbezeichnungFromMasterDB_getVertragsinfoFromMasterDB_OutputVariable','getVertragsinfoFromMasterDBOutputCollection','/ns16:getVertragsinfoFromMasterDBOutputCollection/ns16:getVertragsinfoFromMasterDBOutput/ns16:text'))"/>
    <to variable="saveEingangsgrösse_saveEingangsgroesse_InputVariable"
    part="parameters"
    query="/ns1:saveEingangsgroesse/ns1:pEWSVersionen/ns26:schluessel"/>
    </copy>
    </assign>
    <invoke name="saveEingangsgrösse"
    partnerLink="ecas"
    portType="ns1:EWebService"
    operation="saveEingangsgroesse"
    inputVariable="saveEingangsgrösse_saveEingangsgroesse_InputVariable"
    outputVariable="saveEingangsgrösse_saveEingangsgroesse_OutputVariable"
    bpelx:inputHeaderVariable="customSoapHeaderIn"/>
    </sequence>
    </case>
    <case condition="bpws:getVariableData('lieferrichtung') = 'BEZ'">
    <bpelx:annotation>
    <bpelx:pattern>isBezug</bpelx:pattern>
    </bpelx:annotation>
    <sequence name="Sequence_12">
    <assign name="setSchlüsselMitBkKunde">
    <copy>
    <from expression="concat('Anderer BK ', bpws:getVariableData('getVertragsbezeichnungFromMasterDB_getVertragsinfoFromMasterDB_OutputVariable','getVertragsinfoFromMasterDBOutputCollection','/ns16:getVertragsinfoFromMasterDBOutputCollection/ns16:getVertragsinfoFromMasterDBOutput/ns16:text'))"/>
    <to variable="saveEingangsgrösse_saveEingangsgroesse_InputVariable"
    part="parameters"
    query="/ns1:saveEingangsgroesse/ns1:pEWSVersionen/ns26:schluessel"/>
    </copy>
    </assign>
    <invoke name="saveEingangsgrösse"
    partnerLink="ecas"
    portType="ns1:EWebService"
    operation="saveEingangsgroesse"
    inputVariable="saveEingangsgrösse_saveEingangsgroesse_InputVariable"
    outputVariable="saveEingangsgrösse_saveEingangsgroesse_OutputVariable"
    bpelx:inputHeaderVariable="customSoapHeaderIn"/>
    </sequence>
    </case>
    <otherwise/>
    </switch>
    Message was edited by:
    user570114

    "lieferrichtung" is a scope local simple type variable... (The dots in the following lines are a placeholder for other activities)
    <scope name="setEingangsgrössen">
    <variables>
    <variable name="gueltigBis" type="xsd:string"/>
    <variable name="lieferrichtung" type="xsd:string"/>
    </variables>
    <sequence name="Sequence_10">
    <while name="While_4"
    condition="bpws:getVariableData('iterator') &lt;= bpws:getVariableData('count')">
    <sequence name="Sequence_11">
    <assign name="setSwitchParameter">
    <copy>
    <from expression="concat('/ns1:searchEingangsgroesseResponse/ns1:searchEingangsgroesseReturn[position()=', bpws:getVariableData('iterator'), ']/ns26:name')"/>
    <to variable="xpath"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('getEingangsgrössen_searchEingangsgroesse_OutputVariable','parameters',bpws:getVariableData('xpath'))"/>
    <to variable="lieferrichtung"/>
    </copy>
    <copy>
    <from expression="substring(bpws:getVariableData('lieferrichtung'), string-length(bpws:getVariableData('lieferrichtung')) - 3)"/>
    <to variable="lieferrichtung"/>
    </copy>
    </assign>
    <switch name="prüfeLieferrichtung">
    <case condition="bpws:getVariableData('lieferrichtung') = 'ABS'">
    <bpelx:annotation>
    <bpelx:pattern>isAbsatz</bpelx:pattern>
    </bpelx:annotation>
    <sequence name="Sequence_13">
    <assign name="setSchlüsselMitBkVES">
    <copy>
    <from expression="concat('11XVE-SALES----7 ', bpws:getVariableData('getVertragsbezeichnungFromMasterDB_getVertragsinfoFromMasterDB_OutputVariable','getVertragsinfoFromMasterDBOutputCollection','/ns16:getVertragsinfoFromMasterDBOutputCollection/ns16:getVertragsinfoFromMasterDBOutput/ns16:text'))"/>
    <to variable="saveEingangsgrösse_saveEingangsgroesse_InputVariable"
    part="parameters"
    query="/ns1:saveEingangsgroesse/ns1:pEWSVersionen/ns26:schluessel"/>
    </copy>
    </assign>
    <invoke name="saveEingangsgrösse"
    partnerLink="ecas"
    portType="ns1:EWebService"
    operation="saveEingangsgroesse"
    inputVariable="saveEingangsgrösse_saveEingangsgroesse_InputVariable"
    outputVariable="saveEingangsgrösse_saveEingangsgroesse_OutputVariable"
    bpelx:inputHeaderVariable="customSoapHeaderIn"/>
    </sequence>
    </case>
    <case condition="bpws:getVariableData('lieferrichtung') = 'BEZ'">
    <bpelx:annotation>
    <bpelx:pattern>isBezug</bpelx:pattern>
    </bpelx:annotation>
    <sequence name="Sequence_12">
    <assign name="setSchlüsselMitBkKunde">
    <copy>
    <from expression="concat('Anderer BK ', bpws:getVariableData('getVertragsbezeichnungFromMasterDB_getVertragsinfoFromMasterDB_OutputVariable','getVertragsinfoFromMasterDBOutputCollection','/ns16:getVertragsinfoFromMasterDBOutputCollection/ns16:getVertragsinfoFromMasterDBOutput/ns16:text'))"/>
    <to variable="saveEingangsgrösse_saveEingangsgroesse_InputVariable"
    part="parameters"
    query="/ns1:saveEingangsgroesse/ns1:pEWSVersionen/ns26:schluessel"/>
    </copy>
    </assign>
    <invoke name="saveEingangsgrösse"
    partnerLink="ecas"
    portType="ns1:EWebService"
    operation="saveEingangsgroesse"
    inputVariable="saveEingangsgrösse_saveEingangsgroesse_InputVariable"
    outputVariable="saveEingangsgrösse_saveEingangsgroesse_OutputVariable"
    bpelx:inputHeaderVariable="customSoapHeaderIn"/>
    </sequence>
    </case>
    <otherwise/>
    </switch>
    <assign name="incrementIterator">
    <copy>
    <from expression="bpws:getVariableData('iterator') + 1"/>
    <to variable="iterator"/>
    </copy>
    </assign>
    </sequence>
    </while>
    </sequence>
    </scope>

  • Build application with conditional disabled VI's still tries to load them ...

    Hi,
    we have a big LV-project with some "conditional disabled" or with a "switch" unused VI's. But LabVIEW still tries to load them when building an application (even when they are not used). Is there a setting to prevent this behavior? Something like "ignore unused/missing VI's during built"?
    Thanks
    Peter

    The difference is disable structure and Conditional disable structure.  unconditionally disabled code can be broken as it cannot run.  Compare that to a case driven by a constant- the unreachable code is removed by the optomizer in certain conditions (We won't guess what conditions prohibit this optomization and it has been changeing a lot since 8.6 to 2013 I imagine it will continue to evolve) however, Because the optomization is not garanteed to occurr the unreachable code cannot be broken.  This is simillar to the conditional disable symbols- they are not evaluated untill runtime and the condition may depend on variables external to LabVIEW.  So, all cases must be compilable.
    @ Mike- Yup, I believe those symbols values CAN be manipulated external to the app instance (Certainly App.Kind comes to mind).  I don't have any experience doing that. 
    Jeff

  • Flash Builder 4.7 conditional compiling failed

    I installed Flash Builder 4.7 on my windows xp machine, and tried to migrate projects from FB 4.6. However in one of my projects I use conditional compiling, but I'm getting errors.For example in FB 4.6 I have this sample code:
    public class MyClass{
         CONFIG::DEBUGGING{
              import com.package.SomeClassOnlyForDebugging
         function someFunction():void{
              if (CONFIG::DEBUGGING){
                   SomeClassOnlyForDebugging.create();
    When I compiled it in FB 4.6 everything worked fine. However when I try to compile it in FB 4.7, then I get error on the conditional compiling only inside the function and not on the import statement. The only way I have found to overpass it is to go to Project>Properties>ActionScript Compiler and disable Enable strict type checking. But this is not a permanent solution.
    Am I doing something wrong, or is there some other way to do it?

    You should to do like that:
    function someFunction():void
    CONFIG::DEBUGGING {
         SomeClassOnlyForDebugging.create();
    without if.

  • How to use switch condition in XMII??

    Hi ,
    I am not able to find the output path for the match values of switch statement.
    Please explain in detail.

    Hi Ravi,
    I added 3 inputs by using configure button of switch action->results 3 matchvalues.
    After that i placed the condition in each MatchValue expression by mapping it to the Repeater output variable on which i written the condition in above expression.
    first sqlquery--> xMII xml document --> Repeater --> switch
    And i did the calculation after switch by using assignment and row.
    but after executing the above transaction in the output trace it is entering into repeater and switch but it is not entering into sequences after switch.
    But it is repeating switch based on the number of rows of output by using repeater
    Means some problem with switch can u pease clarify it
    after adding the condition for each match value i added 3 sequences below that switch and there i had used assignment action to assign the value from repeater which has to be calculated to transaction variable.
    then i had used xMII xml row and i am getting the values from transaction and repeater and i am configuring this row to document output which i used above repeater.

  • Error in multiple switch condition

    Dear All,
    In my workflow i have a multiple condition step in which i am using SWITCH which on execution gives the following error :
    1.Work item 000000004008: Object FLOWITEM method EXECUTE cannot be executed
    ->Error when starting a SWITCH branch.
    This switch has 3 conditions: based on the parameter &decision&.
    At this i am checking there is a value in the workflow container for the decision,still gives this error.
    Please tell any possible resons for this.

    I am using the RFC to trigger and after the approval step
    i am passing the value of the decision into the container.
    Now tell me where do i pass the workitem_id??
    What RFC you are using to trigger the approval step
    See all I want to say is for every BO you ll have a key attribute through which it will instantiate the BO so for FLOWITEM BO workitem id is the key attribute
    and
    For e;g
    in the FM
    SWE_EVENT_CREATE
    EXPORTING
    Business Object name = 'FLOWITEM'.
    Business Object Key  = '16033'.

  • Exception in switch condition

    When I compile the following fragment of BPEL:
    <switch name="switch-6">
         <case condition="bpws:getVariableData('precio') &lt; bpws:getVariableData('OfertaAlsa','','/tns:OfertaViaje/tns:precio')">
    it raises the following exception:
    [bpelc] [Error de ORABPEL-10072]: the third argument is not admitted
    [bpelc] [Descripción]: ... the third argument "/tns:OfertaViaje/tns:precio" is not admitted here, because the first and second arguments are enough to get data from the variable of the element.
    [bpelc] [Possible correction]: Remove the third argument "/tns:OfertaViaje/tns:precio" from this expression.
    [bpelc]
    [bpelc] [Error de ORABPEL-10057]: Invalid query
    [bpelc] [Description]: ... the query "" is invalid, due to Unexpected ''.
    [bpelc] [Possible correction]: Check the XML schema and verify that the query string is valid.
    [bpelc] .
    Sorry because I had to translate the exception trace.
    I've generated this BPEL source with Oracle Process Server plugin for Eclipse.
    The following condition works:
    <case condition="bpws:getVariableData('precio') &lt; 0">
    Finally, the wsdl fragment for this type of variable is:
    <element name="OfertaViaje">
    <complexType>
    <sequence>
    <element name="empresa" type="string"/>
    <element name="codigo" type="int"/>
    <element name="horaSalida" type="dateTime"/>
    <element name="horaLlegada" type="dateTime"/>
    <element name="precio" type="double"/>
    </sequence>
    </complexType>
    </element>
    What's the problem?
    Thanks in advance

    It seems to me you can leave out the second (empty) parameter in the bpws:getVariableData('OfertaAlsa','','/tns:OfertaViaje/tns:precio') function. So try it with bpws:getVariableData('OfertaAlsa','/tns:OfertaViaje/tns:precio').
    Andre

  • Cisco tool for building router/switch configurations

    Is there a tool on Cisco website that lets you build your own configurations of Cisco routers etc prior to you purchasing them? i.e. Giving you a complete list of part IDs ?

    Hi
    Your question is not clear , if you asked about a tool which can help you to do a configuration for your purchase order for routers , switches , any solution for Cisco . You can configure your chassis , cards , SFPs, Power , and so on. Please use the below link:-
    https://cisco-apps.cisco.com/cisco/psn/commerce
    Thank you
    please rate all useful infomration

  • Can I get my Note 3 Replaced with a newer build or switch to a different phone and pay the difference?

    First off, let me say, I really love my Galaxy Note 3 -- it is an awesome Smartphone...  Unfortunately, I am one of the users of the problematic Note 3s...  I got the phone and it worked great for about the first week I had it (I got it outside of the area where I live)...  then  I got it home... I usually have a good 4G signal at home -- inside and out.
    My office is literally just on the other side of my college campus (less than a mile away)...  I go from a good 4G signal to no signal in my office, with the exception of about a  1 foot square section on my desk where I can get 1x, and occasionally 4G.  I worked with the support team on Twitter and was sent a new SIM card, and that seemed to help unfil a few weeks ago.
    Every other Verizon 4G phoen I have seen at my office almost always has at least 2 bars of 4G... If not 4G, then it will have a perfect 3G signal.  (To compare, I upgraded from the iPhone 4, which never had a problem getting a 3G signal anywhere)...  I would expect the Note 3 would at least keep some kind of a signal in an area where everybody's 3G signal is nearly perfect....   At the local walmart, I can barely get a signal outside, and you can forget it inside...  (Ironically, there's a verizon store at this shopping center as well... when I walk in the verizon store, my phone magically switches back to a decent 4G signal...)
    Ideally, I'd take new Note 3 that doesn't have this problem, or I could upgrade to the Note 3 Developers Edition that also doesn't have this issue.  I really love the Note 3 and would prefer to stay with the Note 3...
    How can I work with you guys to make this happen?
    Thanks!

    Hey Lyndsey & Ada,
    I appreciate yawl following up with me -- this is the first time I have actually been able to get signed into my community account in a while.
    I did managed to get some help out of the Twitter support team and they sent me another phone.  My second phone (the one I just received a couple of weeks ago now) definitely worked better for a few days and then went bad again.  I am beginning to wonder if the PRL needs to be updated...  Unfortunately, I do not remember what the original PRL was when I first turned the phone on.  But I know that it is on 15296 now.
    I am back to having to leave my phone sitting in one particular spot in my office where it has any kind of signal.  I go back to my original question -- since I have had so many problem with this phone, can I upgrade to the Note 3 Developers Edition and just pay the difference?
    Thanks!
    ~Brant

  • Testing switch step conditions

    Hi
    Is there a way to test conditions in switch step?
    With real data when the process is executed... it seems that the condition does not work... but I can not see more details to investigate what is wrong.
    Has anybody ideas how to test switch conditions?
    Thanks for any input,
    Heiko

    Ok sorry, I thought you were maintaining a Business Workflow, not an XI process..
    I haven't worked with ccBPM or the integration/workflow builder myself, but could you go to the graphical builder, drill down to the switch step and see what's available there? In the business workflow builder you can see a small simulation button in the bottom together with create test data button.
    -Mikko

  • CcBPM - switch with a condition (greater than) in XI 7.0

    Hello.
    I have this BPM that must have a switch condition like:
    IF <field xpto> of the received message is greater than 0.
      branch 1.
    ELSE.
      branch 2.
    ENDIF.
    In XI 7.1 is easy, because the condition editor has logical expressions like >, <, etc ...
    In XI 7.0 we don't have that, but in SAP help I read:
    You want to formulate the following condition: The booking number (BookingNumber) is greater than 0100.
    Since the greater than (>) operator is not available in the condition editor, you can use the following solution: You define the relevant logical expression in the expression editor by means of an XPath predicate, and assign it to a node element. Using the condition editor you then just query the existence of this node element (by using the existence operator (EX)).
    This means you first create the following expression in the expression editor:
    /FlightBookingOrderConfirmation [BookingID/BookingNumber > 0100]
    Using the condition editor, you then formulate the following condition:
    (/FlightBookingOrderConfirmation [BookingID/BookingNumber > 0100] EX)
    The meaning of this condition is as follows:
    A node element FlightBookingOrderConfirmation exists, to which the following applies: The content of the subelement BookingID/BookingNumber is greater than 0100.
    In my example, the xpath for the variable is:
    /p4:EventMessage/p4:MessageBody/p5:Order/p5:Totals/p5:TotalGrossAmount
    But i'm not getting how to use the bracket condition.
    Regards,
    Valter Oliveira.
    Edited by: Valter Oliveira on Mar 10, 2009 6:04 PM

    Hi, valter:
    Existence operator (EX) is to check if the node exist in your source message or not.
    It is used in Conditional Editor, mostly in the conditional routing in ID.
    IF <field xpto> of the received message is greater than 0.
    branch 1.
    ELSE.
    branch 2.
    ENDIF.
    If your branch 1 or 2 is a send step, then you can use the conditional routing to substitute BPM logic.
    otherwise, you can not use conditon editor to replace your BPM logics.
    Regards.
    Liang

Maybe you are looking for

  • Printer control app for iphone

    is it possible to roll back to a previous version of the Printer Control app for iphone?  I recently and stupidly updated the HP Printer Control app when offered through itunes on October 30 and have lost all the functionality I previously had to pri

  • Error pops up sometimes; I can't find a pattern

    Hello! Sometimes an error pops up on my Mid-2012 Unibody MacBook Pro 13". It says that QuickLookSatellite has crashed. It pops up when I download something, but I can't find any other pattern. It just pops up randomly otherwise. What does it mean and

  • Phase Create Database Error in ECC 6.0 EHP5 Installation on SuSe10/Oracle11

    Hi, I have following  error ecnounter During Create Databse Phase. Have applied the latest patch after Oracle Installtion. /oracle file system has the permissions 755. Environment : ECC 6.0 EHP5 Installation on SuSe10/Oracle11. Please advise sapinst_

  • How to wait till the end of DOS program started using Runtime.exec(cmd)?

    In my Java program I need to call two DOS batch programs namely call.bat and start.bat. First I need to start the batch program call.bat and once that program is completed, I need to call the other batch file start.bat. The piece of code which I am u

  • System.out.println ....syntax error?

    Hi, I am workin on my first java program here...and althought my classes compile just fine I can't manage to get what I want to appear on the screen on Button action.... Clicking on cost should trigger the appearance of the total cost...but nothing h