Hello, thanks for quick reply, but it didn't helped me.
My query modified according to your advice:
<sql:query var="projects">
<![CDATA[select code, 'PSR', name
from inv_investments inv
left join odf_ca_inv oin on oin.id=inv.id
left join odf_ca_project oip on oip.id=inv.id
where inv.odf_object_code='project'
and oin.i_inv_categ='project'
and oip.last_status_rep_date is not null
and oip.partition_code = 'STANDARD'
and stage_code in ('DDRE','FS')
and ((to_date(sysdate)-to_date(oip.last_status_rep_date))
-FLOOR ((to_date(sysdate)-to_date(oip.last_status_rep_date))/7)*2
-(SELECT Count(ID) FROM odf_ca_i_svatky WHERE i_datum BETWEEN oip.last_status_rep_date AND sysdate)
-DECODE(SIGN(TO_CHAR(sysdate,'D')- TO_CHAR(oip.last_status_rep_date,'D')),-1,2,0)
+(CASE WHEN to_char(oip.last_status_rep_date,'D')=7 then 1 else 0 End)
-(CASE WHEN to_char(sysdate,'D')=7 then 1 else 0 End)) <= 3]]>
</sql:query>
I get this error in bg-niku.log
Using input:
{process_instance_id=5104016, step_condition_id=-1, process_version_id=-1, step_instance_id=5195034, step_action_result_id=5147021, step_action_id=5031095, step_id=-1, attribute1=null, attribute2=null, message_code=bpm.CUSTOM_SCRIPT_EXECUTION_ERROR, exception_trace2=org.apache.commons.jelly.JellyTagException: null:19:31: <sql:query> select code, 'PSR', name
from inv_investments inv
left join odf_ca_inv oin on oin.id=inv.id
left join odf_ca_project oip on oip.id=inv.id
where inv.odf_object_code='project'
and oin.i_inv_categ='project'
and oip.last_status_rep_date is not null
and oip.partition_code = 'STANDARD'
and stage_code in ('DDRE','FS')
and ((to_date(sysdate)-to_date(oip.last_status_rep_date))
-FLOOR ((to_date(sysdate)-to_date(oip.last_status_rep_date))/7)*2
-(SELECT Count(ID) FROM odf_ca_i_svatky WHERE i_datum BETWEEN oip.last_status_rep_date AND sysdate)
-DECODE(SIGN(TO_CHAR(sysdate,'D')- TO_CHAR(oip.last_status_rep_date,'D')),-1,2,0)
+(CASE WHEN to_char(oip.last_status_rep_date,'D')=7 then 1 else 0 End)
-(CASE WHEN to_char(sysdate,'D')=7 then 1 else 0 End)) <= 3: [CA Clarity][Oracle JDBC Driver][Oracle]ORA-00920