我们能否使用SQL查询中的值并将其用作对角动作序列或xactions中的javascript变量

我只是想知道我们是否可以存储来自SQL查找规则的结果值,并在脚本下的组件定义中使用它。

示例代码:

  <action-definition>
  <component-name>SQLLookupRule</component-name>
  <action-type>Relational</action-type>
  <action-outputs>
    <query-result type="result-set" mapping="timestamp_fibu_export"/>
  </action-outputs>
  <component-definition>
    <jndi><![CDATA[Poly_MIS_ETL_LAST_TIMESTAMP]]></jndi>
    <query><![CDATA[select extract( month from  prev_timestamp_fibu_export)::int as prev_timestamp_fibu_export  from system_settings]]></query>
    <live><![CDATA[true]]></live>
  </component-definition>
</action-definition>

<action-definition> 
  <component-name>JavascriptRule</component-name>
  <action-type>Do process a report for previous month?</action-type>
  <action-outputs> 
    <process_report_also_for_previous_month type="integer"/> 
  </action-outputs>
  <component-definition> 
    <!--<script><![CDATA[// returns "true" if a current day is the first Monday in a month

var d = new Date();
((d.getDay() == 1) && ((d.getDate() == 2) || (d.getDate() == 3)))]]></script> -->

<script><![CDATA[// returns "true" if a current day is the first Monday in a month

var d = new Date();
((d.getDay() == 1) || (d.getMonth()+1 - timestamp_fibu_export == 1)]]></script>

  </component-definition> 
</action-definition>
jiangshui126 回答:我们能否使用SQL查询中的值并将其用作对角动作序列或xactions中的javascript变量

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3097280.html

大家都在问