How to Declare Arrays in bpel and use them as acollection

Hi,
I Am new to Bpel, I had created an empty Bpel Process and configured file adapter to a directory, In my text file i have 3 records with four columns, each column seperated by ',' and each record seperated by "EOL(end of line)", Below is the xsd file generated by the native format xsd builder, taken a recieve activity to recieve the contents of file from file adapter.
So all the data which is in the file will be there in recieve activity.
FileContents
55555,rgfdgsd,gfdgfdg,23
66666,retretret,trtertg,21
77777,rtrttreter,trtter,23
My Question is
I want to compare whether value of C1 = '55555' and if the value is equal to 55555 then that record with c1=55555 has to be inserted into database by using Arrays
How to compare the value of c1 through bpel functions.
with java i have to use the logic similar to this by using Xpath
getElement by tagname(c1);- it will give all the elements with tagname c1, three records are there with tagname c1 (c1=55555,c1=66666,c1=77777), we have to iterate through the elemnts and check whether the value iof c1='55555' and get the whole parent block which contains values of c1,c2,c3,c4 and insert that to database
What variables we have to use to get the Similar logic in bpel
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd"
targetNamespace="http://TargetNamespace.com/FileAdapter"
xmlns:tns="http://TargetNamespace.com/FileAdapter"
elementFormDefault="qualified"
attributeFormDefault="unqualified" nxsd:encoding="ASCII" nxsd:stream="chars" nxsd:version="NXSD">
<xsd:element name="Associates">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Associate" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="C1" type="xsd:double" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="C2" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="C3" type="xsd:string" nxsd:style="terminated" nxsd:terminatedBy="," nxsd:quotedBy="&quot;">
</xsd:element>
<xsd:element name="C4" type="xsd:double" nxsd:style="terminated" nxsd:terminatedBy="${eol}" nxsd:quotedBy="&quot;">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
I want to do it by using Arrays,
Please post the step by step procedure like
How to declare an Array?
How to iterate the results in recieve acticity of file adapter and put them to array?
How to compare the values in array with our desired value?
Please Look into this and suggest me the solution.
Regards

I think it is a good option to use transformations. Do you have any critical reason why you want to do this using array?
Little explanation below for your questions.
As per my understanding from variable is the recieve activity variable and to variable is the Array variable is it right?
Yes. Here I was try to build my array from the different source system data. This will append data to the array variable.
How can we declare an array variable in bpel(to variable) with name as Variable_Array, part as payload and query as ArrayList?
*Any element that can hold another element can be a array.
For example if element A is declared as sequence of element B type, then A acts as a array for B*
Could you please explain this also, what is from variable? and what is to variable?
+<assign name="Assign_XPath_For_Array">+
+<copy><from expression="concat('/ns1:ArrayList/ns2:ArrayElem') "/><to variable="Variable_Xpath"/></copy>+
+</assign>+
what is the type of to variable "Variable_Xpath"(String or int etc)?
This creates a dynamic Xpath and store in some variable here. Here the variable is called Variable_Xpath which is a string
similarly what is the type of to variable?
+<assign name="Assign_Read_Array">+
+<copy>+
+<from expression="bpws:getVariableData('Variable_Array','payload',bpws:getVariableData('Variable_Xpath'))"/>+
+<to variable="Variable_Read_Array_Element" query="/ns1: ABC"/>+
+</copy>+
+</assign>+
To variable type is the variable that I read from the Array.
*For example if A is the array holding B, then the to variable is B and from is doing A[counter]*
Every Little Helps
Kalidass Mookkaiah
http://oraclebpelindepth.blogspot.com/

