Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I experience very slow query when executing getAllWorkflows() on WFA 4.0. timeout is around 360 secondes to work.
Server is not overloaded. 4 vCPU 16GB Ram.
If anyone suffer the same, I would happy to share a discussion.
François
Solved! See The Solution
1 ACCEPTED SOLUTION
francoisbnc has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attaching the dar with a Data Source Type ( Importable on a WFA4.0) to get All workflows and their IDs that can be used by runWorkflow()
1. Modify your client to execute an SQL query using the default built-in DB credentials wfa/Wfa123 to get the workflow ID for any workflow you want to execute. The Query execution is lightning speed compared to REST API execution.
2. Now you have your ID, do what you were already doing.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
8 REPLIES 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've seen something similar, not using WDSL/SOAP, but using the REST interface.
http://<wfaserver>/rest/workflows
This can take a long time ... I've seen it take longer but on my lab system just now with about 81 total workflows this took about 20 seconds and returned over 13,000 lines of XML ... on a WFA Win2012 server running with 2-cores and 4GB memory.
However, if you just access a category (group) of workflows you want returned (or use an existing Category like 'Setup', 'Migration', etc) you speed it up
http://wfaserver/rest/workflows?categories=XYZ
NOTE-1 : try ?categories=Setup to test an existing category
NOTE-2 : the category names are case sensitive
I'm not sure if/how this translates to WDSL/SOAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I can use getallworkflowsbycategories() to limit the search scope and that effectively speed up the job.
But the idea was to retreive the id of any workflows and I don't know in which categorie the workflow is.
François
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Its takes some time to return all workflows, but I've not seen it taking more than 360 seconds.
But as @dkorns suggest making a category for your workflows will speed up the filtering.
WSDL has a method getAllWorkflowsByCategories() to get this for you.
Try it and let me know how this worked for you.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like search workflow id to use in runWorkflow() command used later. I don't know necessarily where the workflow is located.
So for the moment I created a temporary hash table workflow name /workflow id, because I had to wait 5 minutes for getallworkflows() command finish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I have something that will help you.. lets see.
1. I can assume that the list of workflows and their IDs are not dynamically changing. Nor a new set of workflows get added too frequently.
2. So during every execution, you don't need to get the list of all workflows, then find your concerned workflow and get its ID and then call runWorkflow(id) to execute it.
Lets create a new DataSource to acquire the list of workflownames and their IDs. Acquistion happens on its own defined frequency and due to point (1), this DB will be fairly up to date. The data that you need can easily be fetched using a filter for a given workflow name.
This method will save your all the time the client was waiting for API response to fetch all workflows and computing their IDs. Take advantage of caching.
I'm making a sample code right now to elaborate this, will post its done.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
francoisbnc has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Attaching the dar with a Data Source Type ( Importable on a WFA4.0) to get All workflows and their IDs that can be used by runWorkflow()
1. Modify your client to execute an SQL query using the default built-in DB credentials wfa/Wfa123 to get the workflow ID for any workflow you want to execute. The Query execution is lightning speed compared to REST API execution.
2. Now you have your ID, do what you were already doing.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for your job, I really appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Updated the Data Source type script to include workflow UUID. WSDL soap APIS need workflow-id but REST APIs need workflow-uuid.
Also given a DataSource image file to help how to add a data Source for this.
sinhaa
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
