Searching for instances using getIntancesByFilter and ClientProcessService

I am trying to get an array of all instances in a process so I can get some the data and use it to populate some dropdowns. I am using a custom, AJAX-enabled JSF presentation to call a server-side-no method in my component model. My code looks like this:
Fuego.Papi.Instance[] things;
Fuego.Papi.ClientProcessService cps = new Fuego.Papi.ClientProcessService();
cps.connect();
Fuego.Papi.InstanceFilter filter = new Fuego.Papi.InstanceFilter();
filter.create(cps);
filter.searchScope = SearchScope(ParticipantScope.ALL, StatusScope.ALL);
filter.addAttributeTo("projVar", Comparison.IS, "projValue");
things = cps.getInstancesByFilter(filter);
foreach (thing in things){
     logMessage("Thing - " + thing.activityName + ".", "INFO");
cps.disconnectFrom();
I think the code is failing at line filter.create(cps), but I can't be sure. When I launch the screenflow, I am presented with an error about invalid arguments for method signature [nameOfMethod]. I can't debug the method either because of this error.
If I remove everything south of cps.connect();, I can loop through the project vars defined in the process. I am using a ClientProcessService because I want to use the existing session from the workspace to get this data. Any thoughts?

I think you're just missing the processId in your logic ("/OrderEntry" in the logic below). Your use of "projValue" won't work unless you're looking for the hard coded string "projValue".
// Create objects used by the filter that searches the engine
ClientBusinessProcess cbp;
InstanceFilter instF;
// Connect to the process that is currently running.
// In this example, the process name is "Order Entry"
// (no space characters).
cbp.connectTo(processId : "/OrderEntry");
// create the filter
instF.create(processService : cbp.processService);
// filter based on instances done by ALL participants in any
//   activity between the Begin and End activities
//   (ONLY_INPROCESS)
instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
// Get the orders with a order status of "Rejected"
instF.addAttributeTo("projjVar", Comparison.IS, "Rejected");
. . .Dan
orderCount = length (getInstancesByFilter(cbp, instF))
return orderCount

Similar Messages

  • How to search for files using wildcards * and ?.

    Hi All,
    I've been searching the forum for a couple of hours now and have been unable to find a good example of how to search a directory (Windows OS) for a file using wildcards * and/or ?. Does anyone out there have a good example that they can share with me?
    Thanks

    Hi All,
    First of all I want to thank everyone for taking the time to respond to my question. All of your responses where greatly appreciated.
    I took the example code that was posted by rkconner, thanks rkconner, and modified it to allow me to search for files in a directory that contain * and/or ?. Yes, I said and/or! Meaning that you can use them both in the same file name, example: r??d*.t* would find readme.txt.
    I've posed my complete and thoroughly document code below. I hope it is very helpful to other as I have searched many forums and spent many hours today trying to resolve this problem.
    Enjoy
    * File Name: WildcardSearch.java
    * Date: Jan 9, 2004
    * This class will search all files in a directory using the
    * asterisk (*) and/or question mark (?) as wildcards which may be
    * used together in the same file name.  A File [] is returned containing
    * an array of all files found that match the wildcard specifications.
    * Command line example:
    * c:\>java WildcardSearch c:\windows s??t*.ini
    * New sWild: s.{1}.{1}t.*.ini
    * system.ini
    * Command line break down: Java Program = java WildcardSearch
    *                          Search Directory (arg[0]) = C:\Windows
    *                          Files To Search (arg[1]) = s??t*.ini
    * Note:  Some commands will not work from the command line for arg[1]
    *        such as *.*, however, this will work if you if it is passed
    *        within Java (hard coded)
    * @author kmportner
    import java.io.File;
    import java.io.FilenameFilter;
    public class WildcardSearch
         private static String sWild = "";
          * @param args - arg[0] = directory to search, arg[1] = wildcard name
         public static void main(String[] args)
              String sExtDir = args[0]; // directory to search
              sWild = args[1];   // wild card to use - example: s??t*.ini
              sWild = replaceWildcards(sWild);
              System.out.println("New sWild: " + sWild);
              File fileDir = new File(sExtDir);
              File[] arrFile = fileDir.listFiles(new FilenameFilter()
                   public boolean accept(File dir, String name)
                        return (name.toLowerCase().matches(sWild));
              for (int i = 0; i < arrFile.length; ++i)
                   System.out.println(arrFile.getName());
         }     // end main
         * Checks for * and ? in the wildcard variable and replaces them correct
         * pattern characters.
         * @param wild - Wildcard name containing * and ?
         * @return - String containing modified wildcard name
         private static String replaceWildcards(String wild)
              StringBuffer buffer = new StringBuffer();
              char [] chars = wild.toCharArray();
              for (int i = 0; i < chars.length; ++i)
                   if (chars[i] == '*')
                        buffer.append(".*");
                   else if (chars[i] == '?')
                        buffer.append(".{1}");
                   else
                        buffer.append(chars[i]);
              return buffer.toString();
         }     // end replaceWildcards method
    }     // end class

  • Hi. I am using the iPhone 4S and when I'm searching for places using Google it does not automatically detect my location. How do I change this?  FYI...under settings i

    Hi. I am using the iPhone 4S and when I'm searching for places using Google it does not automatically detect my location. How do I change this?  FYI...under settings i

    If you are missing using google maps - try the Nokia map app called "here"

  • Hi. I am using the iPhone 4S and when I'm searching for places using Google it does not automatically detect my location. How do I change this? FYI...under settings i have it set at "Use new precise locations from my device."

    Hi. I am using the iPhone 4S and when I'm searching for places using Google it does not automatically detect my location. How do I change this? FYI...under settings i have it set at "Use new precise locations from my device."

    If you are missing using google maps - try the Nokia map app called "here"

  • We are using apple tv to try to access our itunes account on the computer.  We see our library of music but when we click on the song it searches for a long time and then says that it cannot access the itunes store.  Any ideas on what we are doing wrong?

    We are using apple tv to try to access our itunes account on the computer.  We see our library of music but when we click on the song it searches for a long time and then says that it cannot access the itunes store.  Any ideas on what we are doing wrong?

    Welcome to the Apple Community.
    Try the following steps, check whether things are working after each step where appropriate, before trying the next.
    Restart the Apple TV (Settings > General > Restart).
    Restart the Apple TV by removing ALL the cables for 30 seconds.
    Restart your router.
    Reset the Apple TV (Settings > General > Reset > Reset all settings)
    Restore the Apple TV (Settings > General > Reset > Restore)

  • I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts)

    I am totally frustrated by the fact that now i have gone to iCloud and after a few synchs, my contacts are all mixed up with the wrong information.  For instance, my email and phone number comes up under someone else's name (a thousand contacts).  I dont know how to repair this.  what a nightmare

    An icloud account is designed to be used by just one user.  If you have given your ID or set up your account on someone else's device, then their data will be mingled with your or worse.

  • Is it possible to search for strings containing spaces and special characters?

    In our RoboHelp project, there are figures with text labels such as Figure 1, Figure 3-2, etc.
    When I search for "Figure 3" I get all pages containing "Figure" and "3", even if I surround it in quotes.  Similarly, searching for "3-2" treats the '-' character as a space and searches for all pages containing '3' or '2'.
    Is there a way to search for strings containing spaces and special characters?

    In that case I think the answer is no if you are using the standard search engine. However I believe that Zoom Search does allow this type of searching. Check out this link for further information.
    http://www.grainge.org/pages/authoring/zoomsearch/zoomsearch.htm
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • How to Modify Search for Leads using Date types in the Assgmnt Block Date

    Hello Experts,
    I have a requirement to modify the search for Leads using Dates in the Assignment Block Dates and using the Posting Date of the transaction.
    Any ideas?
    Thank you in advance,
    Justin

    If you look at the grants, you'll see that there are over 170 objects from the FLOWS_030000 granted to PUBLIC:
    SQL> select count(*) from dba_tab_privs where owner= 'FLOWS_030000' and grantee = 'PUBLIC';
    173
    If we were go grant these privileges to a role, called APEX_APP_RU, and grant this role to APEX_PUBLIC_USER and any schemas an application is linked to (Workspace to Schema), would that be a workable solution?
    The only problem I see right off hand that this might not work is that PUBLIC has synonyms created for the FLOWS_030000 objects. If we revoke the underlying privileges, because of the synonyms, this might not work.
    SQL> select COUNT(*) from dba_synonyms where table_owner = 'FLOWS_030000' and owner = 'PUBLIC';
    176
    Does anyone else have any ideas?

  • SharePoint 2010 Enterprise Search for User Profile tags and Notes

    Hi,
    Actually my requirement is, "Sharepoint Enterprise Search for User Profile tags and Notes".
    I would like to use the Tags and Notes in enterprise search.
    Is it possible?
    Thanks & Regards
    Poomani Sankaran

    Check if this helps
    http://blogs.msdn.com/b/spses/archive/2011/02/05/social-computing-part-3-activity-feeds-social-ratings-tags-and-notes.aspx
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/

  • My mac is infected with viruses, Safari can not normally search for constantly appear commercials and some unknown site. What to do? antivirus free program that you recommend?

    my mac is infected with viruses, Safari can not normally search for constantly appear commercials and some unknown site. What to do? antivirus free program that you recommend?

    You may have installed the "VSearch" trojan, perhaps under a different name. Remove it as follows.
    Malware is constantly changing to get around the defenses against it. The instructions in this comment are valid as of now, as far as I know. They won't necessarily be valid in the future. Anyone finding this comment a few days or more after it was posted should look for more recent discussions or start a new one.
    Back up all data before proceeding.
    Step 1
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Uninstall any extensions you don't know you need, including any that have the word "Spigot," "Trovi," or "Conduit" in the description. If in doubt, uninstall all extensions. Do the equivalent for the Firefox and Chrome browsers, if you use either of those.
    Reset the home page and default search engine in all the browsers, if it was changed.
    Step 2
    Triple-click anywhere in the line below on this page to select it:
    /Library/LaunchAgents/com.vsearch.agent.plist
    Right-click or control-click the line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item named "com.vsearch.agent.plist" selected. Drag the selected item to the Trash. You may be prompted for your administrator login password.
    Repeat with each of these lines:
    /Library/LaunchDaemons/com.vsearch.daemon.plist
    /Library/LaunchDaemons/com.vsearch.helper.plist
    /Library/LaunchDaemons/Jack.plist
    Restart the computer and empty the Trash. Then delete the following items in the same way:
    /Library/Application Support/VSearch
    /Library/PrivilegedHelperTools/Jack
    /System/Library/Frameworks/VSearch.framework
    ~/Library/Internet Plug-Ins/ConduitNPAPIPlugin.plugin
    Some of these items may be absent, in which case you'll get a message that the file can't be found. Skip that item and go on to the next one.
    This trojan is distributed on illegal websites that traffic in pirated content. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect much worse to happen in the future.
    You may be wondering why you didn't get a warning from Gatekeeper about installing software from an unknown developer, as you should have. The reason is that this Internet criminal has a codesigning certificate issued by Apple, which causes Gatekeeper to give the installer a pass. Apple could revoke the certificate, but as of this writing, has not done so, even though it's aware of the problem. This failure of oversight has compromised both Gatekeeper and the Developer ID program. You can't rely on Gatekeeper alone to protect you from harmful software.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.

  • Search for images using Keywords Problem.

    1) In LR4, Search for images using Keywords (click on arrow next to Keyword).
    2) Select image, export to PS6, save as Tif.
    3) Tif retains all Keywords when it appears in LR
    4) Despite that, image does not show up in the same 'Search for images using Keywords'.
    Can anyone help with this, it is frustrating me!

    V. 4.1
    Thanks, I will try, but it seems to be an inconsistent problem.
    Simon Fletcher
    Simon Fletcher Photography
    Woody's Nest
    Newton of Kinkell
    by Conon Bridge
    Ross-shire
    Scotland
    UK  IV7 8AS
    Tel: 01 349 864 830
    Web: www.simonfletcherphotography.co.uk
    Work:
    The Glass Scribe
    Tel: 01 349 867 088
    Email: [email protected]
    Web: www.glassscribe.com

  • Please help me with my electrical engineering homework : temperature control and watering system for greenhouse using labview and arduino

    temperature control and watering system for greenhouse using labview and arduino
    spesification :
    1. max temp : 28 celcius (when temperature is more than 28 celcius, fan ON)
    2. min temp : 20 celcius (when temperature is under 20 celcius, heater ON)
    3. watering system : aquaponic (grow plant and fish in separate tank but connect each other). Plant roots help filter water for fish. Fish poop for plants fertilizer. So I need a pump to distribute water.
    Please help me create VI file simulation.. I'm sorry I'm not fluent in English. May God bless you all
    Attachments:
    YOOOSHH.vi ‏88 KB

    Duplicate thread.   Please keep the discussion in that thread where you already have a response. It is also the more appropriate thread for your question.
    Lynn

  • Search for mai in gmail and copy text

    I am having hard time to copy text. Basically, I need to search for mail in gmail and copy text to be sent as text message or copy as note.
    1 In ff and default browser, I can search for mail, but no select option
    2 In Nokia messaging there is no option for even search.
    When I swipe from left to right, whole scree is moving. Appreciate any help.

    Check out the Scout, for searches in Contacts/ Conversations, etc....
    /t5/Maemo-Devices/Scout-released-for-N900/td-p/739629
    For Copy-Pasting from Gmail, I am not aware of the technique of doing the same from a browser. The copy-paste function works well from a text-field to another text-field.
    So, I just forward the Gmail message, so that the body of the text appears on a text-filed inside the browser......and then I copy-paste it................without really forwarding the message to anyone

  • HT5071 Why isn't my newly published book coming up when I search for it by title and by author on iTunes and iBooks?

    Why isn't my newly published book coming up when I search for it by title and by author on iTunes and iBooks?

    Thanks, but it turns out iTunes just needed another 24 hours. Now when I search in iTunes by my name or book title, it comes up!
    Do you happen to know why it doesn't list my name on itunes? It shows the title and then By (blank). Grr.
    bit.ly/1aveWcg

  • Preview glitch when searching for words on page and when using text tools to write comments/notes on .pdf slides, why?

    When using Preview to access my class notes as .pdf files, I have encountered extremely frustrating glitches when trying to search for specific words or phrases within the .pdf files and when trying to use 'text tools' to write notes on the .pdf slides.  Preview did not behave in this manor with Mountain Lion OS.  This seems to correlate with my recent upgrade to Mavericks OS.
    When using the search function you should be able to type in any number of letters or words and press enter to continually cycle through the highlighted findings that match what you have typed in.  Instead it now, typically, stops tracking what I type in after about 3-4 letters and the yellow highlight turns grey.  Once it does this if you try to press enter to cycle through what it has found it no longer cycles.  It never did this in Mountain Lion using the very same .pdf files I had previously used in the old OS, and it does this despite there being multiple matches for what I am searching.
    When clicking 'show edit tool bar' button and then 'text tools' button to be able to free text notes on the .pdf file I have to exit out of the 'text tools' mode to be able to advance to the next page.  This is extremely inconveneint and, again, Preview did not do this in Mountain Lion.
    These are my two major complaints about Preview that I have discovered so far in my short time using it with the new Mavericks OS.
    Any help would be very much appreciated.

    I have this issue too and was pleased to find this thread.  Did either of you find the source of the problem or how to fix it? 
    I've tried using Wondershare PDF Editor as well and wondered that had messed some settings up.  Have either of you used that? 
    If so, how would I revert to a clean version of Preview?
    Hope we can get this sorted. 

Maybe you are looking for

  • RunTime Error while saving a Sales Order

    Hi All, When i am saving a Sales Order, the system is throwing a Runtime Error. The ABAP Code in the Runtime Error screen as follows.           select * from (t681-kotab) appending table <cond_tab>                  up to 1 rows                  where

  • Is there a way to access remote login and screen sharing logs?

    I have a very high suspicion that my macbook air has been accessed through remote login. Here's what happened. I closed my macbook air, letting it sleep, and left my house. After coming back I found it logged into the Guest account (which I didn't kn

  • Automator "Connect to Server" doesn't work with spaces in volume name

    I'm trying to use an old Automator Workflow I had set up in Snow Leopard that connected to a list of specified server mounts (both Windows smb:// and Apple afp://). It works fine for most of them, until it hits a mount point that has a space in it, w

  • MRP LIST genaration

    HI experts, Requirement of getting a coloumn in stock and requiremtn list genrated collectively for plant materials. As we all know system suggests a requirement with purchse request but disply of MD04 "collective access " dosent show a required quan

  • OVI sync doesn't work

    It goes through some kind of 4 stage setup, but then says it's logging in & fails. Not surprising really because I've never had the opportunity to enter my login details. I also want to change the settings to send only as have been burnt before by th