Hi,
Thank you Pete for the useful query
It can be handy to check from time to time that there are no broken dependencies.
Marc, perhaps it would be interesting to consider using the 'Export with references' option when exporting your Workflow?
This option supports VARA references in a sub FOREACH JOBP (and it support sub JOBS of course)
Here is the link to the documentation
Regards,
Yohan
------------------------------
Solution Architect Automation
Broadcom
------------------------------
Original Message:
Sent: 11-19-2020 02:30 PM
From: Pete Wirfs
Subject: AWA 12.2 (Windows 2016) import of a workflow with some missing objects inside
Oh yea... VARAs can also be used inside of promptsets, inside of the variables tab to provide parameters to those variables, and VARAs can be imbedded inside of VARAs . Extremely versatile buggers.
------------------------------
Pete Wirfs
SAIF Corporation
Salem Oregon USA
Original Message:
Sent: 11-19-2020 11:57 AM
From: Pete Wirfs
Subject: AWA 12.2 (Windows 2016) import of a workflow with some missing objects inside
That's a very different problem, so here is a very different SQL to answer the question of what FOREACH rules are missing their VARA;
select x.oh_client as client
, x.oh_name as Workflow
, jppf_SourceName as ForEachVara
, (select 'YES' from oh y where y.OH_DeleteFlag = 0 and y.oh_client = x.oh_client and y.oh_name = jppf_SourceName) as VarExists
from jppf
, oh x
where x.oh_idnr = jppf_oh_idnr and x.oh_deleteflag = 0 and not x.oh_client = 0
and (select 'YES' from oh y where y.OH_DeleteFlag = 0 and y.oh_client = x.oh_client and y.oh_name = jppf_SourceName) is null
By the way, workflows could also be missing VARA objects that are referenced in precondition rules, postcondition rules, or process scripts. Interpreting process scripts to find what variables it references is far too complex to address with SQL. It would be like writing a compiler.
------------------------------
Pete Wirfs
SAIF Corporation
Salem Oregon USA
Original Message:
Sent: 11-19-2020 03:42 AM
From: marc broussard
Subject: AWA 12.2 (Windows 2016) import of a workflow with some missing objects inside
Thanks a lot
really good but not perfect:
it works fine with missing jobs in jobp
Great
BUT
if you have a "FOR EACH JOBP", with a "missing" VARA , this VARA is not found by your request!
Original Message:
Sent: 11-18-2020 06:21 PM
From: Pete Wirfs
Subject: AWA 12.2 (Windows 2016) import of a workflow with some missing objects inside
Hey, this sounded to me like a good query to have on hand, so I just wrote one. I hope it works for you? I included a commented out where-clause to select just one workflow, but I've been testing it without that where-clause because I wanted to see what unrelated workflows might be broken as well. Thankfully I found no broken workflows in prod, only in non-prod.
select (select oh_client from oh where oh_idnr = jpp_oh_idnr) as Client
, (select oh_name from oh where oh_idnr = jpp_oh_idnr) as Workflow
, jpp_Lnr as TaskNum
, jpp_object as TaskObject
, JPP_Alias as TaskAlias
, (select 'YES' from oh where oh_name = jpp_object and OH_DeleteFlag = 0 and oh_client = (select oh_client from oh where oh_idnr = jpp_oh_idnr)) as TaskFound
from jpp
where not jpp_object in ('START', 'END', 'FE', 'IF')
--and jpp_oh_idnr = (select oh_idnr from oh where oh_name = 'WorkflowName')
and (select 'YES' from oh where oh_name = jpp_object and OH_DeleteFlag = 0 and oh_client = (select oh_client from oh where oh_idnr = jpp_oh_idnr)) is null
order by 1,2,3,4
x
------------------------------
Pete Wirfs
SAIF Corporation
Salem Oregon USA
Original Message:
Sent: 11-18-2020 10:54 AM
From: marc broussard
Subject: AWA 12.2 (Windows 2016) import of a workflow with some missing objects inside
Hello
We have 2 clients on the same AWA (for instance 10 and 20).
10 is for the developpment
20 for the production
We have to export Workflows definition (in xml file ) from client 10, in order to import them in client 20:
Normaly all the objets (JOBP, JOBS , VARA ...) are in the same folder.
We export this folder:
=> 1 folder with 1 JOBP, and with all the objects inside the JOBP
From time to time we missed a job ...
I mean one of the job ... is not in the folder with its JOBP.
Also in the export it is missing.
Import and export work, and on the client 20 (production) we have a JOBP with a missing job (if we open the JOBP it is white and not grey).
Is there , after the import, any sql request (if possible) or any script ... to check if all the objects in the JOBP exist or not ?
thanks a lot
Marc Broussard
Engie