Hi apuiro,
I defined error_message attribute(Text) and sun_status attribute (Text) in project object.
I created sample process as below. It may not match your requirement.
<sample process description>
If Project Status="Unapproved", it will invoke automatically when project is updated.
- If sub_status="CLOSE", then set_message step will be invoked and set "Cannot closed Complete a Unapproved
project" message to error_message attribute.
- If sub_status!="CLOSE", then set_clear step will be invoked and set "No Warning" message to error_message attribute.
-------- set_message step invokes below custom gel script ------
<gel:script
xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:sql="jelly:sql"
xmlns:util="jelly:util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gel:setDataSource dbId="niku"/>
<sql:update var="v_result">
update ODF_CA_PROJECT
set ERROR_MESSAGE = 'Cannot closed Complete a Unapproved project'
where ID = ${gel_objectInstanceId}
</sql:update>
</gel:script>
-------- set_clear step invokes below custom gel script ------
<gel:script
xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:sql="jelly:sql"
xmlns:util="jelly:util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<gel:setDataSource dbId="niku"/>
<sql:update var="v_result">
update ODF_CA_PROJECT
set ERROR_MESSAGE = 'No Warning'
where ID = ${gel_objectInstanceId}
</sql:update>
</gel:script>
For example, there is project which Status=Unapproved and sub_status=null. The error_message="No Warning" as default.
When I set "CLOSE" into sub_status field and click Save button. The sample process is invoked and it updated error_message column in database directly.
But project properties page still showed "No Warning". Because page is not refreshed automatically.
After F5 click, page shows below. error_message field is updated.
I hope it is helpful for your investigation.
Regards,
Shoichi