Integer DAL Variable in 11.5

In 11.5 Studio Patch 3 I am experiencing an issue with integer variables inside of a DAL script.
It seems that when I define an integer variable (starting with the # character) the interpreter is not recognizing the line correctly. I entered the following lines into my DAL script window:
#LOB = CountRec("17,PMSP0000 50,CPP");
$LOB = CountRec("17,PMSP0000 50,CPP");
%LOB = CountRec("17,PMSP0000 50,CPP");
LOB = CountRec("17,PMSP0000 50,CPP");
The #LOB line is all in blue (even the values between quotes)
All of the other lines are color coded correctly with the the variable name in black, CountRec rule in blue, and the "17,PMSP0000 50,CPP" appearing in red.
I have also tried other variable names, but any line starting with # displays in all blue.
Has anyone else encountered this problem and know if it has further ramifications in processing?
Blanchard Williams
CSC

The person having the problem (I was assisting so don't have access to the exact environment) is saying that the script is not working. The form being triggered does not produce even through the values are present. I think there is another issue related to how the IF statements are being recognized by Studio, but I didn't want to muddle this potential issue with another. I have some testing suggestions for her, but wanted to see if anyone had run across proof that the color coding issue is, or is not, an indication of a real problem.
Thanks.

Similar Messages

  • How do we initialize DAL variables without making changes to INI files?

    We have an application which currently use only two DALs. We would like to add a DAL to popluate certain data on the form. We have encountered an issue with initialization of dal vairables.
    One of the solutionis that set FlushDalSymbo = Yes in the FSISYS file.
    However, this involves INI file change which we would like to avoid.
    So, is there a way to initialize dal variables, without making changes to INI files? If so, how?
    Thanks,
    Bala

    Hi Bala,
    Initializing a variable is simple, you just need to set the value to blank or zero:
    Variable = ""
    #Variable =0
    $Variable = 0.00
    You can place the declaration at the beginning of your script, of course replacing "Variable" with the actual name of you variable.
    Gaétan

  • Integer static valueOf(int) question

    Hi there.
    Im wondering is it at all possible for an Integer reference variable to be returned
    a null by invoking this method from the API:
    Integer myInt = Integer.valueOf(//some int);The reason I am asking this question is that my SCJP book asks a question
    about using a method that is similar to the following:
    class BankAccount {
    private Map<String, Integer> accountFunds = new HashMap<String, Integer>();
    public int customerBalance(String custAccount) {
       return accountFunds.get(custAccount);
    public void setCustomerBalance(String custAccount, int balance) {
       accountFunds.put(custAccount, Integer.valueOf(balance));
    }Looking at the single return statement in the customerBalance method, my book states that this is inappropriate
    because a null cant unbox to 0 I disagree because if you look at the setCustomerBalance method you are putting an Integer
    instance that is initialized with an int primitive into the Map. So how could it be possible to have
    a null Integer instance in the map if you pass an int primitive to the valueOf method? I can understand
    if you were using a String to instantiate the Integer, and you passed null, that you would get a NumberFormatException or something like that, but about you are using a primitive, not an Object.
    Any clarification greatly received,
    Thanks & best regards.

    I disagree because if you look at the setCustomerBalance method you are putting an Integer
    instance that is initialized with an int primitive into the Map.And what happens if you call customerBalance() (which should really be named getCustomerBalance()) with a customer ID that doesn't exist?

  • "Reset" declared variables to initialized state?

    Hiya!
    This might sound like a very stupid question, but I have not figured out a way to do this. I am working on a "personal information manager", where users can enter a date in a lovely swing textfield, it get's parsed to Integer and a GregorianCalendar is created with it. Once I created the Calendar, the TextFields are emptied again, but of course the Integer instance variables are still declared with the old values. This leads to the fact that a user could click "add date" again and a date is created without entering any number at all.
    My question:
    Is it possible to set declared variables back to the state they had when initialized? They should be "empty"...
    I can`t set them null...
    Thanks for your help, it's much appreciated!

    The only type of variable where "empty" has any meaning is for an empty string: "". Otherwise there is no empty. Objects are by default initialized to null, numeric primitives to zero, and I think chars to '' but I could be mistaken about that one - I never use chars. So if you're using Integers, they could either be null, or an Integer - nothing else.

  • Process variables populating on adobe eForms ES2

    Hi all,
    I've an adobe process with an output integer process variable called StepID and i made a form and want to populate this variable on the form, i've made a WSDL data connection and found the variable in the invoke response but when i put this variable on the form to be bound i found no value of it on the form although the variable has a value in the process.
    thanks so much for your time and effort.
    BR

    Hi paul,
    sorry for my late reply, yes i bound the datafield as output , also there is no security on the web service and unfortunately it is not on the public domain it is on private server in addition i didn't call the click event on the invoke button because the WSDL is already invoked from a JAVA servlet also i don't want to invoke it from the eForm just i want to know how i can bind a field in the eform to a process variable even if i don't want to use WSDL data connection if there is another type of connection or variable type or something.
    Thanks so much paul for your help.

  • Funtion modules to convert hexa decimal to integer

    Hi,
    Every one
    can any one suggest me  the function modules that can be used to convert the hexadecimal to integer.

    Hi,
        Define a variable of type integer, and move the value of the hexadecimal variable into the declared variable.
    Example.
    DATA : var1 TYPE i,
           var2 TYPE x LENGTH 4 VALUE '00002710'.   " Hexadecimal value equal to 10000 integer
    * directly move the value in hexadecimal type variable into integer type variable
    MOVE var2 TO var1.
    WRITE :/ var1.
    Var1 = 10000   " Integer.
    Regards
    Bala Krishna

  • Procedures and Email Notifications

    boldEN*bold*
    Hi everyone!!
    In my BPM development, i'm trying to automatize the email notifications, based on due process periods. Also, I need to inform, based on the delay, some other participants that escalates the alarm message.
    Is it possible to do it using an "E-Mail Notification" component that can be reused during all the process, even that the interval conditions and informed users varies upon each activity.
    Is there another way to solve it?
    Thanks
    boldSP:*bold*
    Saludos a todos!
    En mi desarrollo BPM requiero automatizar el proceso de envio de email, al caducar ciertas actividades. Basado en ello, el tiempo de caducidad varia de acuerdo a cada actividad y al usuario, ya que varian tanto los intervalos de aviso, como los correos y su escalamiento en caso de demoras mayores a lo solicitado.
    Pienso que es posible tomar un procedimiento especializado que permita ser reutilizado en este y otros proyectos, a pesar de que requiera parametrizar tanto los usuarios "base" y "escalados", como los intervalos de alarmas, durante el proceso.
    ¿ Existe otra forma de realizarlo?
    Gracias,

    I think I understand what you're after. I think you want to use the same escalation logic for all of your processes and instead of embedding this in every process you want something reusable. If this is not the case, read no further.
    While you can do this, there are still going to be 5 things each process would still need to have inside of them:
    <li> your process would need to set the "deadline" predefined variable to the intial timeout (2 hours in the future in your example)
    <li> your process would need an Exeption Handler needs to be added with an Exception transition set to "Instance Expiration"
    <li> your process would need an Integer instance variable "alertLevel" to keep track of the current level
    <li> your process would need a String instance variable "currentlyAssignedTo" to keep track of who's supervisor you want to notify
    <li> your process would need an Automatic activity with one line of logic inside it.
    You could have the Exception transition leaving the Exception Handler activity go to a subprocess using a Subflow activity. This subprocess would send the emails, determine the new deadline interval, determine the new priority of the instance, look up the currently assigned user, manager and supervisor's email addresses and send the email(s). The subflow would have two input argument variables (alertLevelArg and currentlyAssignedToArg). In the Begin activity, these arguments would be mapped to corresponding instance variables. Inside this subprocess there would be an automatic with the logic to send the email to the user / manager / supervisor based on the alertLevel instance variable. This subprocess would pass back out through its output argument variables the new alertLevelArg, and new deadline (a time argument variable set to some time in the future based on the new alert's level).
    Once the instance in the called subprocess completes, the output arguments need to be mapped to the original process's "alertLevel" and "deadline" variable. From the Subflow activity, you'd have an unconditional activity that flows into an Automatic activity via an unconditional transition. This automatic activity would have the single line of logic "action = BACK" so the instance is sent back from the Exception Hanldler's flow back to the activity inside the process it was in when the Instance Expiration exception occurred.
    Avoid hard coding the values of "2" and "5" and "8" for the number of hours to have elapse inside your logic. Instead make them business parameters capable of being edited by an business owner.
    Dan

  • READING AND WRITING FROM A FILE(WRITTEN IN ANOTHER LANGUAGE)

    # Comment
    INTEGER Declares integer type variable
    STRING Declares string type variable
    LET Assigns a variable
    CALCULATE Performs an arithmetic calculation
    PRINT Writes data to the console
    PRINTLN As print, but followed by a new line
    END Terminates the program
    Each line of the program must begin with one of these words, and the language should not be case sensitive.
    Tim Brailsford, 2007
    G64ICP
    COMMENT
    Any line beginning with the # character is completely ignored.
    Example:
    # ignore this line!
    INTEGER
    The INTEGER reserved word declares an Integer variable, and assigns a default value of 0 to it.
    Example:
    INTEGER myInt
    This example is equivalent to the Java statment "int myInt=0;"
    STRING
    The STRING reserved word declares a String variable, and assigns an empty string to it.
    Example:
    STRING myString
    This is equivalent to the Java statement "String myString;"
    LET
    This assigns values to variables (either integers, or strings enclosed
    in double quotes).
    Examples:
    LET myInt=42
    LET myString="Hello World!"
    CALCULATE
    This performs numeric calculations upon values or variables, and assigns the result to a variable (which must have
    been declared earlier). Four operators are supported: + *
    and / (for addition, subtraction multiplication and
    integer division respectively).
    Examples:
    CALCULATE myInt=2*2
    CALCULATE myInt=myInt+24
    CALCULATE myInt=intA/intB
    PRINT and PRINTLN
    These words both print to the console the
    only difference being that PRINTLN appends a new line (as does
    System.out.println in Java). These can print either text provided as an argument, or variables (string or integer).
    Examples:
    PRINTLN "Hello World!"
    PRINT myString
    PRINTLN myInt
    END
    This terminates the program, and prints a message to that effect.
    TPL Example
    To the left is an example TPL input file , to
    calculate the factorial of 5. This should produce
    an output similar to that shown overleaf (except
    that calculates the factorial of 10).
    # A TPL Program to calculate the factorial of 5
    INTEGER myInt
    INTEGER factorial
    STRING myString
    LET mystring="Factorial Program"
    LET myInt=5
    CALCULATE factorial=myInt*4
    CALCULATE factorial=factorial*3
    CALCULATE factorial=factorial*2
    Tim Brailsford, 2007
    G64ICP
    PRINTLN mystring
    PRINTLN
    PRINT "The factorial of "
    PRINT myInt
    PRINT " is "
    PRINTLN factorial
    END
    Documentation
    Document your code by writing instructions explaining how to run it, listing all of the files you have submitted,
    and specifying any limitations (eg you might want to say what platforms you would expect it to run on, and what
    platforms you have tested it on). This document should be written as a plain text file (ie ASCII � MS Word binary
    files are not acceptable) � and this file should be called README.TXT. This file should constitute the user
    manual of your program, and should explain exactly how to use your program.
    The README file should be the user manual for your language as implemented.
    NB:
    I want it to read values from the file as given above and execute the answer in the command prompt( as intented in the file above)
    Thanks
    Alam Ikenna

    Hai I have one doubt in doing other peoples homework for them. Why bother?

  • Useful Document/resources For Begginners

    this document is easily on net
    WS-BPEL Guide
    Last changed on Dec 10, 2004 by Matthieu Riou
    What is this article about ?
    This is an introduction to WS-BPEL that should give you a practical understanding of what you have to do to create a nice WS-BPEL process, dwelling on most important details. After reading this article you probably won't be able to write a WS-BPEL process from top to bottom. But you should have a pretty good notion of what can be done with it, what it involves and be familiar with the main elements of the grammar.
    First things first, here are the answers to the most trivial questions:
    •     What this new and unique acronym means? Web Services Business Process Execution Language.
    •     What is WS-BPEL? It's an XML grammar (a W3C schema) defining and standardizing structures necessary for web services orchestration.
    •     What does WS-BPEL? Well, actually nothing as it's just a grammar. But a WS-BPEL engine can do many things when executing your process. Like reacting to message reception, manipulating the message data, sending messages to web services and evaluating expressions.
    •     Where does it come from? It has been written by IBM, BEA Systems and Microsoft. Siebel and SAP joined these three and the specification has bee donated to OASIS.
    •     Where does WS-BPEL fit? It's a very good candidate to add an orchestration layer to a Service Oriented Architecture. It will make your services collaborate nicely and will encapsulate the cross-service business logic. It will also help you to introduce long-living transactions.
    Now that the introductory questions have been answered and before going any further I would like to clarify one thing about WSDL (I voluntarily wrote WSDL here, it's not a weird typo). WS-BPEL heavily relies on WSDL to describe the web services it is interacting with (we will see that soon) but that doesn't mean that it can only interact with services using XML(SOAP)/HTTP. WSDL introduces bindings which are the declaration of your services underlying communication medium. Bindings can be declared for local Java, JMS, RMI or anything you like (you might want to check Apache WSIF ). So a WS-BPEL engine using the right bindings could very well invoke many different services.
    So let's see how we are going to take a look at WS-BPEL. First, I'm going to give a very simple and classic example, just to give you a taste of what can be done with WS-BPEL. Then I'll introduce briefly its main activities. We'll see how to handle your process data and manipulate it and also how a particular process execution can be identified among all others. Finally we'll talk about how WS-BPEL introduces long-living transactions.
    A very simple yet demonstrative example
    After reading this chapter, most of you will probably think that the example I'm going to use is too simple and not realistic. I agree. But my goal here is just to give you a flavor of how WS-BPEL can be used, a realistic example would take more than all this article by itself.
    Now, you are the owner of a small bank granting loans to some of your customers. You have sales offices creating new customer contracts. You also have a web site and customers can directly ask for a loan online for small amounts. But before accepting a contract, some verifications are necessary. Those verifications are done using a risk assessment system maintained by a third party and by an in-house system that files the most tough requests. Loan specialists are part of your staff and then use this in-house system to take the final decision.
    So here is, step by step, the process that must be followed:
    1.     A loan request is issued, either from your web site of from one of your agencies. This request is made for a customer and for a certain amount.
    2.     A risk assessment system must be contacted to check whether the risk associated with the customer asking for the loan is high or low (probably based on his credit history).
    1.     If the loan amount is lower than $10,000 and the risk associated to the customer is low, the loan is directly approved (which saves time).
    2.     Otherwise, the loan request must be filed in your in-house system.
    1.     A loan specialist checks the request and gives his final decision.
    2.     The in-house system let you know the specialist's decision.
    3.     The response is sent to the customer.
    So how those pieces would be implemented in a "WS-BPEL aware" architecture? Here we go:
    •     One message triggered by your web site or your sales system and targeted at your process web service. It would hold at least the customer's name and the loan amount.
    •     One message triggered by the WS-BPEL engine to the risk assessment system to ask for the risk associated with the customer. If you pay your bills correctly, an answer message from this message should be expected.
    •     If needed, one message from the WS-BPEL engine to your in-house system to fill the loan request.
    •     One message from your in-house system to the process web service to give it the loan specialist's answer.
    •     Finally, one message back to your web site or to your sales system to give the final answer.
    One thing some of you probably already noticed is that when talking about the process I mentioned the "process web service". That's right, every process created inside a WS-BPEL engine is published as a web service with its own endpoint. When you want to send a message to your process, you actually send it to this web service.
    So now that you have a better idea of what it would take to implement this process in WS-BPEL, it's time to step back a bit.
    Private vs. Public Processes
    It's quite important to differentiate private and public processes (they are called executable and abstract in WS-BPEL). It is the same kind of opposition as between orchestration and choreography and it has a great impact on your architecture.
    Private processes manage services inside a given organization. They act as a service themselves and are centralized. As in an orchestra, there is a chief conductor (the process engine). Public processes manage services across several organizations. Each organization knows about it's own part of the process but doesn't know anything about the activities executed by other parties (for obvious confidentiality reasons). It's a peer-to-peer approach where you know the incoming and the outgoing messages, but nothing about what is done before, after or even meanwhile.
    WS-BPEL is quite good to handle private processes but doesn't perform so well for public ones (don't shoot me!). I have a feeling that even the members of the Oasis committee working on WS-BPEL don't know too much what to do with those. But actually, service choreography (public services) is not completely mature yet in terms of standards and market acceptance where as orchestration already has a widely embraced specification (WS-BPEL, in case you didn't realize) and many commercial implementations as well as open source ones (you may want to check Twister ). So good news, what you are going to learn in this article might prove useful.
    After those high-level considerations, we'll now look into WS-BPEL guts to see what's there and what we could use to build our process.
    WS-BPEL Activities
    In WS-BPEL, everything being part of your process body is an activity. There are basic activities (the ones that do something) and structured activities (the ones that organize basic activities without doing anything by themselves, just like your boss).
    Basic activities
    Invoking a web service is as simple as that:
    <invoke partnerLink="riskAssessor" portType="assessor" operation="assess"/>
    Pretty simple isn't it? In our initial example this declaration would be used to invoke the risk assessment system. Well, I'm actually cheating, you'll see later that you usually need a bit more (like input and output data) but this is a valid invocation.
    To wait for an incoming message, you'll write:
    <receive partnerLink="inhouseSystem" portType="inhousePort" operation="registerLoanRequest"/>
    That would be used to wait for the loan specialists' answer after registering the loan request in your in-house system. Now let's say that you want to send an immediate synchronous answer to this "receive". You'd write, after the receive:
    <reply partnerLink="inhouseSystem" portType="inhousePort" operation="registerLoanRequest"/>
    But how exactly does a WS-BPEL engine know, upon reception of a message, if it has to trigger the creation of a new process execution (a process instance)? Well, there's an attribute just for that: "createInstance".
    <receive partnerLink="loanRequester" portType="loanProcess" operation="processLoanRequest" createInstance="true"/>
    These 3 declarations use common attributes: partnerLink, portType and operation. If you know WSDL, you are already familiar with the port types and operations. Partner links have been introduced in WS-BPEL to model a two-way interaction between a process and a partner (a web service or another process). It lets you define the role of each of the two party in the interaction.
    There are two more basic activities that could prove useful (or at least one of the two):
    <wait until="'2002-12-24T18:00+01:00'"/>
    <empty/>
    Structured activities
    To start with, 3 basic ones: sequence, switch and while. If their behavior is not clear yet, here are examples:
    <sequence>
    <receive .../>
    <invoke .../>
    <invoke .../>
    </sequence>
    <switch xmlns:inventory="http://supply-chain.org/inventory" xmlns:FLT="http://example.com/faults">
    <case condition= "bpws:getVariableProperty(stockResult,level) > 100">
    … do something
    </case>
    <case condition="bpws:getVariableProperty(stockResult,level) >= 0">
    … do something else
    </case>
    <otherwise>
    … do the last thing
    </otherwise>
    </switch>
    <while condition="10 < bpws:getVariableData('loopVar', 'main', '/counter')">
    <assign>
    <copy>
    <from expression="bpws:getVariableData('loopVar', 'main', '/counter') + 1"/>
    <to variable="loopVar" part="main" query="/counter"/>
    </copy>
    </assign>
    </while>
    Another structured activity is 'pick'. It's just like several receive activities waiting at the same time with an additional alarm construct to avoid waiting forever the occurrence of a message:
    <pick>
    <onMessage partnerLink="" portType="" operation="">
    … do something
    </onMessage>
    <onMessage partnerLink="" portType="" operation="">
    … do something else
    </onMessage>
    <onAlarm until="2004-12-31T23:59:00">
    … hey, what the hell are you waiting for?
    </onAlarm>
    <pick>
    Like the receive activity, it's possible to declare a 'createInstance' attribute on the pick element to trigger the creation of a new process instance.
    Finally, for those who found all those activities way too structured and were missing a bit of anarchy, WS-BPEL introduced a flow activity. You basically declare all your activities as you like and then create links that take those activities as origin and target. The flow is also the only way to enable the execution of several parallel branches.
    Process Data
    To handle the process execution data, WS-BPEL introduces a new and unique concept: variables… Ok, that was just a bad attempt to keep you interested. Here is the context: your process engine must receive and send messages as defined by web services WSDL descriptions. To be able to do anything useful it must retain those messages and let you manipulate their content to create new messages or influence the process flow in variables. Therefore variables hold the state of a process execution. WS-BPEL variables can either hold a WSDL message or an arbitrary XML structure defined by a schema.
    An example for the declaration of a variable that can hold a WSDL message (the first stanza comes from the WSDL description, the second is a part of the process definition):
    <message name="creditInformationMessage">
    <part name="firstName" type="xsd:string"/>
    <part name="lastName" type="xsd:string"/>
    <part name="amount" type="xsd:integer"/>
    </message>
    <variable name="requestLoan" messageType="creditInformationMessage"/>
    So now, how do I stuff an incoming message into this variable? Here is the stuffing:
    <receive partnerLink="loanRequester" portType="loanProcess" operation="processLoanRequest" variable="requestLoan"/>
    Hey hey! That's our old receive! A variable attribute can be specified for a receive to hold the incoming message. For a reply, there's also a variable attribute to give the content of the message to send. And for an invoke, there's an inputVariable attribute to give the variable to send and an outputVariable to hold the response (for a synchronous invocation).
    We have variables to hold our message and we know how to give them a value upon reception of a message. But how do you initialize a variable when you want to send a message using it? How do you build a variable using parts of other variables? The answer is assignment. There's an additional activity I didn't mention yet (yes, I'm holding information) named assign. It lets you "copy and paste" the whole content of a variable, only a WSDL part in a message or even just an element (using Xpath). Again, examples are better than idle words:
    <assign>
    <copy>
    <from variable="ob1"/>
    <to variable="knob"/>
    </copy>
    <copy>
    <from variable="userInfo" part="homeAddress"/>
    <to variable="address"/>
    </copy>
    <copy>
    <from variable="house" part="bathroom" query="/shower/soap"/>
    <to variable="cleaningAgent"/>
    </copy>
    <copy>
    <from>hey you</from>
    <to variable="song" part="title"/>
    </copy>
    </assign>
    Once your variable has been set correctly, you can simply use it as inputVariable for an invoke.
    There's still one mystery unsolved in the way you can use variables in WS-BPEL: referencing them in expressions. Let's say you have a variable holding a specific value and want to use this value in the condition of a switch case, how do we do that? By using two functions:
    bpws:getVariableProperty ('variableName', 'propertyName')
    bpws:getVariableData ('variableName', 'partName'?, 'locationPath'?)
    The first function accepts the name of your variable and a property (we'll introduce property later but right now you just need to know that a property is a named XPath expression). The second accepts your variable, an optional part and an optional XPath expression relative to the part root.
    It's now time to see your first complete WS-BPEL example. It triggers the execution of a process upon reception of a message and iterates over a value contained in the message until 10. It's a very stupid example and it's probably the last thing you want to do with WS-BPEL (just as a reminder, WS-BPEL is used to orchestrate web services, not iterate over a value) but it illustrates almost everything we talked about in this paragraph.
    <?xml version='1.0' encoding="UTF-8"?>
    <process name="loop"
    targetNamespace="http://www.smartcomps.org/twister/example/loop/process/"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:def="http://www.smartcomps.org/twister/examples/loop/service/"
    abstractProcess="no">
         <variables>
              <variable name="loopVar" type="loopVarType"/>
         </variables>
         <correlationSets>
              <correlationSet name="counterCorrel" properties="def:counterId"/>
         </correlationSets>
         <sequence>
              <receive partnerLink="loopPartner" portType="loopPort" operation="loopOp"
              variable="loopVar" createInstance="true">
                   <correlations>
                        <correlation set="counterCorrel" initiate="yes"/>
                   </correlations>
              </receive>
              <while condition="10 > bpws:getVariableData('loopVar', 'main', '/counter')">
                   <assign>
                        <copy>
                             <from expression="bpws:getVariableData('loopVar', 'main', '/counter') + 1"/>
                             <to variable="loopVar" part="main" query="/counter"/>
                        </copy>
                   </assign>
              </while>
         </sequence>
    </process>
    As you probably already realized, data manipulation can quickly become a bit verbose. The WS-BPEL Technical Committee is currently working on it to have something easier for WS-BPEL 2.0.
    Correlation
    Correlation is a notion that can be a bit hard to grasp at first but is very important. So hang on and I'll do my best to be even more clear (somehow) than usually. During its execution, a process has to interact with several different services. This interaction is stateless so there is no way to make sure you will be addressed to a particular instance of a service. So let's imagine you own a wine store and have a web site allowing users from all over the world to order cheap and very good French wine. A service provided by your bank does the billing for you and you also use a shipper to send the orders all over the world. When a user places an order online, your web site generates an order id. But your bank doesn't know anything about your order id, it creates its own billing id corresponding to your order and you always must use this billing id when interacting with your bank (to confirm the transaction just after shipment for example). The shipper also creates his own shipment id that will be used when he confirms that the order has been sent.
    You want to use a WS-BPEL engine to handle those tasks automatically and orchestrate all the services (there's probably much more than three services and many steps involved). That's a really good idea!!! But how do you deal with all these different ids ? Yep, you guessed it: correlation. How does it work? A correlation is an unique way to identify the interaction of your process execution with a given party. A correlation is a list of property elements and a property element is a named XPath expression. This XPath expression must select a value in the exchanged messages that will be the value of the correlation for this particular message. So for our previous example we would define the following elements:
    <property name="billId" type="xsd:string"/>
         <propertyAlias propertyName="billId" messageType="createBillMessage" part="billInfo" query="billId"/>
         <propertyAlias propertyName="billId" messageType="confirmTransactionMessage" part="billId"/>
         <property name="shipId" type="xsd:string"/>
         <propertyAlias propertyName="shipId" messageType="shipMessage" part="shipId"/>
         <correlationSets>
              <correlationSet name="bankCorrelation" properties="billId"/>
              <correlationSet name="shipperCorrelation" properties="shipId"/>
         </correlationSets>
    A correlation can be composed of more than one property (separated by spaces). A property can also have several aliases for each type of message the correlation is used for.
    Usually a correlation is declared for each actor your process has to communicate with. The correlation is initiated during the first message exchange between your process execution and a party and is reused anytime your process execution sends a message to this party.
    Compensation
    I'm not going to detail this chapter as much as I did for the previous ones. This article is already far too long (and therefore too boring). Talking about compensation in a detailed manner would require another article like this one. But to whet your appetite, I'll tell you what its is and what it is the problem it has been designed to solve.
    Compensation is related to error handling. WS-BPEL processes are usually long-lasting (there could be days between 2 activities), they use asynchronous messages and interact with several different services. Introducing the concept of ACID transactions in this context is quite tough. Each of the services involved can locally use its own transaction but it's impossible within your process to control them (and you probably don't want to). So what can you do if you have three asynchronous operations, like 3 invoke / receive couples, that must be executed in an "all or nothing" fashion? How to cancel the two first operations that have already been committed if the third fails?
    Compensation is basically a set of activities attempting to cancel operations that have already been completed inside an unit of work. If an activity fails or a fault is thrown inside this unit of work, this set of activities is supposed to roll back everything that has been already completed in the unit of work in a way specific to your business case. You are the only one who really knows what to do if something goes wrong so you have to provide the necessary operations.
    But this system has important drawbacks:
    •     It is your responsibility to execute the right activities to handle the cancellation.
    •     All the services you are interacting with must support a way to rollback a previously committed transaction (most probably requiring some hard coding).
    Conclusion
    WS-BPEL has been a bit criticized principally for its absence of human participant interaction (as in conventional workflows), everything is a service. But whether you like it or not, it's already standard and if you use it for what it is good at, a pretty good one. Besides it's a good step in the right direction to standardize the BPM - SOA - 'call it what you like' space. And you can always rely on good products like Twister to introduce Worklist functionalities (remember, always a bit of marketing in a conclusion).
    Resources
    WS-BPEL Specification: http://www-106.ibm.com/developerworks/library/ws-bpel/
    Oasis WS-BPEL Technical committee: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsbpel
    Twister WS-BPEL Open Source Implementation: http://www.smartcomps.org/twister

    Where can I get a document like this for the IQ775? I have asked HP several times, but get no response. I just want to know how to open the damned thing!

  • The data type of "output column "Cookies" (7371)" does not match the data type "System.Int32" of the source column "Cookies"

    I have the following data flow:
    ADO Source
    Input Column: Cookies       ID: 7371      Datatype: DT_NUMERIC
    Output Column: Cookies     ID: 7391      Datatype: DT_NUMERIC
    DATA CONVERSION TASK
    Input Column: Cookies       ID: 1311     Datatype: DT_NUMERIC
    Output Column: Copy of Cookies   ID: 1444    Datatype: DT_I4
    SQL Server Destination
    Input Column: Copy of Cookies    ID: 8733    Datatype: DT_I4
    Output Column: Cookies       ID: 8323     Datatype: DT_I4
    This looks fine to me. Why am I getting the error?
    This is SQL Server 2008 and I am working at this point only in BIDS, so it is not a question of dev vs prod server or anything. One environment, running in BIDS. Other similar data flows seems to be working ok. It seems the error is referring to a datatype
    mismatch in the source--but how can that be?
    Thanks!

    Actually, I am wrong in that Visakh. I think you are correct.
    There are two versions of all tables, one with 15 minute rollups and one with daily rollups. Otherwise the tables are the same--same exact fields. I use a loop with a data flow inside to get data from one version of the rollup and then the other.
    The problem is, for some of the fields with larger values the datatype is NUMERIC instead of INTEGER. (This is Cache database). SO:
    dailyCookies:   Field: CountOne   Datatype:  NUMERIC
    15minCookies:   Field: CountOne   Datatype: INTEGER
    A variable dynamically creates the query so it appends "daily" or "15min" to the beginning of the tables. So on the first loop it does the 15min tables and on the second the daily tables. When I created this particular table I have to plug a default query
    in so I used the daily. It picked up the datatype as NUMERIC so when I run the package it loops through 15min first and sees the datatype is INTEGER.
    How to deal with this? I suppose I could convert the datatype in the source query, but that would be a hassle to do that for some fields and not others. This tables has hundreds of fields, BTW. Can one source object deal with a change of datatypes? SSIS
    is so picky on datatypes compared to other tools....
    Thanks,

  • How to know that a method has been called and returning value of a method

    Hi, everyone! I have two questions. One is about making judgment about whether a method has been called or not; another one is about how to return "String value+newline character+String value" with a return statement.
    Here are the two original problems that I tried to solve.
    Write a class definition of a class named 'Value' with the following:
    a boolean instance variable named 'modified', initialized to false
    an integer instance variable named 'val'
    a constructor accepting a single paramter whose value is assigned to the instance variable 'val'
    a method 'getVal' that returns the current value of the instance variable 'val'
    a method 'setVal' that accepts a single parameter, assigns its value to 'val', and sets the 'modified' instance variable to true, and
    a boolean method, 'wasModified' that returns true if setVal was ever called.
    And I wrote my code this way:
    public class Value
    boolean modified=false;
    int val;
    public Value(int x)
    {val=x;}
      public int getVal()
      {return val;}
       public void setVal(int y)
        val = y;
        modified = true;
         public boolean wasModified()
          if(val==y&&modified==true)
          return true;
    }I tried to let the "wasModified" method know that the "setVal" has been called by writing:
    if(val==y&&modified==true)
    or
    if(x.setVal(y))
    I supposed that only when the "setVal" is called, the "modified" variable will be true(it's false by default) and val=y, don't either of this two conditions can prove that the method "setVal" has been called?
    I also have some questions about the feedback I got
    class Value is public, should be declared in a file named Value.java
    public class Value
    cannot find symbol
    symbol  : variable y
    location: class Value
    if(val==y&&modified==true)
    *^*
    *2 errors*
    I gave the class a name Value, doesn't that mean the class has been declared in a file named Value.java*?
    I have declared the variable y, why the compiler cann't find it? is it because y has been out of scale?
    The other problem is:
    Write a class named  Book containing:
    Two instance variables named  title and  author of type String.
    A constructor that accepts two String parameters. The value of the first is used to initialize the value of  title and the value of the second is used to initialize  author .
    A method named  toString that accepts no parameters.  toString returns a String consisting of the value of  title , followed by a newline character, followed by the value of  author .
    And this is my response:
    public class Book
    String title;
    String author;
      public Book(String x, String y)
       { title=x; author=y; }
       public String toString()
       {return title;
        return author;
    }I want to know that is it ok to have two return statements in a single method? Because when I add the return author; to the method toString, the compiler returns a complain which says it's an unreachable statement.
    Thank you very much!

    Lets take this slow and easy. First of all, you need to learn how to format your code for readability. Read and take to heart
    {color:0000ff}http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html{color}
    Now as to your first exercise, most of it is OK but not this:   public boolean wasModified()
          if (val == y && modified == true)
                return true;
    y being a parmeter to the setValue method exists only within the scope of that method. And why would you want to test that anyways? If modified evaluates to true, that's all you need to know that the value has been modified. So you could have   public boolean wasModified()
          if (modified == true)
                return true;
       }But even that is unnecessarily verbose, as the if condition evaluates to true, and the same is returned. So in the final analysis, all you need is   public boolean wasModified()
          return modified;
       }And a public class has to be declared in a file named for the class, yes.
    As for your second assignment, NO you cannot "return" two variables fom a method. return means just that: when the return statement is encountered, control returns to the calling routine. That's why the compiler is complaining that the statement following the (first) return statement is unreachable.
    Do you know how to string Strings together? (it's called concatenation.) And how to represent a newline in a String literal?
    db

  • 1,000,000 updates per second?

    How could you configure a coherence cluster to handle processing a million stock quotes per sec? The datafeed could be configured as a single app spewing out all 1,000,000/sec or it could be many apps producing proportionately fewer ticks/sec but in any case it's going to total a million/sec. Fractions of the feed spread among multiple physical servers sounds smartest. The quote Map.Entry would probably have a Key of String (or char[] if that's more efficient - i know the max length). The Value would be a price and a size so maybe just those two elements byte[]{Float,Integer} or a java object with Float and Integer member variables. I'd want to trigger actions based on market conditions when the planets align just right so I'm not simply ignoring these values or pub/sub'ing them out to client apps, I'm evaluating many of them simultaneously and using them as event triggers. Is something like that remotely possible? On how much hardware?
    Thanks,
    Andrew

    Andrew,
    Using partitioning, Coherence can handle 1 million updates per second, but the big question is how many updates per second do you need on the hottest instrument at the hottest time?
    The other question is related to "the planets lining up", because that may imply a global view of the market, which becomes more difficult in a partitioned system.
    To provide a high rate of change to data in a partitioned system, the data providers (those with a large amount of data or a high rate of change) should be in the cluster (not coming in over *Extend) to eliminate one hop. To avoid blocking on the tick update from the data provider, it should locally enqueue the update. The queue servicer (a separate thread) should either coalesce whatever ticks are in the queue into a single putAll(), or if every tick needs to be recorded (i.e. all three ticks in the queue like "change to 3.5", "change to 3.55", "change to 3.6" have to be published, instead of just the latest "change to 3.6") then it would batch up everything in the queue until it hits an item that it already has in its batch, and then do a putAll().
    The use of that async publishing mode is what allows for the much higher throughput, particularly when a data provider is producing a huge number of ticks in a given period of time. You can make it even smoother (e.g. avoid outliers caused by some servers being slower) by having more local queues+services (partitioned by Coherence partition, or at the extreme by instrument). You can determine the Coherence partition using the KeyPartitioningStrategy returned from the PartitionedService for the ticks cache.
    Peace,
    Cameron Purdy | Oracle Coherence
    http://coherence.oracle.com/

  • Using FOR .. LOOP counter in handling of PL/SQL procedures with nest. table

    Hi all!
    I'm learning PL/SQL on Steve Bobrovsky's book (specified below sample is from it) and I've a question.
    In the procedure of specified below program used an integer variable currentElement to get reference to the row of nested table of %ROWTYPE datatype.
    Meanwhile, the program itself uses a common FOR .. LOOP counter i.
    DECLARE
    TYPE partsTable IS TABLE OF parts%ROWTYPE;
    tempParts partsTable := partsTable();
    CURSOR selectedParts IS
      SELECT * FROM parts ORDER BY id;
    currentPart selectedParts%ROWTYPE;
    currentElement INTEGER;
    PROCEDURE printParts(p_title IN VARCHAR2, p_collection IN partsTable) IS
      BEGIN
       DBMS_OUTPUT.PUT_LINE(' ');
       DBMS_OUTPUT.PUT_LINE(p_title || ' elements: ' || p_collection.COUNT);
       currentElement := p_collection.FIRST;
       FOR i IN 1 .. p_collection.COUNT
       LOOP
        DBMS_OUTPUT.PUT('Element #' || currentElement || ' is ');
         IF tempParts(currentElement).id IS NULL THEN DBMS_OUTPUT.PUT_LINE('an empty element.');
         ELSE DBMS_OUTPUT.PUT_LINE('ID: ' || tempParts(currentElement).id || ' DESCRIPTION: ' || tempParts(currentElement).description);
         END IF;
        currentElement := p_collection.NEXT(currentElement);
       END LOOP;
    END printParts;
    BEGIN
    FOR currentPart IN selectedParts
    LOOP
      tempParts.EXTEND(2);
      tempParts(tempParts.LAST) := currentPart;
    END LOOP;
    printParts('Densely populated', tempParts);
    FOR i IN 1 .. tempParts.COUNT
    LOOP
      IF tempParts(i).id is NULL THEN tempParts.DELETE(i);
      END IF;
    END LOOP;
    FOR i IN 1 .. 50
    LOOP
      DBMS_OUTPUT.PUT('-');
    END LOOP;
    printParts('Sparsely populated', tempParts);
    END;
    /When I've substituted an INTEGER global variable with such FOR .. LOOP counter, an APEX have returned an error "ORA-01403: no data found".
    DECLARE
    TYPE partsTable IS TABLE OF parts%ROWTYPE;
    tempParts partsTable := partsTable();
    CURSOR selectedParts IS
      SELECT * FROM parts ORDER BY id;
    currentPart selectedParts%ROWTYPE;
    PROCEDURE printParts(p_title IN VARCHAR2, p_collection IN partsTable) IS
      BEGIN
       DBMS_OUTPUT.PUT_LINE(' ');
       DBMS_OUTPUT.PUT_LINE(p_title || ' elements: ' || p_collection.COUNT);
       FOR i IN 1 .. p_collection.COUNT
       LOOP
        DBMS_OUTPUT.PUT('Element is ');
         IF tempParts(i).id IS NULL THEN DBMS_OUTPUT.PUT_LINE('an empty element.');
         ELSE DBMS_OUTPUT.PUT_LINE('ID: ' || tempParts(i).id || ' DESCRIPTION: ' || tempParts(i).description);
         END IF;
       END LOOP;
    END printParts;
    BEGIN
    FOR currentPart IN selectedParts
    LOOP
      tempParts.EXTEND(2);
      tempParts(tempParts.LAST) := currentPart;
    END LOOP;
    printParts('Densely populated', tempParts);
    FOR i IN 1 .. tempParts.COUNT
    LOOP
      IF tempParts(i).id is NULL THEN tempParts.DELETE(i);
      END IF;
    END LOOP;
    FOR i IN 1 .. 50
    LOOP
      DBMS_OUTPUT.PUT('-');
    END LOOP;
    printParts('Sparsely populated', tempParts);
    END;
    /When I've tried to handle this code in SQL*Plus, the following picture have appeared:
    Densely populated elements: 10
    Element is an empty element.
    Element is ID: 1 DESCRIPTION: Fax Machine
    Element is an empty element.
    Element is ID: 2 DESCRIPTION: Copy Machine
    Element is an empty element.
    Element is ID: 3 DESCRIPTION: Laptop PC
    Element is an empty element.
    Element is ID: 4 DESCRIPTION: Desktop PC
    Element is an empty element.
    Element is ID: 5 DESCRIPTION: Scanner
    Sparsely populated elements: 5
    DECLARE
    ERROR at line 1:                                 
    ORA-01403: no data found                         
    ORA-06512: at line 14                            
    ORA-06512: at line 35What's wrong in code(or what I have not understood)? Help please!

    942736 wrote:
    What's wrong in code(or what I have not understood)? Help please!First code. You have collection of 10 elements:
    1 - null
    2 - populated
    3 - null
    4 - populated
    5 - null
    6 - populated
    7 - null
    8 - populated
    9 - null
    10 - populated
    Then you delete null elements and have 5 element collection
    2 - populated
    4 - populated
    6 - populated
    8 - populated
    10 - populated
    Now you execute:
    printParts('Sparsely populated', tempParts);Inside procedure you execute:
    currentElement := p_collection.FIRST;
    This assingns currentElement value 2. Then procedure loops 5 times (collection element count is 5). Element 2 exists. Inside loop procedure executes:
    currentElement := p_collection.NEXT(currentElement);
    which assigns currentElement values 4,6,8,10 - all existing elements.
    Now second code. Everything is OK until you delete null elements. Again we have:
    2 - populated
    4 - populated
    6 - populated
    8 - populated
    10 - populated
    Again you execute:
    printParts('Sparsely populated', tempParts);Now procedure loops 5 times (i values are 1,2,3,4,5):
    FOR i IN 1 .. p_collection.COUNT
    Very first iteration assingns i value 1. And since collection has no element with substript 1 procedure raises no data found.
    SY.

  • Extract int from a string

    Hi,
    I am curious if there is an easy way to extract an int value from a String.
    For example, "Rb23" to get 23. The length of the part in front of the integer is variable.
    Thanks

    this seems to work:
    public int extract(String s) {
         String result = "";
         char c[] = s.toCharArray();
         int j = c.length-1;
         if (!Character.isDigit(c[j])) {
              return 0;
         do {
              result+=c[j--];
         } while (j > 0 && Character.isDigit(c[j]));
         return Integer.parseInt(new StringBuffer(result).reverse().toString());
    }it will return 0 if no numbers are found at the end of the string

  • Help with labsheet

    hello everyone, i am a java student and got stuck on a question. can someone help me UNDERSTANDING and SOLVING the question. your help will be greatly appreciated. NO STUPID ANWSWER please
    Question 1
    Applying the object-oriented concepts of encapsulation and inheritance, implement a
    super class called MyCounter with an integer instance variable called value. The class
    has a default constructor and a user-defined constructor. Its public interface has one
    permissible operation called accessValue() which allows return of its instance variable.
    Implement 2 subclasses of MyCounter called CountUp and CountDn. The CountUp
    class with its derived constructors defines an increment counter that provides the
    increment privilege called increment(). The CountDn class defines a decrement counter
    that provides the decrement privilege called decrement().
    Implement a class called TestMyCounter which will simulate the 2 instances of subclass
    as follow:
    (i). To increment an object of CountUp (with initialize value 11) by 100 times and
    display the final value of its instance variable.
    (ii). To decrement an object of CountDn (with initialize value 22) by 19 times and display
    the final value of its instance variable.

    Robb Salzmann wrote:
    @Mahesh...
    Andrews suggestions are sage and helpful. To get the most from these forums, his advice is good to follow. He make no insistence or "dictation".
    He could have just ignored the question, as countless others already have - I doubt anyone is going to do this guy's homework - but he instead chose to take the time to let the OP know how best to get help.
    "What have you done so far?" is a brief way of saying pretty much the same thing.
    Regards,
    Robb SalzmannSo what if i put things my way? You have done it too Re: does anyone still use the stringbuffer class anymore If the mods feel my post is not needed they can remove it.

Maybe you are looking for

  • Screen size 10 pixels to big after update to 10.4.10

    I have to me at least, a strange problem... my screen size is too big for the monitor. I have a dual-monitor system, btw. When the mouse is at the far right of the desktop, the entire screen area moves in the other direction as to "accomodate" the la

  • Lost All FW Ports !

    Hello there, Suddenly my Mac has lost all Fire Wire ports Any advice please will be much appreciated Message was edited by: another new convert

  • Set order status to completed if subsequent document is a proforma invoice

    Dear Experts, I created a debit memo request to create as subsequent document a proforma invoice only. This special business case has to do with customs purposes and should stop after the creation of the proforma.. Now the debit memo request is still

  • Smartform lyaout

    Hi Can we take more thant one smartforms in one layout type. like i have one layout PINV_LAYOUT . In that layout 2 smartform i added but function module call in programe it is only one for both smartform? so my questiong is that can i add one more sm

  • Net framework error when trying to download adobe photoshop elements 13

    I have tried on multiple computers and still get the same error message.  Please help.