2016-08-31 12:56 AM
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.
Solved! SEE THE SOLUTION
2016-09-02 12:47 PM
I've seen something similar, not using WDSL/SOAP, but using the REST interface.
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
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
2016-09-05 01:22 AM
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.
2016-09-05 01:46 AM
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.
2016-09-05 02:21 AM - edited 2016-09-05 02:21 AM
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.
2016-09-05 07:21 AM
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.
2016-09-06 03:18 AM - edited 2016-09-09 02:17 AM
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.
2016-09-09 02:20 AM
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.