Similar Messages

  • How to retrieve comments from one OfficeTask activity and use them in another OfficeTask activity for Multi level Approval sequential Workflow

    I'm designing a sequential site workflow using Visual Studio 2010 for Project Server 2010. In my case, I have following 6 stages in the workflow:
    1. InitialProposal Stage
    2. Approval Stage1 -- Needs approval from Approver Project Security Group Members1
    3. Rejection Stage
    4. Approval Stage2 -- Needs approval from Approver Project Security Group Members 2
    5. Execution Stage
    6. Completed Stage
    Requirement is workflow should move to Approval stage2 from Approval stage1  if approved by all members of Approver Project Security Group1and it should move to Rejection Stage even if a single member rejects it.
    Workflow should move from Approval Stage2 to Execution Stage if approved by all members of Approver Project Security Group2 and it should move back to Approval Stage1 on rejection by a single member of the group.
    I'm using inbuilt PSWApproval content type and OfficeTask activity for creating approval task for the group members at both stages.
    On task rejected in Approval stage2, task will be assigned again to Approval Stage1 and I want to show comments given by members of Approver Project Security Group2 to the members of Approver Project Security Group1 with this assigned task
    but I'm not able to retrieve comments from officeTask activity.
    My question is where exactly these comments are saved? how can we retrieve them and use them in another officetask activity? If this is not possible then what is the possible solution for meeting above mentioned business requirement?

    Hi Paul,
    Thanks for your suggestion.
    By comments field I'm assuming OfficeTask.Comments field. Problem is, this field is always null. I tried accessing this field in CheckExitCondition activity as well as in OnTaskCompleted but in both the cases, it was null only(I wrote comments while approving
    the task).
    I used a code activity within OnTaskCompleted activity and following code for accessing Comments and Description fields:
    public string officeComments;
            public string officeDescription;
            private void TaskCOmplete(object sender, EventArgs e)
                CodeActivity Sender = (CodeActivity)sender;
                Microsoft.Office.Workflow.Actions.OfficeTask ofctask1 = ((CompositeActivity)Sender.Parent).Parent as Microsoft.Office.Workflow.Actions.OfficeTask;
                officeComments = ofctask1.Comments;
                officeDescription = ofctask1.Description;          
    Please tell me if I'm doing anything wrong here, I'm very new to Workflows. Also, do I need to set any specific property of officeTask for retriving comments?
    Thank you

  • How to create a stored procedure and use it in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • I have lock iPhone 5 from Japan, i don't know from which carrier it  is belongs to currently I am in Saudi Araiba, how can i unlock the phone and use here)

    I have lock iPhone 5 from Japan, i don't know from which carrier it  is belongs to. currently I am in Saudi Arabia, how can i unlock the phone and use here)
    <Personal information edited by Host>

    You can't.

  • How to create RFQ s and use them to complete the program

    hi,
    how to create RFQ s and use them to complete the program
    thanks in advance

    Hi Santosh,
    RFQ is created through transaction ME41.
    You need to write down BDC for mass update of RFQ, because BAPI is not available.
    Regards,
    Tutun

  • Once made a selection in photoshop how do you export in Illustrator and use it with a cutting plotte

    once made a selection in photoshop how do you export in Illustrator and use it with a cutting plotter?

    Plotters require continuous paths. Convert the selection to a path and clean it up suitably. Copy&paste it to Illustrator and use it as a clipping mask on your artwork or whatever. You may also need to create a duplicate layer/ separate PDF file file. Talk to the people doing the plotting.
    Mylenium

  • How to disable the security code and use only the Touch ID

    how to disable the security code and use only the Touch ID

    You can't use Touch ID without a passcode.
    http://support.apple.com/kb/HT5883

  • How to prevent people asking how to prevent "click to activate and use this control"

    When I visit the fourms, I keep seeing these questions about
    how to disable
    "click to activate and use this control". Its really annoying
    and
    disrupting my web experience. I do know this really this is a
    blatant
    attack on Adobe and Flash by Microsoft and is obviously
    related to the Adobe
    takeover of Macromedia, and probably also related to the fact
    that it is now
    impossible for anyone to install Flash Player (which Adobe is
    ignoring
    because their support is so useless since the takeover). Is
    there something
    I can do to prevent these questions being posted? I've
    searched all the
    forums and cannot find any information. Surely someone else
    has had this
    problem.
    Jeckyl

    Some people don't like to search...
    Some people don't know what to search...
    Some people don't even know there is a search...
    Just ask them to search for "click to activate and use this
    control".
    Search
    Flash Support Forums
    Search
    Google

  • New help with my mac air and airport extreme time capsule dont know how to save to time capsule and use as a external hd

    new help with my mac air and airport extreme time capsule dont know how to save to time capsule and use as a external hd would like 2 store my home videos and pictures on the time machine (ONLY) as the MAC AIR has storage space limited space please help. THANK YOU.

    See the info here about sharing or using the TC for data.
    Q3 http://pondini.org/TM/Time_Capsule.html
    It is extremely important you realise.. the Time Capsule was never designed for this.
    It is a backup target for Time Machine.. that is the software on the computer that does backups.. it has no direct connection to the Time Capsule.
    It has no ability to back itself up.. unlike all other NAS in the market. It is therefore likely one day you will lose all your files unless you seriously work out how to backup.
    The TC is slow to spin up the hard disk and fast to spin down. iTunes and iPhoto will continually lose connection to their respective libraries.
    iPhoto in particular is easy to corrupt when you move photos over wireless into the library.. once corrupted all is corrupt. A single photo will ruin it all.. so backup is utterly essential.
    Time Machine cannot do backups of network drives. ie the TC. You will need a different backup software like CCC. You will then need another target to backup to..

  • How many computers can i install and use lightroom 5 with a single purchase?

    I've got 2 desktops and a laptop at home. Can i install lightroom 5 and use them on all 3 devices? The database is a cloud system or will it be in the local drive?

    you can concurrently install and activate on two computers.
    you can save files using adobe's cloud file service (mainly to sync your files) but you should always have local copies saved.

  • How do I process multiple files and turn them from raw to jpeg

    How do I process multiple files and turn them from raw to jpeg. Ive tried and it seems to go through the files but doesnt seem to process them or store them in the selected folder

    Yes that was the first thing I did. Then I used the process multiple files and selected a new folder to put them in and selected use open files and selected to turn them into jpeg. The images flash on the screen like they are being processed, but the folder never appears in library. Is it possible because there are a couple 16 bit files open that this corrupts the task. Do I need to create the folder first. Will elements not create the folder on its own.
    Thanks Vince

  • How to keep the Sonogram settings and make them "Sticky"?

    I am a Forensic Audio Examiner and would love to use Soundtrack Pro. Does anyone know how to keep the Sonogram settings and make them "Sticky" so you don't have to reset it every time you open up the project?
    Also the Sonogram loses it's frequency range settings while changing the zoom.
    Where is the feedback link for this application?
    Thanks

    are you talking about the spectrum analysis?

  • External definition and used them as Data Type Templates

    hi all
    how to Develop external definition and used them as Data Type Templates .
    Thank u
    Swari

    HI
    External Definitions: If a definition of the message structure exists in wsdl, xsd, dtd formats, we can use it in the integration repository by importing it as an external definition.
    External Definations:
    An external definition enables you to import a local WSDL, XSD, or DTD file to the Integration Repository and specify which parts of the schema to extract as the description for a message. You can use these extracted message schema as:
    Output or input messages in message interfaces
    Source or target structures for message mappings
    There is a series of standard schema for describing the message structure at runtime. WSDL (Web Service Description Language), XSD (XML Schema Definition Language), or DTDs (Document Type Definitions) are often used to describe message schema. If a description of the message structure already exists in one of the above formats, you can use it in the Integration Repository by importing it as an external definition rather than re-entering it manually using the data type editor.
    Have a look at
    http://help.sap.com/saphelp_nw04/helpdata/en/43/ce49ef1019087ae10000000a1553f6/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/d4c23b95c8466ce10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/9e97b0f525d743882936c2d6f375c7/content.htm
    cheers

  • All of a sudden, my settings have been changed, my homepage, and EVERYTHING. No matter how many times I go in and change them again, the SAME pages open up when I start FireFox and I am constantly being asked if I want Yahoo as my start page and default s

    I don't know what happened. All of a sudden, my settings have been changed, my homepage, and EVERYTHING. No matter how many times I go in and change them again, the SAME pages open up when I start FireFox and I am constantly being asked if I want Yahoo as my start page and default search engine. I click the box 'do not ask me again' and it comes up EVERY TIME. I change things like I don't want history remembered, and when I reload FireFox again, it's back to the way it was BEFORE. EVERY SINGLE TIME. I don't know why this is happening, or how to fix it. What do I do??

    I do not want to download another virus program.. I do not believe it is a virus. I am running the full version of Norton 360 and it is doing a daily scan. I have Windows 7, 64 bit OS.
    This is very irritating !! If I wanted Yahoo I would ask for it !

  • I purchased two albums from iTunes but neither properly loaded and I cannot play any of the songs.  I have prevously loaded other albums with no problems.  How do I delete these albums and reload them?  I don't see iTunes on iCloud.

    I purchased two albums from iTunes but neither properly loaded on my iPad Mini and I cannot play any of the songs.  I have prevously loaded other albums with no problems.  How do I delete these albums and reload them?  I don't see iTunes on iCloud.

    If the albums do appear in the Music app, hold down on the album icons and the X to delete will pop up on the icons. Tap the X to delete the albums.
    You don't see a anything in iCloud, you see your previous purchases in the purchased tab of the store that you bought the content in. So you find your music purchases in the purchased tab of the iTunes app on your iPad. Tap on Purchased and look for the albums in the Not on this iPad section - assuming that you are able to delete the albums from the device.

Maybe you are looking for