Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
getWorkflowsByQuery Syntax?
Bill Klish
TeamSite 6.5
Windows 2003 EE
We are writing a simple JSP that will display a filtered list of workflow jobs for the logged in user. I have looked at the CS SDK samples, the API docs, cookbook, etc. and can't seem to find any explanation on what the syntax for the getWorkflowsByQuery string needs to look like. I keep getting an exception for invalid query syntax. All we want to do is get the workflows owned by the logged in user by a certain name.
This is what I have:
CSWorkflow[] wfs = wfe.getWorkflowsByQuery("name=MyWorkflowName");
I have tried name==MyWorkflowName.
Can someone tell me where this is documented or how this can be done?
Find more posts tagged with
Comments
james1
The query syntax is XML. See iwhome/local/config/wft/wfquery.dtd for details.
-- James
--
James H Koh
Interwoven Engineering
Migrateduser
Hi,
The query is an XML string that follows the dtd available in <iw-home>\local\config\wft\wfquery.dtd. A sample query would be -
<wfquery>
<or>
<active/>
<not><active/></not>
</or>
</wfquery>
Unfortunately, I do not think the query allows for searching for tasks with a particular name. You can definitely ask for workflows owned by a particular user, for example -
<wfquery>
<and>
<or>
<active/>
<not><active/></not>
</or>
<ownedby v="username"/>
</and>
</wfquery>
Hope this helps.
Best Regards,
Narendra
james1
Narendra
I'm pretty sure that you can nest a taskquery inside of a wfquery, allowing you to do things like get the jobs that have tasks with a certain name. I'm not sure when this functionality was added.
-- James
--
James H Koh
Interwoven Engineering
Bill Klish
Ok, thanks for pointing me in the right direction. However, after looking through both DTDs, there is no way to filer the list of workflows returned by name or tasks for that matter. I will have to write my own method to do this. The filter capability is only on variables or the description field, neither of which work for me. Can this be added as a feature request, or do I need to create a support case?
james1
You should probably contact Tech Support and have them open a feature request for this.
-- James
--
James H Koh
Interwoven Engineering