Separated Instance Variables in a Split Activity

Hi,
How do I get a separated instance variable to propogate to copies in a split activity ? With a SplitN by design this is a manual task using copy.sepVar = sepVar but how do you do this in a Split ?
Any help would be greatly appreciated.
cheers
Tony

so what you are saying is: the best way is to instead
defining these instance variables, pass these
variables values as parameters to private methods?I would agree with this. You need to be very careful when using instance variables with SSB's. You only (currently) have one public method defined in your bean, so you don't need to be concerned about the Container serving you up a different bean on a latter invocation - yet. Adding another public method that uses the same instance variables will cause this to break.
As far as synchronization goes, you can get into scalability problems here. If your container is trying to process multiple threads through your Bean, each thread will be forced to block until the previous thread continues its task - which can be a performance killer. A slow database query for one user could starve many other users on the system.
I would suggest either passing all your variables as parameters to your private methods, or (if you are talking about a lot of parameters being passed,) create a Delegate Object behind your EJB to handle all of the processing.

Similar Messages

  • Instance Variable size

    Hi
    I have a question regarding size of normal instance variable.
    It has been mentioned in the Studio 5.7 doc that the total size of all the instance variable for a project should not exceed 2Mb.
    Question is that if it exceeds more than 2Mb than what would be its effects. Is there any exception thrown if size exceeds above 2Mb.
    Also how can this be prevented as actual size can only be calculated at runtime.
    Thanks in advance.

    The instance size exceeding the setting you have inside your Engine will cause errors to start appearing in the log file. The effect is that your engine's performance will degrade. Once you start getting Error messages, they are usually sent via email to the admin you specify in the Engine's settings.
    A few ways to keep the size of the instance variables down is to:
    1) change the category of large instance variables to "Separated" from "Normal". This means that they are not stored as part of then instance's BLOB stored in the PPROCINSTANCE Engine database. They are then only read from the Engine's separated instance variable table when they are needed in the activity's logic or updated only when modified in the activity. Separated instance variables are not calculated as part of the overall size of the instance.. Large binary variables not marked as Separated will quickly run you over your instance size limit.
    2) Similarly, we sometimes treat the process instance variables as a database of record. Avoid this mentaility if possible. It's often better to have an external database to store information about things going on in the process. If you rely on the Engine tables for this for very large objects they are not easily retrieved by outside applicaitons because they are stored as a single BLOB. If outside applications access the Engine's database, it's another sure fire way to further degrade engine performance. Many times it' is better to store the id of a customer in the process and then to use that id to retrieve customer insformation from the cutomer's external database table. Once an instance has reached the End activity in a process, it sits there the number of days you specified in an Engine setting. Once it exceeds this number of days in the End activity, the instance data information is either purged or moved to the archive database. Don't make this number of days in the End activity too long (default is 15) as this will increase the sized of the number of rows on the table and degrade performance.
    Hope this helps,
    Dan

  • Null Instance Variables on Screenflow

    Hi,
    I have some problems with instance variable of type BPM Objects in a Screenflow.
    I always create automatic processes without user interaction, and on server side I have seen that it's not necessary to instantiate an instance variable. Moreover if within a method I write (I use the Java style syntax):
    String a;
    a.toString(); // just to call a method on a not-instantiated variable
    everything works correctly, the "a" variable is automatically instantiated.
    But it seems that in an automatic activity of a Screenflow it's different, I need to do the new also for Instance Variables.
    Then, in the Screenflow I have an Instance Variable myObject of type MyObject that is a BPM Object. This object has an attribute myStrings that is an array of String.
    To instantiate the instance variable I can write:
    myObject = new MyObject();
    But then I get a java.lang.*NullPointerException* when I call the extend method of its attribute myStrings to add a string.
    Do you agree with me that on the Screenflow code it's necessary to instantiate the variables?
    How can I instantiate an Array of String?
    Thank you.

    Thanks Daniel, I'm using ALBPM 6.0,
    i know the line where I get the exception, I have a logMessage before and after each line of code, and then in the exception stack there is the PBL Method line indicated:
    Caused by: java.lang.NullPointerException
         at xobject.Fuego__AutoGen__Screenflows__.__ScreenflowConJsp.automatic1(__ScreenflowConJsp.xcdl:*19*)
    19 is the code line where I get the exception. In this line I have this:
    myObject.myStrings.extend(arg1 : a);
    but the null object is not the array, it's myObject that is an Instance Variable.
    In ALBPM60_Studio_ReferenceGuide at chapter Programming Styles paragraph Java Programming Style there is:
    This style emulates Java syntax and adds several features to match PBL expressions. These added features include:
    • Output arguments
    • Input and display statements
    • Variable auto-initialization
    In fact in my previuos BPM projects I have seen that is not necessary to istantiate the variables, both for Instance Variable and local variable declared within a method. In my previous post I did an example:
    String a;
    a.toString();
    Usually this causes an Exception, but not in ALBPM methods.
    My main question is: is it possible that this is true just for Server side methods and not for Screenflow methods? Because in my case I need to instantiate every Instance Variable of my Screenflow (for example the myObject instance variable) in an Automatic Activity I have put as first Activity of the flow.
    Thanks again for your help.

  • Are Instance Variables like Session Vairables?

    Hi All!
    I am curious to know in what form are the instance variables & attachments getting saved internally. e.g. xml form , cookies etc
    Just want to figure out if we use lot many instance variables will it make the session very heavy or are they stored in some kind of xml files.

    Actually the instance size limit is configurable. This limit only applies to the 'Normal' instance variables - which are serialized to the Engine's DB as a blob.
    If you need to store large amounts of data (more than 16->32kb) you can use Separated instance variables that are serialized differently.
    You can always increase the instance size limit, but this will limit the number of concurrent running instances the engine will support.
    Attachments are serialized to the engine's DB.
    - Tim

  • How to invoke BPM object instance variable from interactive activity?

    I have a screenflow with an automatic activity "A" followed by an interactive activity "B". "B" calls a BPM object "X" and uses a JSP presentation to show its attributes. Is there a way to use another BPM object, say type "Y", create an instance variable of that type inside "A", and get its attributes values from the JSP page associated to "B"?
    Edited by: user6473912 on 20/07/2010 03:37 PM

    Try this. It assumes you have:
    <li> a user named "auto"
    <li> a project variable named "customerType"
    <li> an instance variable named "orderAmount" that is a decimal
    <li> an instance variable named "order" that is a BPM Object that has attributes named "customerName" and "amount"
    ps as ProcessService
    xmlObject as Fuego.Xml.XMLObject
    do 
      connectTo ps
          using url = Fuego.Server.directoryURL,
          user = "auto",
          password = "auto"
      instF as InstanceFilter
      create(instF, processService : ps)
      addAttributeTo(instF, variable : "customerType", comparator : IS, value : "Gold")
      instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS)
      for each inst in getInstancesByFilter(ps, filter : instF) do
        // here's how to get the value inside a primitive instance variable
        orderAmtObj as Object = getVar(inst, var : "orderAmount")
        // here's how to get the value of attributes inside a complex BPM Object instance variable
        //    - in this case this is an "order" object with two attributes (customerName and amount)
        orderObj as Object = (getVar(inst, var : "order"))
        xmlObject = Fuego.Xml.XMLObject(createXmlTextFor(DynamicXml, object : orderObj, topLevelTag : "xsi"))
        logMessage "The value of the order object's customer name is: " +
               selectString(xmlObject, xpath : "customerName")
        logMessage "The value of the order object's order amount is: " +
               selectNumber(xmlObject, xpath : "amount")
        // here's a rather uninspired way to retrieve who the participant is that was assigned the instance
        logMessage "The participant assigned to this instance is: " + inst.participantId
      end
    on exit
      disconnectFrom ps
    endDan

  • How to use an BPM Instance Variable in JSP page

    Hi All,
    I am using the JSP Presentation, but i don't know how to use an Instance variable in JSP page, that instance already declared in the process. And Can u explain the syntax that to include the JS file into jsp page
    Regards
    Vasu.
    Edited by bpmvasu at 04/03/2007 10:43 PM

    Hi Mariano,
    I'm using JSP presentation too. In "Interactive Component Call" active i'm using "Use JSP presentation", but i only can define one instance variable, i need to add more instance variables. In "Advanced" option of this task, i have the argument mapping .. but i don't understand how to use it.
    I have a instance variable called "genders" of the type String[Int] (Associative Array) and i'm mapping this instance variable in "Arguments Show In" option of the advanced option of JSP presentation. In JSP presentation i have the code:
    <select <f:fieldName att="person.gender"/>>
                   <c:forEach var="gender" begin="0" items="${genders}" varStatus="status">
                        <c:choose>
                             <c:when test="${person.gender == gender}">
                                  <option value="<c:out value="${gender}"/>" selected="true"><c:out value="${gender}"/></option>
                             </c:when>
                             <c:otherwise>
                                  <option value="<c:out value="${gender}"/>"><c:out value="${gender}"/></option>
                             </c:otherwise>
                        </c:choose>
                   </c:forEach>
              </select>And in my screenflow i have the code:
    genders[0] = "Male"
    genders[1] = "Female"But when i run my application, i have the error: "The task could not be successfully executed. Reason: 'java.lang.ClassCastException: java.lang.Integer'."
    What's the problem?

  • Is itpossible recover BPM Object instance from Screenflow in Grab Activity?

    My process has two roles: role1 and role2.
    role2 has an activity of type "Interactive" and the implementation type of this activity is Screenflow, in this Screenflow I have an instance variable of the type BPM Object.
    role1 has a Grab Activity from Interactive Activity that describes above, the Grab Activity has a unconditional transition to another Interactive Activity and this Interactive Activity has the same implementation type of the Interactive Activity of the role2 and points to the same Screenflow.
    I need to recover the values of the BPM Object that filled in role2, in other words, I need the same instance of the BPM Object in Interactive Acitivity of the role2 in the role1.
    If an user filled a field called "name" of BPM Object in the Interactive Activity of the role2, it needs to see that value in the Interactive Activity of the role1 after grabbed this activity of the role2 to role1.
    Is it possible?

    Hi,
    Sure it's just me, but I got a bit lost with the description of what you're trying to do. One place I got lost was in the discussion of roles. Roles are used in Oracle BPM processes for a variety of reasons, but I'm not sure they're germane to your problem so I'm trying to rephrase your question without their use.
    Here's my attempt to rephrase what it is that I think you're trying to do:
    1. I think you have two activities. I'm naming them "Check Credit" and "Final Check"
    2. I'm guessing you have a transition between the two activities "Check Credit" and "Final Check"
    3. Your process has an instance variable that is a BPM Object that I'm naming "customer". Since it's a BPM Object type, it has a variety of attributes (e.g. customer.name, customer.address, etc.)
    4. You have a Grab activity that has its "Runtime" property set to be "Defined" (meaning you have transitions defined coming into and out of the Grab activity). I think you might have a transition going from the "Final Check" activity to your Grab activity and I think you might have a transition going from the Grab to the "Check Credit" activity.
    Does this describe your process? I'm assuming you probably want to have the instance variable revert back to original values of the instance variable object before work was done in one of the activites, but don't want to head too far down this path until you confirm that this is what you want to know.
    Thanks,
    Dan

  • JSP and Instance Variables

    I have some questions about JSP presentation (Interactive Component Call in Screenflow):
    - Only BPM Objects are possible to be mapped in JSP?
    - Is possible to map two or more BPM Objects to the JSP?
    - What is the difference of mapping using the variable "attributes" in argument mapping and the option "Select BPM object variable" in main task of Interactive Component Call activity?

    I seem to be having a similar problem.
    If I include this fragment, for an instance variable called "contacts" which is a BPMObject of type "ITSSContactRequest".
    <%
    Object r = request.getAttribute("contacts");               
    Class cl = r.getClass();
    out.println(cl.getName());
    %>
    I get the following output:
    xobject.ITSSContactManagement.ITSSContactRequest
    and I can access the object via reflection:
    <%
    Object r = request.getAttribute("contacts");               
    Class cl = r.getClass();
    out.println(cl.getName());     
    Method getGeneralContacts = cl.getMethod("getGeneralContacts", null);               
    Object rv = getGeneralContacts.invoke(r);
    %>
    and access the rv variable accordingly.
    However, if I try and cast the variable directly:
    <%
    Object r = request.getAttribute("contacts");
    Class cl = r.getClass();               
    out.println(cl.getName());
    xobject.ITSSContactManagement.ITSSContactRequest rq = (xobject.ITSSContactManagement.ITSSContactRequest)r;
    %>
    I get the following error message:
    "The task could not be successfully executed. Reason: 'fuego.web.execution.exception.InternalForwardException: UnExpected error during internal forward process.'.
    See log file for more information [Error code: workspace-1258985548580] "
    The same error occurs if I try and import the object via
    <%@ page import="xobject.ITSSContactManagement.ITSSContactRequest" %>
    Thanks for any help.

  • Using multiple instance variables or BPM objects in a single JSP

    In my screenflow, for an user activity, I've selected a BPM object variable for my JSP and using this BPM object variable within the JSP to display or accept values related to this BPM object.
    But in certain circumstances, I need access to some of the instance variables defined in my screenflow (which are not members of the BPM object), and to get these variable values displayed in my JSP. I don't want to overload my BPM object with all these instances as they do not logically fit as members in this BPM object.
    For example, if I need to capture and display the logged in user name across the JSPs in my web application, then how can I do that without specifying this user variable in all of my BPM objects.
    Is there any extensibility in using more than one BPM object variables in my JSPs? Why is it that a single BPM object variable is tied to a JSP? Or am I missing something else here?

    I'm with the same problem!

  • How to wash out an AM instance variable at the end of user session (logout)

    We have a need to create AM instance variables to hold some session level data, which is too complex to be held in a transient VO.
    What we observed is that the instance variable is not washed out at the end of the user session (i.e logout).
    I think since the AM instance is not really destroyed but only release back to the pool the instance variable content persists and is carried over to the next session that access the AM instance.
    What method in AM can be overridden to wash out this instance variable.
    At the moment we are resetting it in prepareSession(), but this means that the information is still held till the next session access the AM.
    It would be better to reset it when the AM is released back to the pool.
    Any pointers would be helpful.

    At the moment we are resetting it in prepareSession(), but this means that the information is still held till the next session access the AM.
    Note that prepareSession() is also invoked after AM activation so this can(and probaly will) reset your variable inside existing session.
    If you don't need to keep variable value between AM activations/passivations, you can use userData, for example:
    this.getSession().getUserData().put("someKey", value);
    UserData values are lost after AM passivation (by default).
    If you need to keep UserData variable value for lifetime of user session, then you can override passivateState() and activateState() as in this sample:
    Application State Management
    Dario

  • Accesing Instance Variables

    Hi there!
    I have a process and I want to check certain restrictions once a day and if the result of this checks is positive I want to send a notification to other process to continue.
    I've tried to use a global automatic activity but it seems to me that it doesn't has access to the instance variables because I've set some Logs and they return always empty even if the variables of the object accessed are correctly fulfilled.
    The other solution is to use the project variables but this variables are less flexible to changes on the restrictions.
    My questions are:
    ¿Can I really correctly access to the instance variables from a global automatic activity? -> If this is true then. ¿What may I be doing wrong?
    ¿Is there any other way to do this?
    Thanks for reading and double thanks for reply.

    It's sounds at least too tricky because you will have to launch and interactive activity from code.
    Anyways an interactive activity requires user interaction and the point of the time-based activity is to execute code at night without the need of an user.
    The most frustrating thing is that when i'm coding the method of the global automatic activity and I write "this." the popup shows all the instance variables so I thought that I could access them.
    Then I write some logs to be sure but when the method was executed they return all empty.
    If I can't solve this I will have to use the project variables through the instant processor and all the variables for the restricctions have to be simple typed not objects with the lack of flexibility that it's implies.

  • Accessing Instance Variables

    Hi,
    I am trying to make a presentation that shows all instance variables of a determined process's instance.
    In order to do that, I have created a Gloabal Interactivity Activity with a presentation that ask for a key.
    So, I want to show in the next presentation all the instance variables of the instance processes that has the key informed by the user on the previous presentation.
    How can I do that?
    Thanks very much
    Marcos

    <script language="JavaScript">
    var scriptVar = "<%= jspVar %>";
    </script>

  • Update Instance Variables using PAPI

    I have a need to update Instance Variables for a bunch of instances. Can this be done using PAPI? I am writing a global function that can search the instances and update. How can I update these variables...thank you

    Hi,
    I think that the best way of changing instance variables using papi is by adding a global activity (with instance access) and pass the new variable values as arguments. Pay attention that you have to define those arguments in the activity.
    Then, you can assign those values to the instance using PBL.
    http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/papi_javadocs/fuego/papi/ProcessServiceSession.html#activityExecute(fuego.papi.Activity,%20fuego.papi.InstanceInfo,%20fuego.papi.Arguments)
    I do suggest avoiding sending interruptions to instances, because once the notification is sent (and the papi method returns successfully), the notifications will be processed in another transaction.
    Hope this helps,
    Ariel A.

  • Using instance variables

    Hi,
    I am currently evaluating this tool for a specific user group. I had a question in mind :
    In a typical workflow which involves database connections (i.e. inserting data in a database and displayign data) do you think we should pass data between various activities and users using instance variables or do you think we should retrieve data from the tables every time for display etc

    I would suggest get the data from the database first time and then store it in instance variables. Whenever, you need to update any values in the database from a particular activity, make a call to database to update it with the values from instance variables.
    For displaying, use instance variables. You do not need to get fresh data from database for each activity, unless you think that data in database keeps changing for that particular records every day.
    Regards
    Right Chord

  • Parsing XML and Storing values in instance variable

    hi,
    i'm new to XML.
    here i'm trying to parse an XML and store their element data to the instance variable.
    in my main method i'm tried to print the instance variable. but it shows "" (ie it print nothing ).
    i know the reason, its becas of the the endElement() event generated and it invokes the characters() and assigns "" to the instance variable.
    my main perspective is to store the element data in instance variable.
    thanks in advance.
    praks
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    public class mysax extends DefaultHandler
         String ctelement;
         CharArrayWriter contents;
         String vname1,vrcbreg1,vaddress1,vcountry1,vtelephone1,vfax1;
         String vname,vrcbreg,vaddress,vcountry,vtelephone,vfax;
         public mysax()
              vname1 = null;
              vrcbreg1 = null;
              vaddress1 = null;
              vcountry1 = null;
              vtelephone1 = null;
              vfax1 = null;
              contents= new CharArrayWriter();
         public void doparse(String url) throws Exception
              SAXParserFactory spf = SAXParserFactory.newInstance();
    SAXParser sp = spf.newSAXParser();
    ParserAdapter pa = new ParserAdapter(sp.getParser());
    pa.setContentHandler(this);
    pa.parse(url);          
         public void startElement(String namespace,String localName,String qName,Attributes atts)
              ctelement = localName;     
         public void endElement(String uri,String localName,String qName) throws SAXException
         public void characters(char[] ch,int start, int length) throws SAXException
              try
                   if(ctelement.equals("name"))
                        vname = new String (ch,start,length);
                        System.out.println("The method "+vname1);
              }catch (Exception e)
                   System.out.println("The exception "+e);
         public static void main(String args[])
              try
              mysax ms = new mysax();
              ms.doparse(args[0]);
              System.out.println("the contents name "+ms.vname1);
              catch(Exception e)
                   System.out.println("this is exception at main" +e);
    my XML looks like
    <coyprofile_result>
    <company>     
    <name>abcTech</name>
    <rcbreg>123456789</rcbreg>
    <address>Singapore</address>
    <country>sg</country>
    <telephone>123456</telephone>
    <fax>123155</fax>
    </company>
    </coyprofile_result>

    I believe that the problem has to do with the value you assign to ctelement. You are assigning the value of localName to ctElement, however for the element: <name>...</name> the localname is empty string i.e. "", but qName equals "name". Because you are assigning empty string to ctElement, when you do the comparison in characters of ctElement to "name" it will always be false. So in startElement change it to ctElement = qName; Try it and see if it works. I have produced similar programs and it works for me.
    Hope this helps.

Maybe you are looking for

  • Passing non-key field values to a form from a tree link

    I'd like to be able to link to a record form from a tree, and to pre-populate certain fields in the form from values available in the tree, even if there isn't a record matching the primary key value on the tree. I hope that makes sense. Let me fill

  • Possible to keep the 'flash' light on?

    So my BlackBerry Curve 8320 doesn't have the feature to record videos. I've noticed when I have taken pictures, the flash is extremely bright for a phone. I am curious, is there any type of app out there that is able to turn my flash on and to keep i

  • Can I upgrade my Power Mac G3 (Blue and White) to USB 2.0?

    I have a B&W G3 (300 Mhz) and a slot loading iMac ((600Mhz) both running 10.3.9. My daughter is looking into buying an iPod Nano which requires USB 2.0 How do I know whether either machine is USB 2.0 compatible ? If not can a USB 2.0 card be installe

  • Report for personnel photo

    Hi Gurus,       Can anyone let me know how do I extract a report where I can see the description of all the personsu2019 Personnel NO. who has photo attached by OAAD?.

  • Calling Transactional IVIEW

    Hi , Created a Transactional Iview for Custom Tcode.In portal as well i was able to look into the preview of the transaction code. I used the follwing code to navigate this Transactional IView in the ABAP WEBDYNP which is been linked to an action but