From d8436202922ec9d83a0f7035c67d9491f2745d46 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Jan 2026 14:07:05 +0300 Subject: [PATCH] 199 intermediate, state navigation --- v1/Application.cfc | 2 +- v1/lib/expression_parser.cfc | 157 ++++++++ v1/lib/rest_api_helper.cfc | 25 +- v1/resources/instance_operation_cfs_param.cfc | 372 +++++++++++++++++- v1/resources/instance_operation_default.cfc | 2 + v1/resources/param_value_list.cfc | 2 +- .../svc_operation_cfs_param_compute.cfc | 151 +++++++ 7 files changed, 703 insertions(+), 8 deletions(-) create mode 100644 v1/lib/expression_parser.cfc create mode 100644 v1/resources/svc_operation_cfs_param_compute.cfc diff --git a/v1/Application.cfc b/v1/Application.cfc index 34c81c6..c26a758 100644 --- a/v1/Application.cfc +++ b/v1/Application.cfc @@ -57,7 +57,7 @@ //variables.framework.docs={}; variables.framework.docs.APIName="svc-api"; - variables.framework.docs.APIVersion="0.198"; /*$ git config --global --unset user.password*/ + variables.framework.docs.APIVersion="0.199"; /*$ git config --global --unset user.password*/ variables.framework.globalHeaders = structNew(); variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location"; diff --git a/v1/lib/expression_parser.cfc b/v1/lib/expression_parser.cfc new file mode 100644 index 0000000..8bb207e --- /dev/null +++ b/v1/lib/expression_parser.cfc @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/v1/lib/rest_api_helper.cfc b/v1/lib/rest_api_helper.cfc index 9e4d54f..b16d633 100644 --- a/v1/lib/rest_api_helper.cfc +++ b/v1/lib/rest_api_helper.cfc @@ -7,6 +7,7 @@ + - + @@ -156,7 +157,7 @@ - + @@ -402,6 +403,22 @@ "queryDurationMs":#queryDurationMs#, "runDurationMs":#runDurationMs# }---> + + + + + + + + + + + + - + @@ -434,7 +451,7 @@ - + diff --git a/v1/resources/instance_operation_cfs_param.cfc b/v1/resources/instance_operation_cfs_param.cfc index c9306f9..84f3624 100644 --- a/v1/resources/instance_operation_cfs_param.cfc +++ b/v1/resources/instance_operation_cfs_param.cfc @@ -2,7 +2,7 @@ + + + + + + + + + + + + + + + + + + select p.instance_operation_uid, o.instance_uid, p.svc_operation_cfs_param_id + from instance_operation_cfs_param p + join instance_operation o on (p.instance_operation_uid=o.instance_operation_uid) + where p.instance_operation_cfs_param_uid= + + + + + + + + + + select o.instance_uid + from instance_operation o + where o.instance_operation_uid= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select p.param_value + from svc_operation_cfs_param s + join instance_operation_cfs_param p on (s.svc_operation_cfs_param_id = p.svc_operation_cfs_param_id) + where s.svc_operation_cfs_param = 'resourceRealm' + AND p.instance_operation_uid = + + + + + + + + + + + + + + + + + select r.svc_operation_cfs_param + from svc_operation_cfs_param r + join svc_operation o on (r.svc_operation_id=o.svc_operation_id) + join svc_operation_cfs_param p on (o.svc_operation_id=p.svc_operation_id) + where p.svc_operation_cfs_param_id = + AND r.ref_svc_id > 0 + + + + + + + + + + + + + + + WITH RECURSIVE r AS ( + SELECT + 1 AS i + ,e.display_name + ,s.svc + ,p.param + ,p.param_value + ,p.instance_uid::text + FROM instance e + JOIN instance_cfs_param p on (e.instance_uid=p.instance_uid) + JOIN svc s on (e.service_id=s.svc_id) + JOIN instance_operation_cfs_param op on (p.instance_operation_cfs_param_uid=op.instance_operation_cfs_param_uid) + LEFT JOIN svc_operation_cfs_param sp on (op.svc_operation_cfs_param_id=sp.svc_operation_cfs_param_id) + LEFT JOIN instance_cfs_param rp on (e.instance_uid=rp.instance_uid ) + LEFT JOIN instance ri on (rp.instance_uid=ri.instance_uid) + WHERE e.instance_uid= + + UNION + + SELECT + i+1 AS i + ,e.display_name + ,s.svc + ,p.param + ,p.param_value + ,p.instance_uid::text + FROM instance_cfs_param p + JOIN instance e on (p.instance_uid=e.instance_uid) + JOIN svc s on (e.service_id=s.svc_id) + JOIN r on (r.param_value=p.instance_uid::text) + WHERE r.i < 10 + ) + select param, param_value from r + order by r.i desc + + + + + + WITH RECURSIVE r AS ( + SELECT + 1 AS i + ,e.display_name + ,s.svc + ,sp.svc_operation_cfs_param as param + ,p.param_value::text + ,o.instance_uid::text + FROM instance e + JOIN instance_operation o ON (e.instance_uid=o.instance_uid AND o.operation='create') + JOIN instance_operation_cfs_param p on (o.instance_operation_uid=p.instance_operation_uid) + JOIN svc s on (e.service_id=s.svc_id) + --JOIN instance_operation_cfs_param op on (p.instance_operation_cfs_param_uid=op.instance_operation_cfs_param_uid) + JOIN svc_operation_cfs_param sp on (p.svc_operation_cfs_param_id=sp.svc_operation_cfs_param_id AND sp.ref_svc_id > 0) + --LEFT JOIN instance_cfs_param rp on (e.instance_uid=rp.instance_uid ) + --LEFT JOIN instance ri on (rp.instance_uid=ri.instance_uid) + WHERE e.instance_uid= + + UNION + + SELECT + i+1 AS i + ,e.display_name + ,s.svc + ,p.param + ,p.param_value + ,p.instance_uid::text + FROM instance_cfs_param p + JOIN instance e on (p.instance_uid=e.instance_uid) + JOIN svc s on (e.service_id=s.svc_id) + JOIN r on (r.param_value=p.instance_uid::text) + WHERE r.i < 10 + ) + select param, param_value from r + order by r.i desc + + + + + + + + + + + + + + + + + + + + + + + + + + + + select p.param_value + from instance_operation_cfs_param p + join svc_operation_cfs_param s on (p.svc_operation_cfs_param_id = s.svc_operation_cfs_param_id) + where p.instance_operation_uid = + AND s.svc_operation_cfs_param = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select g.instance_state_uid, g.version, g.dt_state, g.instance_data, g.is_test, g.instance_uid + from instance_state g + where g.instance_uid= + order by g.version desc + limit 1 + + + + + + + + + + + + + + + + + + + + select r.resource_realm_id, r.properties + from resource_realm r + where r.resource_realm= + + + + + + + + + + + + + + + + + + + + + + + @@ -105,7 +461,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In - + @@ -487,6 +843,18 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In + + + + + + + + + + + + \ No newline at end of file diff --git a/v1/resources/instance_operation_default.cfc b/v1/resources/instance_operation_default.cfc index 3feb10c..4e275d0 100644 --- a/v1/resources/instance_operation_default.cfc +++ b/v1/resources/instance_operation_default.cfc @@ -95,6 +95,8 @@ p.config::text null as nested_ref_data p.state_path + p.depends_on_params + p.expression ( select 1 from svc_operation_cfs_param m join svc_operation om on (m.svc_operation_id=om.svc_operation_id) diff --git a/v1/resources/param_value_list.cfc b/v1/resources/param_value_list.cfc index a492e87..e41b10f 100644 --- a/v1/resources/param_value_list.cfc +++ b/v1/resources/param_value_list.cfc @@ -1,4 +1,4 @@ - + diff --git a/v1/resources/svc_operation_cfs_param_compute.cfc b/v1/resources/svc_operation_cfs_param_compute.cfc new file mode 100644 index 0000000..1700247 --- /dev/null +++ b/v1/resources/svc_operation_cfs_param_compute.cfc @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + + sop.data_type + sop.svc_operation_cfs_param + sop.expression + + from svc_operation_cfs_param sop + where sop.svc_operation_cfs_param_id + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +