AC classic - query on activies of workflow | Adobe Higher Education
Skip to main content
Level 2
March 16, 2022
Respondido

AC classic - query on activies of workflow

  • March 16, 2022
  • 2 respostas
  • 1648 Visualizações

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

Este tópico foi fechado para respostas.
Melhor resposta por isahore

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

2 Respostas

Craig_Thonis
Adobe Employee
Adobe Employee
March 16, 2022

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

Level 2
March 16, 2022

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,

 

isahore
Community Advisor
isahoreCommunity AdvisorResposta
Community Advisor
March 17, 2022

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

Level 2
March 17, 2022

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? 

isahore
Community Advisor
Community Advisor
March 17, 2022

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