Hi All,
I would like to perform some queries on workflows. For example i want to take all wokflow which have a query with a specific label, or delivery with specific parameter and so on.
Under the workflow fields list i see all the possible activies with all the relevant field (see picture below)
But when i try to make a query on a specific activity (e.g. Javascript code exist such as....) under the activity i don't find any field (see picture below).
Do you know if i can perform somehow this type of query?
Thank you
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @federico__,
You cannot run such a query on workflows in a workflow query activity since these data are not stored as SQL fields, but in the xml of the workflows.
So for this you need to run a xtk:queryDef query inside a javascript activity. There you can select all your workflows, and then parse the xml of each workflow to check if they contain a query activity with a given label, or a delivery with a given label, etc.
Thanks,
Ishan
Views
Replies
Total Likes
Hi Federico,
You may be able to extend the workflow schema and create a specific field that notes individual workflow activities contained in a workflow. That said, as I have not seen this implemented before, I cannot tell you how exactly to do this or if there will be any significant performance impact.
Regards,
Craig
Views
Replies
Total Likes
Hello Craig,
Thank you for the answer.
Unfortunately i cannot change the db schema creating a new table because i don't have the permission.
Anyway do you know why i cannot perform this query as always?
If i change the query (e.g. check only if javascript activity exist), i get the following error
Regards,
Views
Replies
Total Likes
Hi @federico__,
You cannot run such a query on workflows in a workflow query activity since these data are not stored as SQL fields, but in the xml of the workflows.
So for this you need to run a xtk:queryDef query inside a javascript activity. There you can select all your workflows, and then parse the xml of each workflow to check if they contain a query activity with a given label, or a delivery with a given label, etc.
Thanks,
Ishan
Views
Replies
Total Likes
Super Thanks! It worked!!
Do you know if also temporary tables (e.g. tables generated during workflow execution) are stored as xml and not as sql?
Views
Replies
Total Likes
Hi @federico__ ,
Tables generated during workflow execution are stored as sql tables. You can get their name between activities by using the vars.tableName variable.
Thanks,
Ishan
Views
Replies
Total Likes