String[] in input , how to manage with foreach block?

hi,
my situation is this :
i invoke a web service which has a array of string (String[]  ) in output , i was thinking to manage it with a foreach block, invoking a second web service able to read the single strings..
the first block is the invoke to a web service 1 that returns me $InvokeWS1_uotputVariable/return, which  value is the array  String[]
in the foreach block i have start value  1 and  finale value : count($InvokeWS1_outputVariable.parameters/return)
than i'm trying to manage every string with the invocation to webservice 2 inside the foreach block , which will read it., i assign it a single string using an assign block with this assignement :
$InvokeWS1outputVariable.parameters/return[$foreach1Counter] associated with $InvokeWS2inputVariable.parameters/arg0.
the problem is that inside the foreach statement every invocation to the second web service gets only the first element in the array.
Anyone knows if  i managed it correctly?

This blog post of mine uses for each- http://blogs.sun.com/malkit/entry/dynamic_services_composition_in_bpel. Please take a look at the attached project.
If you still have some questions, please let us know.
- Malkit S. Bhasin

Similar Messages

  • Problem with ForEach block in BPM

    Hi,
    I have a scenario as follows:
    Collecting Idocs and send them separately via file channel (Does not make so much sense but I want to get used using the forEach Block)
    Loop (as long as "control" != false)
    Fork
    1. branch: Wait step 1 minute and container operation assign "control" = false (if no more idoc is received, loop stops after 1 minute)
    2. branch: receive step with correlation, container operation with append to multiline message, container operation assign "control" = true
    Mapping
    multiline message to single line message (same interface)
    ForEach Block
    Send Step with single line message
    My problem:
    x idocs get collected by the BPM and my file channel posts x idocs to the directory but it is always the same idoc and not x different ones.
    Any idea on that?
    Regards.
    Oliver.

    Yes, that's the blog I used.
    I have used the same interface for Send/Receive Steps, the Multi-Line Element and the Current Line Element. I restricted the Current Line Element to the block. Any other definition would not show up in the dropdown list, anyway.
    These are my settings for the Block:
    Step Name: Block1
    Description: [Blank]
    Mode: ForEach
    MultiLine Element: Idoc_Multi
    CurrentLine: Idoc_Local
    End Condition, Exceptions and Local Correlations: [Blank]
    Here are the settings for the Send Step:
    Step Name: Send1
    Description: [Blank]
    Mode: Asynchronous
    Create New transaction: [Not marked]
    Message: Idoc
    Ack: None
    Receiver from: Send Context
    All others: [Blank]
    I don't see any error?
    Regards.
    Oliver.

  • How to work with two blocks in one form

    i need help,i moved the control from block(abc) to another block(xyz) using go_block('xyz') and then i insert record to block(abc) but the record is not inserted to the table .
    i used previous_block but it is not working
    how to use it.

    Hi,
    You have written the code in when-window-activated? If yes then as soon as the window of xyz is activated the code starts running and populating the data (i.e. department code and its name) from table to the block, one by one. It seems that the block 'xyz' is like detail block. Am I right? U want the record row by row, isn't it?
    In this case, have you been able to populate your xyz block more than 1 records by the help of the code you have written ? If yes then use commit_form in the when-button-pressed trigger associated with the proposed button.
    I just can't understand how your code populates xyz block when you are writing :
    fetch DEPARTMENT into :DEPARTMENTS.DEP_CODE,:DEPARTMENTS.DEP_NAME;
    instead of fetch DEPARTMENT into :xyz.DEP_CODE,:xyz.DEP_NAME;
    Pls tell me the detail result you r getting.
    Regards,
    Pragati.

  • How to manage with the required attribute with the h:selectOneMenu ?

    dear all,
    I have form with some drop down list.
    All have a default value to invite user to select a criteria.
    By submitting my form I have an actionListener method wich check validity of the fields.
    I would like to display a message near the <h:selectOneMenu> to point the attention of the user about selection must be done.
    I try following:
    <h:selectOneMenu  id="idContractNature" required="#{applicationController.requiredContract}" partialSubmit="true" valueChangeListener="#{applicationController.valueChangeContractType}" value="#{applicationBackingInfo.opportunityInfo.contractNatureId}">                          
                   <f:selectItems    id="SlctContractNatureItms" value="#{applicationDefaultDataController.contractNatures}"/>          
    </h:selectOneMenu>
    <h:message for="idContractNature"></h:message>I set the required attribute to true in the actionListener method if the contract id is equal to 0 (my default value)
    But it doesn't work.
    How can i check the validity of the drop down list?
    I set the required attribute to true when the

    thanks but can set null for the value of the default value due to:
    Can't set property 'contractNatureId' of type 'int' on class '....' to value 'null'.
    because it's a list SelectItem with int / string

  • How to use with ForEach in bpel

    Hi,
    I create ForEach
    My case:
    users.xsd with no limit the final counter (unbound)
    I send 3 records objecc as user
    restart the counter = 0
    final counter value = 3
    Result: insert the first row only (or 3 thimes the same first row - first element from th e xsd file request)
    Exapted: insert all 3 users from the requset.
    I want to be able to send dinamyc array! in the xsd file with no limit the final counter (unbound)
    The xsd creared with wsdl from database.

    This blog post of mine uses for each- http://blogs.sun.com/malkit/entry/dynamic_services_composition_in_bpel. Please take a look at the attached project.
    If you still have some questions, please let us know.
    - Malkit S. Bhasin

  • How to encrypt with a string as input,but not a key object

    As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can not generate the same key with the same input.Does there is a method which can generate a same with the same input string?
    There is a need to transfer file between to site,and the customer wish to encrypt these files during transfering,and they want to store a string into each database at each site,when sending and receiving files,get the string from the database to encrypt or decrypt the file,they alse want to have a control of the string,they can change the string randomly if they wish as long as long keep each string is equal,how to realize this?

    I think what you are looking for is a password based encryption (PBE). An example of using the same is mentioned in JCE reference guide. Below is the relevant code/docs from the rference guide.
    Using Password-Based Encryption
    In this example, we prompt the user for a password from which we derive an encryption key.
    It would seem logical to collect and store the password in an object of type java.lang.String. However, here's the caveat: Objects of type String are immutable, i.e., there are no methods defined that allow you to change (overwrite) or zero out the contents of a String after usage. This feature makes String objects unsuitable for storing security sensitive information such as user passwords. You should always collect and store security sensitive information in a char array instead.
    For that reason, the javax.crypto.spec.PBEKeySpec class takes (and returns) a password as a char array.
    The following method is an example of how to collect a user password as a char array:
         * Reads user password from given input stream.
        public char[] readPasswd(InputStream in) throws IOException {
            char[] lineBuffer;
            char[] buf;
            int i;
            buf = lineBuffer = new char[128];
            int room = buf.length;
            int offset = 0;
            int c;
    loop:   while (true) {
                switch (c = in.read()) {
                  case -1:
                  case '\n':
                    break loop;
                  case '\r':
                    int c2 = in.read();
                    if ((c2 != '\n') && (c2 != -1)) {
                        if (!(in instanceof PushbackInputStream)) {
                            in = new PushbackInputStream(in);
                        ((PushbackInputStream)in).unread(c2);
                    } else
                        break loop;
                  default:
                    if (--room < 0) {
                        buf = new char[offset + 128];
                        room = buf.length - offset - 1;
                        System.arraycopy(lineBuffer, 0, buf, 0, offset);
                        Arrays.fill(lineBuffer, ' ');
                        lineBuffer = buf;
                    buf[offset++] = (char) c;
                    break;
            if (offset == 0) {
                return null;
            char[] ret = new char[offset];
            System.arraycopy(buf, 0, ret, 0, offset);
            Arrays.fill(buf, ' ');
            return ret;
        }In order to use Password-Based Encryption (PBE) as defined in PKCS #5, we have to specify a salt and an iteration count. The same salt and iteration count that are used for encryption must be used for decryption:
        PBEKeySpec pbeKeySpec;
        PBEParameterSpec pbeParamSpec;
        SecretKeyFactory keyFac;
        // Salt
        byte[] salt = {
            (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
            (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
        // Iteration count
        int count = 20;
        // Create PBE parameter set
        pbeParamSpec = new PBEParameterSpec(salt, count);
        // Prompt user for encryption password.
        // Collect user password as char array (using the
        // "readPasswd" method from above), and convert
        // it into a SecretKey object, using a PBE key
        // factory.
        System.out.print("Enter encryption password:  ");
        System.out.flush();
        pbeKeySpec = new PBEKeySpec(readPasswd(System.in));
        keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
        SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
        // Create PBE Cipher
        Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
        // Initialize PBE Cipher with key and parameters
        pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);
        // Our cleartext
        byte[] cleartext = "This is another example".getBytes();
        // Encrypt the cleartext
        byte[] ciphertext = pbeCipher.doFinal(cleartext);Hope this helps
    Sai Pullabhotla

  • How to proceed with a requirement on changing the input type

    I have a requirement that seems rather simple yet I am having a hard time achieving it. What I have is a table where there is a Data_Value field and a Data_Type field. The Data_Value is stored in the database as a VARCHAR2(100) and the Data_Type contains the following values: STRING, DATE, DATETIME, NUMBER.
    The page I am working on is an update page, and what I am hoping to achieve through PPR is that whenever the user changes the Data_Type (I have these in a messageChoice) that the Data_Value will then be rendered with the correct settings.
    Originally I thought that I could just programmetically change the DataType property in the messageTextInput I am using, but this was causing errors since I had it bound to that field in the view which is a Varchar. I then thought that I could create one field of each type and render the one I want based on the selection, but I am getting an error saying: Data Type - Attribute set for DataType in view object Xo2cCustAcctUpdateVO1 failed whenever a new value is picked from my picklist.
    Does anyone have some suggestions on how I should tackle this issue? As a last resort I thought about just leaving that field as a String (which is how it is stored anyway) and do some validation in my controller to ensure it is formatted correctly.
    Thanks,
    Greg

    Greg,
    The simplest approach would be to define one field per data type and toggle them based on the data type selected from the choice bean. Use SPEL and PPR.

  • How many domains can Prime Collaboration Advanced manage with the BE6000?

    The BE6000 Administration guide states that "Most BE6K deployments have a single domain as part of a Standard Prime installation. Multiple domains are available with Prime Collaboration Advanced (available for purchase) that can be used for complex Business Edition 6000 deployments."
    How many domains can Prime Collaboration Advanced manage with the BE6000 solution? How do we order and deploy Prime Collaboration Advanced with the BE6000 solution?

    http://docwiki.cisco.com/wiki/System_Capacity_for_Cisco_Prime_Collaboration_10.0

  • How do I disable Firefox's Download functionality, I would like to use another download manager with Firefox...many thanks Bruce

    Hi I am using version 3.6.15 with Windows 7, I would like to use another download program in place of Firefox's default option, how can I disable this in Firefox
    Many thanks
    Bruce Baxter

    Use this extension to integrate an external download manager with Firefox. <br />
    https://addons.mozilla.org/firefox/220/<br />
    http://www.flashgot.net/whats

  • My ipod 4th generation wont show up on itunes or my compute, but there is a file for USB mass storage device in my device management with a yellow triangle next to it. how do i get it to sync? HELP!!!

    my ipod 4th generation wont show up on itunes or my compute, but there is a file for USB mass storage device in my device management with a yellow triangle next to it. how do i get it to sync? HELP!!!

    Here:
    iOS: Device not recognized in iTunes for Windows
    I would start with
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    or
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP

  • How to install Oracle BPEL Process Manager with the BEA WebLogic

    Hi ,
    I will install Oracle BPEL Process Manager with BEA WebLogic 9.2(MP2). I have download orabpel_10133_WebLogic.zip ,then Modify the following mandatory installation properties in the orabpel_10133_WebLogic\bpelDomain.properties file:
    # BEA_HOME is the path where Weblogic is Installed
    BEA_HOME=/opt/bea
    # JAVA_HOME is the path of jdk folder inside your weblogic
    JAVA_HOME=/opt/bea/jrockit90_150_10
    # DOMAIN_HOME is the path where you wish to create your domain called BPELDomain
    DOMAIN_HOME=/opt/bea/user_projects/domains
    # APPS_HOME is the path where you wish to copy your applications and adapters that are required for oracleBPELServer
    APPS_HOME=/opt/bea/user_projects/apps
    # BEA_HOME is the path where BPEL PM is Installed
    BPEL_HOME=/home/oracle/bpel/product/10.1.3.1/OraBPEL_1/bpel
    # DRIVER_TYPE is the datasource class that installable use to create a datasources for oracleBPELServer
    DRIVER_TYPE=oracle.jdbc.xa.client.OracleXADataSource
    # DB_URL is the url to connect to orabpel schema
    DB_URL=jdbc:oracle:thin:@16.157.134.17:1521:orcl
    # DB_USER is the user Id for orabpel shema in database
    DB_USER=ORABPEL
    #DB_PASSWORD is the password for orabpel schema in database
    DB_PASSWORD=bpel
    #BPEL_SERVER_NAME is the server i.e. to be created under BPELDomain
    BPEL_SERVER_NAME=oracleBPELServer
    #PROXY_HOST is the Host name of the proxy server
    PROXY_HOST=www-proxy.us.oracle.com
    #PROXY_HOST=
    #PROXY_PORT is the Port where the proxy server is running
    PROXY_PORT=80
    #PROXY_PORT=
    #NON_PROXY_HOST is the list of non proxy hosts that are divided by a | symbol
    #NON_PROXY_HOST=*.oracle.com|*.oraclecorp.com|localhost|127.0.0.1|stbbn10|stbbn10.us.oracle.com
    NON_PROXY_HOST=*.oracle.com|*.oraclecorp.com|localhost|127.0.0.1|stbbn10|stbbn10.us.oracle.com|16.157.134.135
    When I run the setup.sh , it will report
    BUILD FAILED
    /opt/software/WL_Installables/build.xml:131: Traceback (innermost last):
    File "./wl_scripts/bpelDomain.py", line 22, in ?
    File "./wl_scripts/createGroupsAndUsers.py", line 4, in ?
    weblogic.management.utils.AlreadyExistsException: [Security:090267]Group BpelGroup
    Actully ,there is no BpelGroup in Weblogic. Does anybody know how to solve it ?

    MAke sure you have not set ANY environment variable related to Oracle / BEA / Java / LD_library path. Use the following script to unset / set the initial settings:
    #!/bin/sh
    unset ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_TERM
    unset LD_LIBRARY_PATH LD_LIBRARY_PATH_64
    unset CLASSPATH JAVA_HOME
    export PATH=.:/usr/sbin:/usr/bin:/usr/local/bin:/opt/VRTS/bin
    export BEA_HOME=/appl/oracle/products/9.2/weblogic
    Marc
    http://orasoa.blogspot.com

  • How to process Fisacl year change for Investment Management with Project?

    How to process Fisacl year change for Investment Management with Project as measure

    hi
    check this menu path
    Accounting  --> Investment Management  --> Programs  --> Periodic Processing  --> Fiscal Year Change

  • How to address digital input & output, analogue input & output when communicate with mitsubishi fx1n plc

    dear all,
    i am new to labview, how to code or address digital input & output, analogue input & output when communicate with mitsubishi fx1n plc or crouzet plc.
    pls help.
    HM

    http://search.mywebsearch.com/mywebsearch/redirect.jhtml?searchfor=mitsubishi+fx1n&cb=ZO&p2=%5EZO%5E...
    Try the above link. I know it is a screen-full, but is a search result for Matrikon. They have a whole slew of OPC servers/clients you can try out. Personally, I would go with their OPC server for the Mitsubishi, and use Labview Datasockets. That would be the simplest with the lowest learning curve.
    Otherwise, if you wish to use Modbus, you would have to get the commands/syntax from Mitsubishi; might be in their user manual, but I wouldn't lay bets on it. With the Matrikon stuff, the syntax is all built in.
    Good luck which ever way you decide to go.
    Dave

  • How to Migrate 10g sso integrate with EBS 11.5.10.2  to 11g OAM(oracle access manager) with R12.1.3

    How to Migrate 10g sso integrated with EBS 11.5.10.2  to 11g OAM(oracle access manager) with R12.1.3
    Os:Linux 64 bit
    database:11.2.0.3 Rac

    Hi,
    You could try working through the EBS -> APEX integration article on the Apex community site (http://www.oracle.com/technetwork/developer-tools/apex/apex-ebs-wp-cabot-consulting-169064.pdf)
    Rod West

  • How to manage J2EE Container with GUI?

    I have used Oracle9i J2EE Container for 6 months. I have managed via command-line (on Win2000). It's not convenient for admin the server. I searched for the documents about manage with GUI, admin tool or Enterprise Manager but I found a few document on Oracle website that didn't help me too much.
    Does anybody suggest me about any admin tool or how to use + configure Enterprise Manager or where to find rich documents?
    Thank you so much

    Narong,
    Enterprise Manager is available with Oracle9iAS Release 2 and OC4J is a managed component withiin Oracle9iAS. You have to download Oracle9iAS Release 2 from OTN(may be just J2EE Webcache edition) if you want to use the GUI tool.
    You can use the following link to download Oracle9iAS Release2 http://otn.oracle.com/software/htdocs/devlic.html?/software/products/ias/htdocs/winsoft.html
    regards
    Debu Panda
    Oracle

Maybe you are looking for