Problem: check random array with a static value

My goal is to use the random number generator to put numbers into randomArray, then do a linear search to try to find if the number 5 has been generatated. Next print out where in the array the value can be found. I have no compile errors but I have a logical or syntax problem, any help would be great.
public class test {
     int j;
     int target = 5;
     public static void main(String [] args) {
          int i;
          int[] randomArray = new int[20];
          for(i=0; i<randomArray.length; i++) {
               randomArray[i] = (int)(Math.floor(Math.random() * (10.0 - 0.0)) + 0.0);
          test n = new test();
          n.display();
     public int arraySearch(int[] randomArray, int target) {
          for (j=0; j<randomArray.length; j++) {
               if (randomArray[j] == target) {
                    return j;
          return -1;
     public void setArraySearch(int j) {
          j = j;
     int p;
     public void setArrayValues(int[] randomArray) {
          for (int k=0; k<randomArray.length; k++) {
               p = randomArray[k];
     public void display() {
          System.out.println("Five is found in array position " + j);
          System.out.println(p);
}

Hi,
That's correct. You need to call the other methods just as you call display, but you do also have some other minor problems. You have written some methods that aren't needed, and they do nothing. This might help you:
public class test {
     public static void main(String [] args) {
          int i;
          int[] randomArray = new int[20];
          for(i=0; i<randomArray.length; i++) {
               randomArray[i] = (int)(Math.floor(Math.random() * (10.0 - 0.0)) + 0.0);
          test n = new test();
          int indexFound = n.arraySearch(randomArray, 5);                
          n.display(indexFound );
     public int arraySearch(int[] randomArray, int target) {
          for (j=0; j<randomArray.length; j++) {
               if (randomArray[j] == target) {
                    return j;
          return -1;
     public void display(int indexFound) {
          System.out.println("Five is found in array position " + indexFound);
} /Kaj

Similar Messages

  • How to filter an array with a string value

    I want to filter out all Strings in an array that don't have a certain value in them aka. I want only to see values that start with b or bi or bit etc...
    How can I accomplish this?
    Thanks

    This is another one of those things where I'm surprised it's not in the JDK. It's needed sufficiently frequently, and other languages (esp. scripting languages) seem to support this thing commonly.
    Anyway...when I need something like this (that seems as though many others need it as well and it ought to be in the JDK but isn't), the first thing I do is check Apache Jakarta Commons to see if someone has already written such a thing in a reasonably well-supported toolkit. It's worth a look.

  • How to check Radio buttons with Differfent button values

    Good Day,
    I am currently trying to write a script that would hide 5 of 6 radio buttons
    I have a radio button called "3. Transfer"
    with values of :
         Yes;
         Supp;
         Reg; and
         do_not_transfer
    as well I have a drop down called "REL.ITEM"
    with values of
              3(A);
              3(B);
              4(A);
              4(B); and
              4(C)
    I know how to get the value of the box and manipulate other fields
    like
    //START
    var transfer = getField("3. Transfer").value
    var relitem = getField("REL.ITEM").value
    if (transfer = "Yes" || transfer = "Supp") && (relitem == "4(C)" || relitem == "4(B)"))
         getField("a. recommend").checkThisBox(0,true);
         getField("a. recommend").display = display.visible
        getField("a. I do not recommend").checkThisBox(0,false);
        getField("a. I do not recommend").display = display.hidden
    else if (transfer = "do_not_transfer")
         getField("a. recommend").checkThisBox(0,false);
         getField("a. recommend").display = display.hidden
         getField("a. I do not recommend").checkThisBox(0,ftrue);
         getField("a. I do not recommend").display = display.visible
    //END
    I would like to make it so that if REL.ITEM != 4(A); 4(B); 4(C) that the radio box's with values of "Yes", "Supp" and "Reg" are hidden while "do_not_transfer" is still displayed and checked.
    I've been going through forums, google and acrobat documentation and I can't seem to find what I'm looking for.
    Thanks for your help in advance.

    if (transfer = "Yes" || transfer = "Supp") && (relitem == "4(C)" || relitem == "4(B)"))
    This should be:
    if ((transfer == "Yes" || transfer == "Supp") && (relitem == "4(C)" || relitem == "4(B)"))
    Similarly,
    else if (transfer = "do_not_transfer")
    should be:
    else if (transfer == "do_not_transfer")
    In order to work with an individual widgets of a form field, obtain an object that represents the widget using the getField method as specifically demonstrated in example #2 in the documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.476.html

  • Initializing arrays with non-default values

    Hi,
    I have a large array (300+ elements) and want it to be filled with all -1 at the start and not with 0.
    A couple of (bad) ideas of mine:
    - using an expression "array[0] = -1, array[1] = -1, ..." (a lot of typing work)
    - using a for loop with an expression "array[Locals.k] = -1" (very slow)
    - getting the array from "somewhere else" like e.g. a LabVIEW VI (cumbersome)
    Is there some expression syntax I can use?

    You can use SetElements(Locals.d,-1)  where d is the array.

  • Checking an Array with a form input field to return true or false?

    I have an array that when dumped, lists dates for all days of the month. There is a form, where the user specifies the date and when submitted, transfers to a processing.cfm file which is where i want the <cfif> to check if the date specified in form exists in the array (this way, it only limits the user of only being able to select a date from this month for an event). Is it possible to have a cfif where it will check whether or not the array contains the date the user has specified and the return true (if contains the date specified), and transfers the form to email.cfm (where it will email all the form inputs) or will return false (if outside that range) then return back to the eventform.cfm?

    Nevermind. Figured it out.
    Heres my code if it will help anyone:
    <!---CFSET's--->
                    <cfset theDate = Now()>
                    <cfset NextMonth = DateAdd('m', 1, theDate) />
                    <cfset nextMonthNum = daysInMonth(#NextMonth#) />
                    <cfset weekNum = (#weekOfMonth(now())#) />
                    <cfset daysNum = daysInMonth(now()) />
                    <cfset dateToday = Now()>
                    <cfscript>
                                                      function weekOfMonth(thisDate) {
                                                                var thisDay=day(thisDate);
                                                                var thisWeek=0;
                                                                if (thisDay LTE 7)
                                                                thisWeek=1;
                                                                else if (thisDay GT 7 AND thisDay LTE 14)
                                                                thisWeek=2;
                                                                else if (thisDay GT 14 AND thisDay LTE 21)
                                                                thisWeek=3;
                                                                else
                                                                thisWeek=4;
                                                                return thisWeek;
                                            </cfscript>
                    <cfset datearray = ArrayNew(1)>
                    <cfif #DatePart('w', TheDate)# GTE 2 AND #weekNum# GTE 3>
                        <cfloop index="x" from="1" to="#daysNum#">
                                      <cfset datearray[x] = "#DateFormat(now(), "mm")#/#x#/#DateFormat(now(), "yy")#" />
                                <cfset recordnumber = #x#>
                                                      </cfloop>
                        <cfloop index="y" from="1" to="#nextMonthNum#">
                                  <cfset potato = #y# + #recordnumber# >
                                      <cfset datearray[potato] = "#DateFormat(NextMonth, "mm")#/#y#/#DateFormat(NextMonth, "yy")#" >
                        </cfloop>
                                  <cfelse>
                                  <cfloop index="z" from="1" to="#daysNum#">
                                <cfset datearray[z] = "#DateFormat(now(), "mm")#/#z#/#DateFormat(now(), "yy")#">
                                  </cfloop>
                            </cfif>
                    <cfif #arrayContains( datearray, "#form.activitydate#" )#>
                              <cflocation url="monkey.cfm">
                                  <cfelse>
                                      <cfset datetrue = "no">
                                <script>
                                                                                    alert("Date Not Valid. Please Specify Event Date Within Valid Range.<br>(Allow a couple seconds to refresh)")
                                                                                    history.go(-1)
                                                                          </script>
                    </cfif>

  • Problem Bubble sorting random array

    For my CompSci class I have to create an array with random number in it and then do a bubble sort. I was able to create the array and input the variables in it but when it bubble sorts the array none of the values in the sorted array correlate to the original integers in the array.
    Any help would be greatly appreciated.
    public class RandomSort {
    public static void main(String[] args) {
        final int ARRAY_SIZE = 20;
        final int RAND_MIN = 0;
        final int RAND_MAX = 100;
        int [] randomSort = new int [ARRAY_SIZE];
        int i;
        for (i = 0; i < randomSort.length; i++)
            randomSort[i] = (int) (Math.random()*(((RAND_MAX - RAND_MIN)+1)+RAND_MIN));
        for (i=0; i<ARRAY_SIZE; i++)
                for (int j = 0; j <=i-1; j++)
                        if (randomSort[j] > randomSort [j+1])
                            int temp = randomSort[j];
                            randomSort[j] = randomSort[j+1];
                            randomSort[j+1] = temp;
                System.out.println(randomSort);

    Mmmhhh....
    for (i = 0; i < ARRAY_SIZE; i++) {
         for (int j = ARRAY_SIZE - 1; j >= i + 1; j--) {
              if (randomSort[j - 1] > randomSort[j]) {
                   final int temp = randomSort[j - 1];
                   randomSort[j - 1] = randomSort[j];
                   randomSort[j] = temp;
         System.out.println(randomSort);
    Pffff....9
    31
    32
    33
    34
    36
    37
    39
    45
    63
    64
    81
    84
    85
    86
    91
    94
    94
    99
    100Aarrfff...  [http://en.wikipedia.org/wiki/Bubble_sort|http://en.wikipedia.org/wiki/Bubble_sort]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Query Issue with adding a static value

    I have written a query in SAP that works the way I need it to. I am going to schedule it so that SAP does a file transfer of the output to another area where the data will be accumulated.
    My problem is that I want the name of the system to appear at the end of each line but it is not in any table I can find to match up with the userid.
    EX:
    UserID        Group                          System
    JDOE         HR Query Group            P201
    The field for system is not in any tables but I want to add it and give it a constant/static value all the time in the output.
    Any ideas?
    Thanks!
    Justin Dauby -- SAP Security Analyst
    Kimball International Inc.,

    The name of the system is not in a table, but rather a structure called SYST. You can evaluate it using the system field sy-sysid.
    Another option is to call function module RFC_SYSTEM_INFO. The export parameter RFCSI_EXPORT will deliver the system id from component RFCSYSID of the structure RFCSI.
    Cheers,
    Julius

  • Problem in aligning dynamic UI with the static UI

    Hi All,
    I have problem in aligning dynamic UI with the static UI, I am using Matrix layout.
    Static fields are spread over 2 colums and 3 rows:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    Now when a value is selected in C, than E becomes visible, and depending on the values selected in E, there are dynamic UI generated, i.e dynamic lables and depending on some validation it will be either a dropdowns or input fiels or both.
    at run time screen is like this:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dynaSPACEdropdown
    dynbSPACEinput field
    if I change my selection in E than layout looks like:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dynaSPACESPACEdropdown
    dynbSPACESPACEinput field
    Requirment: I need all the lables as well as dropdown/ input fiels in line with the static fields irrespective of my selection in E.
    Something like this:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dyna   SPACEdropdown
    dynbSPACESinput field
    dyncSPACESdropdown
    All this elements are in a group and that group has 2 transparent containers, 1 for static and for holding dynamic UI.
    I tried playing with the container properties, and also tried fixing width of dynamic UI but still the alignment issue is encountered.
    Can U guys plz give in ur valuable inputs as i need to fix this urgently.
    Regards,
    JJ

    Hi Armin,
    Can you please elaborate your solution ?, I do not have an idea of InvisibleElement & IWDView.resetView() ,
    If you can give me the exact pointer than it would be great and a good learning exp. for me.
    Thanks for the action assignment part, it worked.
    if (wdContext.nodeMaterialClass().size() > 0 && wdContext.currentContextElement().getActionMatCls()) {
         if (wdContext.currentMaterialClassElement().getMaterialClass_Description() != null || !wdContext.currentMaterialClassElement ().getMaterialClass_Description().equalsIgnoreCase(" ")) {
               IWDGroup Searchgroup = (IWDGroup) view.getElement("DynGroup");
    Searchgroup.destroyAllChildren();
    view.getContext().reset(false);
                                                      for (int i = 0; i < wdContext.nodeMaterialCharateristcs().size(); i++) {
                                  //this for label
         IWDLabel CharLabel = (IWDLabel) view.createElement(IWDLabel.class, "label" + i);
         CharLabel.setText(wdContext.nodeMaterialCharateristcs().getMaterialCharateristcsElementAt(i).getDescr_Char());
         CharLabel.setDesign(WDLabelDesign.EMPHASIZED);
         CharLabel.createLayoutData(MatrixHeadData.class);                              CharLabel.setWidth("154px");                              Searchgroup.addChild(CharLabel);
                 further there are conditions to create either dropdown or input field
    Can you please point where and how to apply your solution.
    Regards,
    JJ

  • BO Webi: How to populate a variable with the set of static values for Graph

    Hi All,
    I have the data: Order number, Order Date, processing time coming from the SAP Bex query in the below format:
    Order No    Order Date    Processing time (Days)
    1                 Jan-2011      4
    2                 Jan-2011      5
    3                 Feb-2011      6
    In BO webi report, I have to report the number of orders which were processed in <1day, <2days, <3days,...<10days in a graphical view. i.e., X-Axis:  <1day, <2days, <3days,...<10days(10 static buckets for the processing days)
    Y-Axis: Number of Orders.
    The graphical output should be like below:
    X-Axis: <1day, <2days, <3days,<4days,<5days,<6days,<7days,<8days,<9days,<10days
    Y-Axis: 0, 0,0,0,1,2,3,3,3,3  (count(Order No)) (Cumulative count)
    I am able to calculate the number of orders individually for each of the 10 buckets. But the problem i am facing is that I am not able to hold the 10 static bucket values in a variable to use it for the x-axis in the Graph, as these 10 static bucket values are not coming from the backend source.
    I would like to know if there is way to populate a variable(to use it for the X-Axis in the graph) with the set of 10 static values.
    Any help would be highly appreciated.
    Thanks,
    Leela

    Hi ,
    I think we can use the variable as X-axis in chart.. but Variable Qulaification should be Dimension.
    can you try this?.
    Using efasion universe
    1) Select month and Sold at (unit price) , then run the query
    2) create the variable V_Month ==If [Month]=1 Then "Month1" Else "Month2"  (Note = Variable Qulaification should be Dimension)
    3) Create the variable V_Sum= sum (Sold at (unit price))
    4) create another variable V_Cumulative_Sum==[V_Sum]+Previous([V_Sum])
    Now add V_Month and V_Cumulative_Sum in table , then convert to chart.. now you can add the variable V_Month as X-axis of the chart.
    Hope this will help:)
    Thanks
    Ponnarasu K

  • Mapping problem with Multiple destination values

    Hi,
    I recently started to work on SAP MDM as a beginner. I am posting this message to get some help to solve the problems that I encountered as I run the SAP.
    For example, we can sub-categorize a 'Product' as Food>ProcessedFood>Frozen Food>Pizzas'. However, notice that there exist the sameNode name under the 'Commodity' as following two categories show.
    Product>Food>Processed Food>Frozen Food>Pizzas
    Commodity>Food>Processed Food>Frozen Food>Pizzas
    The Node name, 'Pizzas', under two different categories has fewattributes such as A, B, C, and D. When I tried mapping these attributes at Map Field/Values Tab under the import manager, I ended up getting warning messages due to the overlapping.
    The message says "One or more of the source values were mapped to multiplz destination values. Some of the mapped destination values may need to be unmapped before performing the import."
    Does anyone have an idea to solve this overlapping problem?
    I will really appreciate your answer.
    Edited by: coolpsy on Jun 8, 2010 4:27 AM
    Edited by: coolpsy on Jun 8, 2010 7:55 AM

    Hi,
    As per my understanding, there are two categories as shown by you
    Product>Food>Processed Food>Frozen Food>Pizzas
    Commodity>Food>Processed Food>Frozen Food>Pizzas
    and you want to link Attributes with specific correct Category say Product not with Commodity. So in order to avoid overlapping, try using option Split Hierarchy. For more details Please refer below Article: refer page 11-15/20
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/308c62a2-5faa-2a10-fda6-fa4aa7169734?quicklink=index&overridelayout=true
    Also refer, http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6090d0bd-1da7-2a10-468f-bdd17badb396?quicklink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8090941f-a5a7-2a10-3ba6-b4af5ec6d97b?quicklink=index&overridelayout=true
    Just check and revert with Result if it helps..
    Regards,
    Mandeep Saini

  • Problem with getting actual value in Row row=iter.getCurrentRow();

    hi,
    the use case is as follows:
    in master-details, on detail table there are 2 columns with checkbox and username.
    when user clicks checks, the username text item is populated with current user value in respective row.
    <af:column sortProperty="#{bindings.DcaRegisterLinesV1.hints.Selected.name}" filterable="true"
    sortable="true" headerText="#{bindings.DcaRegisterLinesV1.hints.Selected.label}" id="c1"
    width="30">
    <af:selectBooleanCheckbox value="#{row.bindings.Selected.inputValue}"
    label="#{row.bindings.Selected.label}" autoSubmit="true"
    valueChangeListener="#{registerBean.socSelectedChangeListener}"
    shortDesc="#{bindings.DcaRegisterLinesV1.hints.Selected.tooltip}" id="sbc1">
    <!--af:setPropertyListener from="#{securityContext.userName}"
    to="#{bindings.ProcessedUser.inputValue}"
    type="attributeChange"/-->
    </af:selectBooleanCheckbox>
    </af:column>
    <af:column headerText="#{bindings.DcaRegisterLinesV1.hints.ProcessedUser.label}" id="c17" width="80"
    sortProperty="#{bindings.DcaRegisterLinesV1.hints.ProcessedUser.name}" filterable="true"
    sortable="true">
    <af:outputText value="#{row.ProcessedUser}" id="ot17"/>
    </af:column>
    the bean's code is below:
    public void socSelectedChangeListener(ValueChangeEvent valueChangeEvent) {
    BindingContainer dcbindings = getBindings();
    AttributeBinding at;
    DCBindingContainer dc=(DCBindingContainer) dcbindings;
    DCIteratorBinding iter=dc.findIteratorBinding("DcaRegisterLinesV1Iterator");
    BindingContext bindingctx = BindingContext.getCurrent();
    BindingContainer bindings = (BindingContainer)bindingctx.getCurrentBindingsEntry();
    Row row=iter.getCurrentRow();
    String AgreementId=row.getAttribute("AgreementId").toString();
    System.out.println(" AgreementId="+AgreementId);
    it always prints the first row's values.
    even though i click on different rows on the table prior clicking checkbox.
    what's wrong? seems like the model is not refreshed because what? autosubmit=true ?..
    how can i get the actual row values?
    please help
    the

    Hi,
    lets clean up your code first:
    public void socSelectedChangeListener(ValueChangeEvent valueChangeEvent) {
    BindingContainer dcbindings = getBindings();
    //AttributeBinding at;
    DCBindingContainer dc=(DCBindingContainer) dcbindings;
    DCIteratorBinding iter=dc.findIteratorBinding("DcaRegisterLinesV1Iterator");
    //BindingContext bindingctx = BindingContext.getCurrent();
    //BindingContainer bindings = (BindingContainer)bindingctx.getCurrentBindingsEntry();
    Row row=iter.getCurrentRow();
    String AgreementId=row.getAttribute("AgreementId").toString();
    System.out.println(" AgreementId="+AgreementId);No to the possible problem. Check if the table SelectListener is set. It should have an EL string that ends with ".makeCurrent". This however makes only sense for single row select cases.
    Frank

  • How to populate an array with random text files.

    I am making a Jeopardy program. I have my program set up so that it retrieves 5 random text files. I just want to know how I populate one array with all the lines from the text files my program is retrieving.

    You can read a textfile line by line and add each line to an ArrayList. An ArrayList is very much like an array only that it's "open ended". You can start adding lines without first knowing how many you're going to get. If you still want an ordinary "static" array when you're finished reading lines you can easily get one from the ArrayList and then drop the ArrayList.

  • How to fill an array with random numbers

    Can anybody tell me how I can fill an array with thousand random numbers between 0 and 10000?

    import java.util.Random;
    class random
         static int[] bull(int size) {
              int[] numbers = new int[size];
              Random select = new Random();
              for(int i=0;i<numbers.length;i++) {
    harris:
    for(;;) {
    int trelos=select.nextInt(10000);
    numbers=trelos;
                        for(int j=0;j<i;j++) {
    if(trelos==numbers[j])
    continue harris;
    numbers[i]=trelos;
    break;
    return numbers;
    /*This method fills an array with numbers and there is no possibility two numbers to be the
         same*/
    /*The following method is a simpler method,but it is possible two numbers to be the same*/
    static int[] bull2(int size) {
         int[] numbers = new int[size];
    Random select = new Random();
    for(int i=0;i<numbers.length;i++)
              numbers[i]=select.nextInt(9);
              return numbers;
         public static void main(String[] args) {
    int[] nikos = random.bull(10);
    int[] nikos2 = random.bull2(10);
    for(int i=0;i<nikos.length;i++)
    System.out.println(nikos[i]);
    for(int i=0;i<nikos2.length;i++)
    System.out.println(nikos2[i]);

  • Problem populating date dimension with correct values

    Hi all,
    I have a 'simple' problem, but can't get it solved! The YTD calculations in the cube don't 'reset' at the right moment in time (they should 'reset' on the FISCAL year, but it actually seems to happen on the normal calendar year).
    Our dimensions and cubes are MOLAP. There is a relational table, containing columns with values for both a CALendar hierarchy as well as for a FISCAL year hierarchy. This table populates the date dimension (only the fiscal hierarchy as in MOLAP we only have a fiscal hierarchy). The result looks correct in the data viewer.
    The cube is populated from relational sources as well. One view provides the measure values and the CODE (business identifiers) values for each dimension involved. In case of the date dimension, it provides the code value for the involved level at which we load the cube (month).
    I made a very simple testcase with only 1 dimension (date) and 1 small cube. The cube uses only the date dimesion (to load cube on the fiscal hierarchy at month level) and has 1 base measure that is loaded with a simple number and 1 calculated measure that calculates the YTD value for this base measure. The calculated measure is added in the OWB cube designer using button "Generate Calculated Measures" and choosing the "Year to Date" function.
    When populating the cube and using the data viewer to check the results, the YTD measure values don't 'reset' at the fiscal year end. They seem to reset at the normal CALendar year end!?
    After some testing, I have concluded it has to do with the values I supply to populate the date dimension, but I can't figure out what the modification should be and I can't find any examples anywhere.
    Does anyone out there have a working YTD calculation in MOLAP?
    Any help much appreciated.
    Regards,
    Ed

    Sorry David, I am not sure I've got this right yet. I am looking at using the cumsum function, but I am not sure how to apply this. That is, I can see examples (cumsum(measure, total_dim, reset_dim)), but I think I cannot put such formula directly into the expression editor for a cube measure in OWB?
    Until now I have been using the standard available calculated measures in the OWB measure editor and I think they insert an xml template? I'll get the Excel Calculation Tool from OTN, to see if I can create the correct formula and paste that in OWB in the expression editor for the measure. (Does that tool need a ROLAP workspace or does it need / can it work with a MOLAP workspace?)
    Thanks and regards,
    Ed
    Edited by: EdSp on Jan 13, 2009 1:57 PM
    I have downloaded the Excel sheet and can see how it works, but it seems to "insert" the calculated measures straight into the AW. However we deploy the AW from OWB so I will be looking at getting something to enter/paste in the expression editor of OWB...

  • Which Function Should i use for static values for a an array[] in BPM 11g.

    Hi Experts,
    Please throw some light on this..
    I've a requirement which is bugging me..
    How do i assign a static value to a array in BPM11g in script activity. What exactly function do i need to use to assign a Static value for an Array []
    I been doing like taking the business object as a Array thats fine. But how can i set a static value in BPM 11g.
    Iam using BPM 11.1.1.6 version..
    Regards,
    Pavan

    Hi Pavan,
    Here's one approach, but it assumes you're comfortable with XSDs and XML.
    Know this is light on detail, but without knowing what your array looks like it's the best I can do. Here's what you'd do from a high level:
    1. Create an XSD that defines the structure of your array.
    2. Create the XML that represents the static item you want to add to the array.
    3. Create a process variable based on the XSD that defined the array.
    4. Add a Script activity.
    5. Open the "Implementation" tab -> click "Data Associations".
    6. On the right, expand the folder under your process -> drag the XML icon in the upper right corner on the array variable -> paste your XML into the XML literal panel.
    Hope this gets you going,
    Dan

Maybe you are looking for

  • MSS Competence Report by Position not working in portal

    Hi, We have developed a custom R/3 report which is "Competence Report by Position". This report need to be accessed via Reporting iview of the portal. And in portal we have added new object Selection criteria "Position by Operational Org units ". Onc

  • Adding Roomparts to Collaborations Rooms - without folders?

    Hi All! I have a question regarding RoomParts in collaborations rooms. When i try to add a RoomPart to my existing collboration coom they always gets added as  a folders with a link to the part. But this i not very "handy" because all the other parts

  • Costing in cProjects

    Hi, I have defined the project role type and asigned cost to it.Later i hav assigned the resource to that role type. I am not able to view the cost for Proj Role type in costing tab and getting an errot that cost/revenue rate is not defined forOrg 00

  • Error in PRRW

    Hi friends, We have trips that were created in fiscal year 2008 and are posting date this year,however, we made releases of expenses in fiscal year 2009 for these trips and after running the transaction PRRW, the system returns the following message:

  • ChaRM Maintenance Cycle

    Can anyone tell me how to close a maintenance cycle in status of withdrawn that looks like there are still unprocessed transports even though the transport objects have been moved to a different transport, and transported to production? Thanks