Files
svc-api-x/v1/resources/instance_operation_cfs_param_ls.cfc

440 lines
24 KiB
Plaintext

<cfcomponent extends="taffy.core.resource" taffy:uri="/instanceOperationCfsParams">
<cfsilent>
<cfimport prefix="m" taglib="../lib"/>
<cfset this.helper=CreateObject("component","lib.rest_api_helper")/>
</cfsilent>
<!---спецификация полей, пригодных для фильтрации --->
<cfset this.fieldsSpec={
dt_created={prefix="iop", type="date"},
svc_operation_cfs_param={prefix="sop", type="string"},
login={prefix="iop", type="string"},
creator_id={prefix="iop", type="integer"},
sort={prefix="sop", type="integer"},
is_sensitive={prefix="sop", type="boolean"},
depends_on_cfs_params={prefix="sop", type="string"}
}
/>
<cffunction name="get" hint="Список CFS параметров">
<cfargument name="pageSize" type="string" hint="type:integer" default="1000"/> <!--- *** тут на самом деле есть лимит --->
<cfargument name="page" type="string" hint="type:integer" default="1"/>
<cfargument name="orderBy" type="string" hint="type:string, description:comma-separated list of fields to sort by, example:fld1.ASC,fld2.DESC,fld3.ASC" default=""/>
<cfargument name="instanceOperationUid" type="string" required=false hint="type:guid"/>
<cftry>
<cfif !this.helper.keyExistsAndValid(arguments,"instanceOperationUid","guid")>
<cfthrow type="invalidParamValue" message="Missing required parameter" detail="instanceOperationUid is missing or not a valid GUID"/>
</cfif>
<cfset this.helper.validateField(arguments, "pageSize", "integer")/>
<cfset this.helper.validateField(arguments, "page", "integer")/>
<!---мы мирно игнорируем поля, отсутствующие в спецификации, что позволяет не делать исключения для orderBy и т.п.--->
<cfset var filter=this.helper.parseFilterParams(this.fieldsSpec)/>
<cfcatch type="invalidParamValue">
<cfreturn representationOf(this.helper.formatBadRequestError(cfcatch)).withStatus(400)/>
</cfcatch>
</cftry>
<cfset var out={}/>
<cfset var maxrows=arguments.pageSize*arguments.page/>
<cfset var startrow=arguments.pageSize*(arguments.page-1)+1/>
<cfset var local={}/>
<cfquery name="local.qCfsParam" result="local.result">
select
<m:field_set titleMapOut="local.titleMap" lengthOut="fieldCount">
<m:field title="instance_operation_cfs_param_uid">iop.instance_operation_cfs_param_uid::text as instance_operation_cfs_param_uid</m:field>
<m:field title="instance_operation_uid">iop.instance_operation_uid::text as instance_operation_uid</m:field>
<m:field title="svc_operation_cfs_param_id">iop.svc_operation_cfs_param_id</m:field>
<m:field title="param_value">case when sop.is_sensitive then '********' else iop.param_value end as param_value </m:field>
<m:field>iop.note</m:field>
<m:field>to_char(iop.dt_created, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_created</m:field>
<m:field>iop.creator_id</m:field>
<m:field>u.login as creator_login</m:field>
<m:field>u.shortname as creator_shortname</m:field>
<m:field>sop.svc_operation_cfs_param</m:field>
<m:field>sop.sort</m:field>
<m:field formatter=#request.castToBool#>sop.is_sensitive</m:field>
<m:field formatter=#request.castToBool#>sop.is_required</m:field>
<m:field formatter=#request.castToBool#>sop.is_hidden</m:field>
<m:field formatter=#request.castToBool#>sop.is_disabled</m:field>
<m:field>sop.data_type</m:field>
<m:field formatter=#(x)=>((isArray(x) OR isEmpty(x))? x : listToArray(x))#>sop.value_list</m:field>
<m:field>sop.default_value</m:field>
<m:field>sop.func</m:field>
<m:field>p.state_path</m:field>
<m:field>p.nested_ref</m:field>
<m:field>p.expression</m:field>
<m:field>sop.depends_on_cfs_params</m:field>
<m:field>sop.man</m:field>
<m:field>null as data_descriptor</m:field>
<m:field>e.service_id</m:field>
</m:field_set>
from instance_operation_cfs_param iop
join instance_operation io on (iop.instance_operation_uid=io.instance_operation_uid)
join instance e on (io.instance_uid=e.instance_uid)
join specification_item si on (e.specification_item_id=si.specification_item_id)
join svc_operation_cfs_param sop on (iop.svc_operation_cfs_param_id=sop.svc_operation_cfs_param_id)
left outer join usr u on (iop.creator_id=u.usr_id)
where iop.instance_operation_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#" null=#!isValid('guid',arguments.instanceOperationUid)#/>
AND si.specification_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.specificationId#/>
<m:filter_build filter=#filter#/>
order by <m:order_build sortCollection=#this.helper.parseNumericOrder(local.titleMap, arguments.orderBy)# fieldCount=0/><!---no sort length limit--->
--limit #maxrows#
</cfquery>
<cfquery name="local.qTotal">
select count(*) as cnt
from instance_operation_cfs_param iop
where iop.instance_operation_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#" null=#!isValid('guid',arguments.instanceOperationUid)#/>
</cfquery>
<cfloop query="local.qCfsParam">
<cfif len(func)><!--- приоритет отдается функции перед списком значений--->
<cfset var args = {
"functionName":"#func#",
"svcId":#local.qCfsParam.service_id#,
"contractId":#arguments.contractId#
}/>
<cfinvoke component="instance_operation_cfs_param" method="generateValueList" argumentCollection=#args# returnVariable="local.qCfsParam.value_list"/>
<cfif (len(local.qCfsParam.func) OR len(local.qCfsParam.expression) OR len(local.qCfsParam.state_path) OR len(local.qCfsParam.nested_ref))
AND len(local.qCfsParam.value_list) EQ 0>
<cfset local.qCfsParam.value_list = []/>
</cfif>
<cfif len(trim(local.qCfsParam.value_list)) AND listLen(local.qCfsParam.value_list) EQ 1>
<cfset local.qCfsParam.default_value=local.qCfsParam.value_list/>
</cfif>
</cfif>
<cfif data_type EQ "map" OR data_type EQ "map-fixed" OR data_type EQ "array-map-fixed">
<cfinvoke component="instance_operation_cfs_param" method="processMap" qParam=#local.qCfsParam#/>
</cfif>
</cfloop>
<cfset "out.queryDurationMs"=getTickCount() - request.startTickCount/>
<cfset "out.total"=#local.qTotal.cnt#/>
<cfset "out.resultSetSize"=#local.qCfsParam.recordCount#/>
<cfset "out.pageSize"=#arguments.pageSize*1#/>
<cfset "out.page"=#arguments.page*1#/>
<cfset "out.orderBy"=#arguments.orderBy#/>
<cfset var resultCollection=[]/>
<cfloop query=#local.qCfsParam# startRow=#startrow# endRow=#(startrow+maxrows-1)#>
<cfset var rec={}/>
<cfset this.helper.appendRecord(rec, "", local.titleMap, local.qCfsParam, this.helper.snake2camel)/>
<cfset arrayAppend(resultCollection, rec)/>
</cfloop>
<cfset "out.size"=#arrayLen(resultCollection)#/>
<cfset "out.results"=#resultCollection#/>
<cfset "out.runDurationMs"=getTickCount()-request.startTickCount/>
<cfreturn representationOf(out)/>
</cffunction><!--- get --->
<cffunction name="post" hint="Создание нового CFS параметра операции.">
<cfargument name="instanceOperationUid" type="string" required=true hint="type:guid"/>
<cfargument name="svcOperationCfsParamId" type="string" required=true hint="type:integer"/>
<cfargument name="paramValue" type="string" required=true hint="type:string ***Валидацию пока не проводим, а надо"/>
<cfargument name="note" type="string" required=false default="" hint="type:string description: комментарий пользователя"/>
<cftry>
<cfset this.helper.validateField(arguments, "instanceOperationUid", "guid")/>
<cfset this.helper.validateField(arguments, "svcOperationCfsParamId", "integer")/>
<cfset checkParam(arguments.svcOperationCfsParamId, arguments.paramValue, arguments.usrId)/>
<cfset checkResourceRealmAccess(arguments.instanceOperationUid, arguments.svcOperationCfsParamId, arguments.paramValue)/>
<cfcatch type="invalidParamValue">
<cfreturn representationOf(this.helper.formatBadRequestError(cfcatch)).withStatus(400)/>
</cfcatch>
</cftry>
<cfset var local={}/>
<cfset local.instanceOperationCfsParamUid=#createGUID()#/>
<cftry>
<cfquery name="local.qCheck" result="local.result">
select io.dt_submit, io.dt_finish, io.submit_result
from instance_operation io
where io.instance_operation_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#" null=#!isValid('guid',arguments.instanceOperationUid)#/>
</cfquery>
<cfif left(local.qCheck.submit_result,1) EQ "2" AND len(local.qCheck.dt_finish) EQ 0><!--- 201 etc --->
<cfreturn representationOf(this.helper.formatMessage("Operation already started", "Parameter creation disabled for started operation")).withStatus(422)/>
</cfif>
<!--- Проверка: параметр от нашего ли сервиса *** и операции --->
<cfquery name="local.qInstanceService" result="local.result">
select e.service_id, io.operation, si.specification_id
from instance_operation io
join instance e on (io.instance_uid=e.instance_uid)
left outer join specification_item si on (e.specification_item_id=si.specification_item_id)
where io.instance_operation_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#"/>
</cfquery>
<cfquery name="local.qTemplateSvc" result="local.result">
select so.svc_id, so.operation, sop.is_disabled
from svc_operation_cfs_param sop
join svc_operation so on (sop.svc_operation_id=so.svc_operation_id)
where sop.svc_operation_cfs_param_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.svcOperationCfsParamId#"/>
</cfquery>
<cfif local.qInstanceService.specification_id NEQ arguments.specificationId>
<cfreturn representationOf(this.helper.formatMessage("Instance not accessible", "Instance does not belong to the current specification, contract or contragent")).withStatus(403)/>
</cfif>
<cfif local.qInstanceService.service_id NEQ local.qTemplateSvc.svc_id>
<cfreturn representationOf(this.helper.formatMessage("Invalid CFS parameter", "Parameter specified does not belong to this service")).withStatus(400)/>
</cfif>
<cfif local.qInstanceService.operation NEQ local.qTemplateSvc.operation>
<cfreturn representationOf(this.helper.formatMessage("Invalid CFS parameter", "Parameter specified does not belong to this operation")).withStatus(400)/>
</cfif>
<cfquery name="local.qSave">
insert into instance_operation_cfs_param (
instance_operation_cfs_param_uid,instance_operation_uid,svc_operation_cfs_param_id,param_value,note,dt_created,creator_id
) values (
<cfqueryparam cfsqltype="cf_sql_other" value="#local.instanceOperationCfsParamUid#"/>
,<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#"/>
,<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.svcOperationCfsParamId#"/>
,<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.paramValue#"/><!--- htmlEditFormat --->
,<cfqueryparam cfsqltype="cf_sql_varchar" value="#htmlEditFormat(arguments.note)#"/>
,<cfqueryparam cfsqltype="cf_sql_timestamp" value="#Now()#" />
,<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.usrId#" />
);
</cfquery>
<cfcatch type="any">
<cfreturn representationOf(this.helper.formatException(cfcatch, "Internal Error")).withStatus(500)/>
</cfcatch>
</cftry>
<cfreturn noData()
.withHeaders({location: "./#local.instanceOperationCfsParamUid#"})
.withStatus(201, "Created")
/>
</cffunction><!--- post --->
<cffunction name="checkParam" returnType="void">
<!--- проверка параметров по метаданным, независимо от семантики самого параметра --->
<cfargument name="svcOperationCfsParamId" type="numeric" required = true/>
<cfargument name="paramValue" required = true/>
<cfargument name="usrId" type="numeric"/>
<cfargument name="instanceOperationCfsParamUid" type="guid" default="00000000-0000-0000-0000-000000000000"/><!--- используется при проверке уникальности, чтобы не сравнивать с собой --->
<!--- *** Вероятно, стоит возвращать конкретную ругань --->
<!--- принадлежит ли параметр данному сервису, проверяется выше --->
<!--- получаем метаданные параметра --->
<cfset var local={}/>
<cfquery name="local.qSvcOperationCfsParam">
select sop.svc_operation_cfs_param_id
,sop.svc_operation_cfs_param
,sop.value_list
,sop.data_type
,sop.is_required
,sop.maxlength
,sop.minlength
,sop.regex
,sop.unique_scope
,sop.maxvalue
,sop.minvalue
from svc_operation_cfs_param sop
where sop.svc_operation_cfs_param_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.svcOperationCfsParamId#"/>
</cfquery>
<cfif local.qSvcOperationCfsParam.is_required GT 0 AND len(arguments.paramValue) EQ 0>
<cfthrow type="invalidParamValue" message="Missing required parameter (#local.qSvcOperationCfsParam.svc_operation_cfs_param#)"/>
<cfelseif len(arguments.paramValue) AND NOT validateDataType(arguments.paramValue,local.qSvcOperationCfsParam.data_type)>
<cfthrow type="invalidParamValue" message="Invalid format #local.qSvcOperationCfsParam.data_type# #local.qSvcOperationCfsParam.svc_operation_cfs_param#"/>
</cfif>
<cfif len(arguments.paramValue) AND listLen(local.qSvcOperationCfsParam.value_list) GT 0 AND NOT listFind(local.qSvcOperationCfsParam.value_list, arguments.paramValue)>
<cfthrow type="invalidParamValue" message="Значение параметра #local.qSvcOperationCfsParam.svc_operation_cfs_param# отсутствует в списке '#local.qSvcOperationCfsParam.value_list#'" detail="listLen:#listLen(local.qSvcOperationCfsParam.value_list)#"/>
</cfif>
<cfif len(arguments.paramValue) AND local.qSvcOperationCfsParam.maxlength GT 0 AND len(arguments.paramValue) GT local.qSvcOperationCfsParam.maxlength>
<cfthrow type="invalidParamValue" message="Длина #local.qSvcOperationCfsParam.svc_operation_cfs_param# превышает #local.qSvcOperationCfsParam.maxlength#"/>
</cfif>
<cfif len(arguments.paramValue) AND local.qSvcOperationCfsParam.minlength GT 0 AND len(arguments.paramValue) LT local.qSvcOperationCfsParam.minlength>
<cfthrow type="invalidParamValue" message="Длина #local.qSvcOperationCfsParam.svc_operation_cfs_param# меньше #local.qSvcOperationCfsParam.minlength#"/>
</cfif>
<cfif len(arguments.paramValue) AND len(local.qSvcOperationCfsParam.regex) AND reFind(local.qSvcOperationCfsParam.regex,arguments.paramValue) EQ 0>
<cfthrow type="invalidParamValue" message='Parameter "#local.qSvcOperationCfsParam.svc_operation_cfs_param#" value "#arguments.paramValue#" does not match pattern "#local.qSvcOperationCfsParam.regex#" '/>
</cfif>
<cfif isNumeric(arguments.paramValue) AND isNumeric(local.qSvcOperationCfsParam.maxvalue) AND arguments.paramValue GT local.qSvcOperationCfsParam.maxvalue>
<cfthrow type="invalidParamValue" message='Parameter "#local.qSvcOperationCfsParam.svc_operation_cfs_param#" value "#arguments.paramValue#" is greater than "#local.qSvcOperationCfsParam.maxvalue#" '/>
</cfif>
<cfif isNumeric(arguments.paramValue) AND isNumeric(local.qSvcOperationCfsParam.minvalue) AND arguments.paramValue LT local.qSvcOperationCfsParam.minvalue>
<cfthrow type="invalidParamValue" message='Parameter "#local.qSvcOperationCfsParam.svc_operation_cfs_param#" value "#arguments.paramValue#" is less than "#local.qSvcOperationCfsParam.minvalue#" '/>
</cfif>
<cfset checkUniqueness(
arguments.svcOperationCfsParamId,
qSvcOperationCfsParam.svc_operation_cfs_param,
arguments.paramValue,
qSvcOperationCfsParam.unique_scope,
arguments.instanceOperationCfsParamUid,
arguments.usrId
)/>
</cffunction>
<cffunction name="checkUniqueness" returnType="void">
<!--- использую void, потому что с исключением проще передавать информацию о конкретном характере ошибки. Чем возвращать объект ошибки - проше бросить исключение --->
<cfargument name="svcOperationCfsParamId" type="numeric"/>
<cfargument name="svcOperationCfsParamName" type="string"/><!--- нужен только для формирования текста сообщения об ошибке --->
<cfargument name="paramValue" type="string"/>
<cfargument name="scope" type="string"/>
<cfargument name="instanceOperationCfsParamUid" type="guid"/>
<cfargument name="usrId" type="numeric"/>
<cfset var local={}/>
<cfswitch expression=#arguments.scope#>
<cfcase value="provider">
<cfquery name="local.qUnique">
select count(*) as cnt
from instance_operation_cfs_param p
join instance_operation o on (p.instance_operation_uid=o.instance_operation_uid)
join instance e on (o.instance_uid=e.instance_uid)
where p.param_value=<cfqueryparam cfsqltype="cf_sql_varchar" value=#arguments.paramValue#/>
AND p.svc_operation_cfs_param_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.svcOperationCfsParamId#/>/*limit to the current svc param*/
<cfif arguments.instanceOperationCfsParamUid NEQ "00000000-0000-0000-0000-000000000000">
AND p.instance_operation_cfs_param_uid <> <cfqueryparam cfsqltype="cf_sql_other" value=#arguments.instanceOperationCfsParamUid#/>/*exclude itself*/
</cfif>
AND (select cast(st.instance_data->>'isDeleted' as boolean) from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) IS NOT TRUE /*ignore deleted instances*/
</cfquery>
<cfif local.qUnique.cnt GT 0>
<cfthrow type="invalidParamValue" message='#arguments.svcOperationCfsParamName# = "#arguments.paramValue#" is not unique in the provider scope'/>
</cfif>
</cfcase>
<cfcase value="tenant">
<cfquery name="local.qUnique">
select count(*) as cnt
from instance_operation_cfs_param p
join instance_operation o on (p.instance_operation_uid=o.instance_operation_uid)
join instance e on (o.instance_uid=e.instance_uid)
join specification_item i on (e.specification_item_id=i.specification_item_id)
join specification s on (i.specification_id=s.specification_id)
join contract d on (s.contract_id=d.contract_id)
join contragent k on (d.contragent_id=k.contragent_id)
join usr u on (k.contragent_id=u.contragent_id)
where p.param_value=<cfqueryparam cfsqltype="cf_sql_varchar" value=#arguments.paramValue#/>
AND svc_operation_cfs_param_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.svcOperationCfsParamId#/>/*limit to the current svc param*/
AND u.usr_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#arguments.usrId#/>/*limit to the contragent of current user*/
<cfif arguments.instanceOperationCfsParamUid NEQ "00000000-0000-0000-0000-000000000000">
AND p.instance_operation_cfs_param_uid <> <cfqueryparam cfsqltype="cf_sql_other" value=#arguments.instanceOperationCfsParamUid#/>/*exclude itself*/
</cfif>
AND (select cast(st.instance_data->>'isDeleted' as boolean) from instance_state st where st.instance_uid=e.instance_uid order by version desc limit 1) IS NOT TRUE /*ignore deleted instances*/
</cfquery>
<cfif local.qUnique.cnt GT 0>
<cfthrow type="invalidParamValue" message='#arguments.svcOperationCfsParamName# = "#arguments.paramValue#" is not unique in the tenant scope'/>
</cfif>
</cfcase>
<cfdefaultcase></cfdefaultcase>
</cfswitch>
</cffunction>
<cffunction name="validateDataType" returnType="boolean">
<cfargument name="value" type="string"/>
<cfargument name="dataType" type="string"/>
<cfswitch expression=#arguments.dataType#>
<cfcase value=",string">
<cfreturn true/>
</cfcase>
<cfcase value="boolean">
<cfreturn IsBoolean(arguments.value)/><!--- можно было сделать и единообразно --->
</cfcase>
<cfcase value="integer">
<cfreturn isValid("integer",arguments.value)/>
</cfcase>
<cfcase value="integer &gt; 0">
<cfreturn isValid("integer",arguments.value) AND arguments.value GT 0/>
</cfcase>
<cfcase value="integer &gt;= 0">
<cfreturn isValid("integer",arguments.value) AND arguments.value GE 0/>
</cfcase>
<cfcase value="numeric">
<cfreturn isNumeric(arguments.value)/>
</cfcase>
<cfcase value="uuid">
<cfreturn isValid("guid",arguments.value)/><!--- *** или GUID? Или принимать оба формата GUID UUID и приводить к одному? А как быть с БД--->
</cfcase>
<cfcase value="map,map-fixed">
<cftry>
<cfset var v = deserializeJson(arguments.value)/>
<cfreturn isStruct(v)/><!--- массив нас не устроит --->
<cfcatch type="ANY">
<cfreturn false/>
</cfcatch>
</cftry>
</cfcase>
<cfcase value="array-map-fixed">
<cftry>
<cfset var v = deserializeJson(arguments.value)/>
<cfreturn isArray(v)/>
<cfcatch type="ANY">
<cfreturn false/>
</cfcatch>
</cftry>
</cfcase>
<cfdefaultcase><cfreturn true/>
<cfthrow type="custom" detail="unsupported CFS parameter value type (#arguments.dataType#)"/>
</cfdefaultcase>
</cfswitch>
</cffunction>
<cffunction name="checkResourceRealmAccess" returnType="void">
<!---*** В отличие от других методов, этому небезразлично имя параметра --->
<cfargument name="instanceOperationUid" type="guid"/>
<cfargument name="svcOperationCfsParamId" type="numeric"/>
<cfargument name="paramValue" type="string"/>
<cfset var local={}/>
<cfquery name="local.qSvcOperationCfsParam">
select sop.svc_operation_cfs_param_id
,sop.svc_operation_cfs_param
from svc_operation_cfs_param sop
where sop.svc_operation_cfs_param_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.svcOperationCfsParamId#"/>
</cfquery>
<cfif lcase(trim(local.qSvcOperationCfsParam.svc_operation_cfs_param)) NEQ lcase("resourceRealm")>
<cfreturn/>
</cfif>
<cfquery name="local.qContract">
select c.contract_id
from instance_operation io
join instance e on (io.instance_uid=e.instance_uid)
join specification_item si on (e.specification_item_id=si.specification_item_id)
join specification s on (si.specification_id=s.specification_id)
join contract c on (s.contract_id=c.contract_id)
where io.instance_operation_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#" null=#!isValid("guid",arguments.instanceOperationUid)#/>
</cfquery>
<cfquery name="local.qCheckResourceRealmAccess">
select r.resource_realm_id, r.resource_realm, a.contract_id, a.is_enabled
from resource_realm r
join resource_realm_access a on (r.resource_realm_id=a.resource_realm_id)
where r.resource_realm = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.paramValue#"/>
AND (a.contract_id=<cfqueryparam cfsqltype="cf_sql_integer" value=#local.qContract.contract_id# null=#!isValid("integer",local.qContract.contract_id)#/> OR a.contract_id=0)
AND a.is_enabled
</cfquery>
<cfif local.qCheckResourceRealmAccess.recordCount EQ 0>
<cfthrow message="Resource realm specified in CFS param is not available for the current contract" detail="CFS resource realm #arguments.paramValue# unawailable. Instance operation UID #arguments.instanceOperationUid#. Contract ID #local.qContract.contract_id#"/>
</cfif>
</cffunction>
</cfcomponent>