PUnit Test for Automatic Activities in OBPM 10GR3

Hi all,
We have a series of activities in our process , some Interactive and some Automatic.
We are trying to write a PUnit Test for the entire Process but we are unable to execute it .
Whenever it reaches an Automatic Activity, it gives an error.
Caused by: fuego.papi.exception.TaskNotFoundException: Task 'PUnit Task' was not found in activity 'UpdateDatabase' while trying to process instance '/UnitTestProcess#Default-1.0/1/0'.
at fuego.bpmunit.punit.ProcessServiceSession.getTaskIn(ProcessServiceSession.java:557)
at fuego.bpmunit.punit.ProcessServiceSession.getPUnitTask(ProcessServiceSession.java:566)
at fuego.bpmunit.punit.ProcessServiceSession.activityExecute(ProcessServiceSession.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
at fuego.lang.ObjectTypeDescription.invokeMethod(ObjectTypeDescription.java:1370)
How can we associate a PUnit Task with an Automatic Activity so that we can use PUnit Tests for testing process flows?
Otherwise, we have to remove all Automatic Activities from the process and just test the Interactive Activities for the PUnit Test and then include the Automatic Activities later and just do CUnit Tests of Automatic Activity methods which doesn't sound right?
How do we eliminate this problem?

Hi,
Set a Boolean flag value to False before the SQL query.
Some thing like:
boolean flag = false;
foreach (element in
SELECT id FROM TESTTABLE WHERE requestId = 732 and status = 1 )
logMessage("-- The id is-->" +element.id);
flag = true;
if(flag) {
logMessage("-- Id Found -->" );
else
logMessage("-- Id Not Found -->");
Hope the above logic would work fine.
Bibhu
Edited by: Bibhuti Bhusan on Sep 2, 2011 11:48 AM

Similar Messages

  • Aborting an Automatic Activity from OBPM 10GR3 workspace

    Hi all,
    I can abort Interactive Activities from the OBPM 10GR3 workspace just by selecting that instance, the selecting the action as ABORT from the BULK ACTIONS on the right hand side and the entire instance is aborted.
    But how do I abort Automatic Activities from the OBPM 10GR3 workspace?
    When my instance arrives at an automatic activity, I am unable to abort it from the BPM workspace.
    There is no option when you right click an Automatic Activity and select RUNTIME , which says, "If enabled, the instance can be aborted by the user".
    So how do we do that ( from the OBPM 10GR3 Workspace)?

    The "If enabled, the instance can be aborted by the user" needs to be selected when you abort via PAPI...
    Since aotumatic activitys do not appear in the workspace you cannot abort them from there.
    You can connect via PAPI, find the instance and abort it from another instance.
    Even though must automatic activitys are built so they finish before you can even go and abort them.
    I think its a strange design to have an aotumatic activity that is up long enough for you to cancel it but as i said above...
    1) Select abortable on the activity.
    2) Find the instance and abort
    Fuego.Papi.InstanceFilter ifilter = new InstanceFilter();
    ProcessService.connectTo(url : Fuego.Server.directoryURL, user :<username>, password : <password>);
    ifilter.create(processService : ProcessService);
    ifilter.searchScope = new SearchScope(participantScope : ParticipantScope.ALL , statusScope : StatusScope.ONLY_INPROCESS);
    //Notice i write public variable and not instance variable
    ifilter.addAttributeTo(variable : <public variable (such as description or one of your own)>, comparator : Comparison.<the one that fits you>, value : <value>);
    Fuego.Papi.Instance[] cInstances = ProcessService.getInstancesByFilter(filter : ifilter);
    foreach (instance in cInstances)
    //Second type of filtering (checking current activity and process), you can check just the activity name if its a unique name
    if (instance.activityName == <aotumatic activity name> && instance.processId.contains(regexp : '/<process name>/'))
    instance.abort();
    I use a similer code snippet to remove Interactive activities.
    Just notice that you filter only the instances you really want to take down.

  • Viewing Instance Variable Information for Automatic activities

    Hi,
    I have a process which is made up of all automatic activities that each do a specific set of activities and populate a few instance variables. I want to create a view so that a user can see the state and value contained in each of the instance variable at any time during the execution of the process. A example of what i want to achive in the view is shown below.. any advice on how to design such a feature
    InstVar_1 InstVar_2 InstVar_3
    1 2 3
    4 5 6
    Thanks.

    Are you the one who commented out the code you're looking for ?//String desc = StringFactory.getString(attributes.getValue("desc"));You just have to modify you AttributeObject class to hold a new field : String description. And then, it's up to you to create a new constructor or a new setter method.
    Btw, this is not a Swing related question.

  • Best Practice for using JSP in OBPM 10gr3

    Hi Guys,
    We are using JSP for UI in our project. We are new to the OBPM. wants to clarify some things.
    1. is it good to have jsp in screenflows or if we can manage it outside BPM also with same effect
    2. How is the BPM database structured. Is the PAPI API's avaialble to get all the desired information from it.
    3. Is notes/attachments/audits managed in BPM database or if we can manage it in external db also.. how to access these from java if it can be managed in BPM db.
    4. What are the pro's and cons of PAPI vs JMS
    Thanks in Advance!!!!

    1. is it good to have jsp in screenflows or if we can manage it outside BPM also with same effectOthers will probably disagree, but I always say to use Screenflows and to use the out of the box Workspace. They are built in as part of the product and you'll be facing a ton of work trying to duplicate this functionality outside.
    2. How is the BPM database structured. Is the PAPI API's avaialble to get all the desired information from it.Unless it's a project variable or a variable that is marked as "Separated", the instance variables are stored in a single blob in a row in the Engine's database. PAPI can retrieve the instance variable information (I posted something on how to do this a while back on this forum and can find it if you need it).
    3. Is notes/attachments/audits managed in BPM database or if we can manage it in external db also.. how to access these from java if it can be managed in BPM db.The out of the box notes and attachments are also stored as part of the blob. On the project I'm currently on, the customer wanted the attachments stored separately in an external database so we did not use the out of the box attachments. They wanted what they call "tasks" stored in a separate database. These tasks were for ad hoc queries to send a question to any department / user and then store the history of responses and routing.
    4. What are the pro's and cons of PAPI vs JMSSorry - you lost me here. Sure someone else will pick up on the comparison between the API Oracle BPM uses and JMS, but I'm not getting it.
    Dan

  • Priority for Automatic Proccesses in Oracle BPM 10.3

    Hi,
    I'm completely new to the BPM space, and I was just transferred to a team that's using Oracle BPM 10.3, so my apologies if this is a trivial question.
    Does anyone know how to implement priority for automatic activities in Oracle BPM 10.3? Basically, I want high priority instances to be processed before low priority ones.
    I tried kicking off several instances in a loop with the "priority" variable set to different values, with an automatic activity that would log the instance and its priority, and the begin state limiting the process to a single concurrent instance at a time. It did not look like these instance were processed in priority order.
    Thanks!

    The priority predefined variable is an integer that goes from 1 to 5. The visible corresponding values for these integer values when shown to the end user in the WorkSpace run from "Lowest" (1) to "Highest" (5).
    You typically use priority in a view or filter for the Workspace. You'd set the priority column in the WorkSpace to be sorted descending so that the higher the priority, the closer it is to the top of the end user's queue.
    Unless your view or filter is set to show all activity types currently in the process, the only work item instances shown in the WorkSpace are Interactive activities . The benefit to setting a priority to work item instances is that the end users are encouraged to work the interactive work item instances from the top of the list down.
    Bottom line is that the priority predefined variable helps end users sort / prioritize their work, but does not cause the engine to sort the work it has to do with work item instances running in Automatic activities.
    If you have a batch fully automatic process that takes a while to run, I could see a use case where you might want to sort the list of incoming work item instances. If it's a typical process with a mix of automatic and interactive activities, automatic actiivities take a much smaller percentage of time than the interactives do. Work item instances running inside automatic activities normally don't take much time and the need for prioritization doesn't come up. What's your use case where you need to prioritize them?
    Dan

  • Problem with Wait Activity in OBPM 10GR3

    Hi all,
    I have a set of automatic activities and then an exception path which when entered has a Wait Activity which waits for the process for a few minutes before resuming and going back to the automatic activity where the exception occured.
    Now, I have changed the Number of Concurrent Executions for all my automatic activities to 20 in Advanced Properties of Automatic Activities.
    Now , there is no such option to change the Number of Concurrent Executions for Wait Activities in Advanced Properties of Wait Activities.
    So now, all instances keep on waiting in the Wait Activity inspite of the wait time being surpassed and do not move forward.
    Why is that so?
    Any idea?
    Do I need to change back to Unlimited Concurrent Executions especially for all activities in the exception flow?

    Well here is the problem..
    I have a Wait Activity with a Wait Interval of 5 mins.
    It was working fine before. It used to wait for 5 mins and then continue with the rest of the process. At that time I had not changed the Number of Concurrent Executions in the Advanced Properties of all Automatic Activities. The Number of Concurrent Executions were Unlimited.
    Right Click on Any Automatic Activity---> Select Properties --> Select Advanced and you should see that option i.e. Number of Concurrent Executions .
    Now I have made it Limited and given a number of 20 Concurrent Executions instead of Unlimited.
    Somehow now I find that the Wait Activity waits for more than 5 mins. Sometimes even 20 to 30 mins. Not sure why?
    Any idea?
    Is it because I changed the Number of Concurrent Executions for Automatic Activities from Unlimited to 20? Or is there any other reason? And how to fix this problem?

  • How to install a plugin in OBPM 10GR3

    How do we install a plugin in OBPM 10GR3. Any steps that you guys know of?
    I want to install a plugin which actually needs to be installed for eclipse but since OBPM 10GR3 is built on top of eclipse, I think I can install it in OBPM 10GR3..
    Please guide through the process.?

    BPM Studio (10g) is just a plugin for eclipse. To install other plugins, just use the Help - Software Updates - Find and Install
    HTH,
    -Kevin

  • HT201380 Yesterday this was automatically installed.  Today I can't access a document in Pages.  A prompt says I need a Pages update.  But the next screen tests for updates and informs me everything is up to date.  What's up?

    Yesterday this was automatically installed.  Today I can't access a document in Pages.  A prompt says I need a Pages update.  But the next screen tests for updates and informs me everything is up to date.  What's up?

    It's highly unlikely that the Pages update problem has anything to do with the ARD client update, since the client is not involved in any way with Software Update. I'd suggest asking for assistance with the update problem in the forum appropriate for your version of Mac OS X.
    Regards.

  • Return value for Direct OBPM SQL Query in OBPM 10GR3

    Hi all,
    I use a direct SQL Query provided by OBPM 10GR3 in my automatic activity to select certain elements from the db. The query is as follows:-
    foreach (element in
    SELECT id FROM TESTTABLE WHERE requestId = 732 and status = 1 )
    // statements
    logMessage("-- The id is-->" +element.id);
    This only returns when the id is found in the db but returns nothing when not found in db?
    How can I always get a return value? atleast a true or false, so that I can put IF statements?
    Because if it returns nothing, the loop does not execute {}? So we cannot put something like:-
    foreach (element in
    SELECT id FROM TESTTABLE WHERE requestId = 732 and status = 1 )
    logMessage("-- The id is-->" +element.id);
    if(element.id == null)
    logMessage("-- Id Not Found -->" );
    else
    logMessage("-- Id Found -->");
    How can I always get a return value from my OBPM direct query ?
    Remember , I am not using DynamicSQL in this case?

    Hi,
    Set a Boolean flag value to False before the SQL query.
    Some thing like:
    boolean flag = false;
    foreach (element in
    SELECT id FROM TESTTABLE WHERE requestId = 732 and status = 1 )
    logMessage("-- The id is-->" +element.id);
    flag = true;
    if(flag) {
    logMessage("-- Id Found -->" );
    else
    logMessage("-- Id Not Found -->");
    Hope the above logic would work fine.
    Bibhu
    Edited by: Bibhuti Bhusan on Sep 2, 2011 11:48 AM

  • Using Assoc Arrays in OBPM 10GR3 for 25 million comparisons

    Can we use Associative arrays in OBPM 10GR3 to do 25 million comparisons or even more than that?
    I have two assoc arrays which I compare with each other 25 million times by looping them one inside the other.
    For e.g.
    for(int i = 0; i < 5000; i++)
    for(j=0; j < 5000; j++)
    if(i==j)
    logMessage ("The value is equal");
    when I try to do that, I get an error:-
    Persistence Data error.
    I get this error:-
    Error while persisting the transaction data: 'An error occurred while accesing the database. Detail:SQL statement: 'unknown' ' Details: An error occurred while accesing the database. Detail:SQL statement: 'unknown' Caused by: Unexpected exception while enlisting XAConnection java.sql.SQLException: Transaction rolled back: Transaction timed out after 302 seconds BEA1-25BFB4A4F3934EFC9C00 at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1418) at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1330) at weblogic.jdbc.wrapper.JTAConnection.getXAConn(JTAConnection.java:189) at weblogic.jdbc.wrapper.JTAConnection.checkConnection(JTAConnection.java:64) at weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:92) at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:482) at fuego.jdbc.FaultTolerantConnection.prepareStatement(FaultTolerantConnection.java:541) at fuego.server.persistence.jdbc.JdbcServerActivityPersMgr.insertInstanceEvent(JdbcServerActivityPersMgr.java:913) at fuego.server.persistence.Persistence.storeInstanceEvent(Persistence.java:944) at fuego.server.execution.EngineExecutionContext.persistEvents
    So can we use such a big comparison on OBPM 10GR3. If yes, how?

    Don't use ASSOC Arrays. Use SETs.
    Also increase the JTA timeout in Weblogic to like say 600 seconds.

  • Internet Explorer CLOSE Button for OBPM 10GR3 Presentations

    Hi all,
    I am using OBPM 10GR3 presentations with a POPUP window.
    I already have a close button to close the presentation. This is a Global Interactive Activity which displays the dashboards.
    The Global Interactive Activity contains a screenflow and inside the screenflow I have a Interactive Component Call to call the presentation.
    Now the presentation opens smoothly and everything is displayed.. When we hit the CLOSE button everything goes away and when we open it again it again comes back to the previous Interactive Component Call and restarts.
    BUT
    When we Close the window itself instead of using the CLOSE button of the presentations, and we re-open, we get the previous data.
    This is because we do not hit the CLOSE button of the presentation instead hit the IE WINDOW CLOSE button on the top right hand corner besides the minimize maximize button.
    Therefore the call is still inside the screenflow inside the Global Interactive Activity and therefore it waits for the user to hit the CLOSE button of the presentations otherwise does not close.
    How can we resolve this issue?
    How can we make sure, that if the user closes the IE WINDOW itself using the CLOSE button, it closes the presentation itself and when re-opened displays the previous presentation?

    Hi,
    First of all this is a training issue with the user. It is not advisable not to press the close button of the IE.
    Nevertheles you can disable to close button of the presentaion.
    You can remove the x from dialogs by doing this. Open the executionDialog.xhtml file in the <OraBPMEnterpriseHomeDirectory>\webapps\workspace\jsf\common directory (both Studio and Enterprise have this file).
    Change the text on line 81 from this:
    <oc:Dialog verticalAlign="top" offsetY="40" backColor="#D4E1EB" borderColor="#517B9E"
    borderStyle="solid" borderWidth="1px" id="executionDialog#{componentBean.id}"
    title="#{fn:getMsg('EXECUTION')}" broadcastName="executionDialog#{componentBean.id}"
    maximized="#{componentBean.executionDialogMaximized}" width="#{componentBean.executionDialogWidth}"
    height="#{componentBean.executionDialogHeight}" titleBarCssClass="bpmWorkspaceDialogHeader"
    displayMaximizeButton="true"
    modal="false" jsObjectName="executionDialog#{componentBean.id}">
    to this:
    <oc:Dialog verticalAlign="top" offsetY="0" backColor="#FFFFFF" borderColor="#FFFFFF"
    borderStyle="solid" borderWidth="1px" id="executionDialog#{componentBean.id}"
    title="#{fn:getMsg('EXECUTION')}" broadcastName="executionDialog#{componentBean.id}"
    maximized="#{componentBean.executionDialogMaximized}" width="#{componentBean.executionDialogWidth}"
    height="#{componentBean.executionDialogHeight}" titleBarCssClass="bpmWorkspaceDialogHeader"
    displayMaximizeButton="true"
    displayCloseButton="false" modal="false" jsObjectName="executionDialog#{componentBean.id}">
    This change does a couple things. The addition of the text "displayCloseButton="false"" removes the x button that is causing the undesired results you're getting and setting the colors to #FFFFFF changes the light blue border around dialog boxes to white.
    Bibhu

  • Problem while Introspecting a Web-Service in OBPM 10GR3 studio

    I get the following problem while Introspecting a Web-Service in OBPM 10GR3 studio:-
    Introspecting...
    downloading /test-ws/testc?wsdl [Error] Instrospection exception: Web Service WSDL parse exception: HTTPS hostname wrong: should be <test-01.test.net>...
    Any idea why?
    It runs well in a browser, eclipse and SOAP UI?

    have you create the destination?
    do  you use the wizard to generate code?
    usually there is catch clause for this line of code
    wdContext.currentRequest_SERVICE_MDM_LOOKUPElement().modelObject().execute();
    Edited by: John Wu on Dec 16, 2010 11:51 PM

  • Text File opened in Wordpad cannot be parsed on OBPM 10GR3

    Hi all,
    Text File opened in Wordpad cannot be parsed on OBPM 10GR3
    Why is that?
    I use the following code to parse a file:-
    textFile = TextFile();
    textFile.open(name : "C:\testFile.txt");
    logMessage("---Does file exist?--> " + textFile.exists);
    foreach (line in textFile.lines) {
    logMessage("-- The LINE is-->" + line);
    pinBlockProcessing.linesCount = pinBlockProcessing.linesCount + 1;
    pinBlockProcessing.deviceIdentifierArray[] = line;
    textFile.close();

    Hi all,
    I also used other two methods to parse such a file which can be opened in Wordpad but not in Notepad.
    1) I used Java.Util.Scanner
    2) I also created and compiled a program/package/class which gets a file and parses it using Java.Util.Scanner using Java in Eclipse.
    I created a JAR out of it and tried to use this JAR in my process by introspecting it and then passing the file to be parsed to the methods in this JAR file.
    But this did not work either. Although the program does work in plain Java in Eclipse. It compiles and parses a a file which can be opened in Wordpad but not in Notepad.
    My program for both these methods was :-
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.Scanner;
    public class Test{
    public static void main(String args[]) throws IOException {
    FileReader fin = new FileReader("./testFile.txt");
    Scanner src = new Scanner(fin);
    src.useDelimiter("\n");
    while (src.hasNext()) {
    System.out.println(src.next());
    fin.close();
    This does not work either.
    All programs and methods work when a text file can be opened in NotePad.
    What could be possible solution in OBPM 10GR3?
    It is something to do with Carriage Return and generating a file in UNIX which when opened in Notepad shows one straight horizontal line and when opened in Wordpad shows vertical lines.

  • Authentication for automatic processes

    I have a process which has only automatic activiies exposed as webservice. I have two questions:
    1. To create an instance, do we need to have a role and have Global creation activity in that role?
    2. In one of the automatic activities, I want to get the list of instances for a particular user. How can you create process session without password, in Studio or otherwise from PBL and not with PAPI/PAPI_WS
    For eg: in the call to connect, I want to only specify user name.
    ProcessService ps;
    ps.connectTo(url : Fuego.Server.directoryURL, user : "test", password : "somestuff");
    Thanks

    I have been working at this for days.
    The error is either my Apple ID or password are incorrect.
    I have talked to the ignorant folks at Apple support and answered all their stupid questions.  they have no ideas except reset the Apple TV.
    I have created a new apple id on another laptop and turned on home sharing on iTunes sucessfully with the new ID.
    I reset my airport base station and connected it directly to my Apple TV.
    The new ID fails on the Apple TV as well..
    I have read discussions looking for any suggestion.
    Home sharing worked fine until I was stupid enough to update my Apple TV. It even continued to work with my iTunes music playing in the background even though the "turn on home sharing" box was blocking the computers menu.
    I conclude this product, like a lot of what Apple is doing lately, has problems no one knows how to fix and conclude home sharing in general is not worth the trouble.
    Because I can no longer access the computer menu on my Apple TV it makes the Apple TV pretty much worthless.
    As always, no one has any ideas how to resolve this. (No one has ever had a constructive suggestion for any question I have ever posted on this discussion.)

  • Error while deploying a project to the OBPM 10GR3 Server

    Hi all,
    I am trying to deploy my current project to the OBPM 10GR3 server and it gives me the following exception. I am not sure what is this exception.
    The project compiles well in Studio 10GR3.
    Cannot publish the project.
    'close' is not a function. Caused by: 'close' is not a function.
    Does anybody know what is the exception?

    Got it..
    I was using Fuego.Sql.DynamicSQL.close(Iterator)
    For a an executeUpdate query which returns an int.
    But I used it in a method and did not use that method inside my process or screenflow.
    But it did not give me any error/exception while compiling it in Studio.
    It gave me an exception while publishing in Enterprise.
    This is strange.
    It should have given me an error/exception while compiling itself rather than while publishing in Enterprise.

Maybe you are looking for