cancel
Showing results for 
Search instead for 
Did you mean: 

How to check whether a clause is active for a particular time period

Former Member
0 Kudos

Hi All,

I need to check all clauses and see if any clause is active for one year.

I tried implementing a script as follows,

Scripting Context: Collection Validation

External ID:section_active_period

Application Context: xxx

Display Name:section_active_period

Description:

Script Version:

Class: Section(1803)

Instance Type: Any

Document Type: Any

Target: CLAUSES

Script:

import com.frictionless.api.contractgen.SectionIBeanIfc;

clauseList = doc.getClauseColln();

throw doc.createApplicationException(" ", "clause list is "+clauseList);

-


But its not returning anything.

How to test this script?

Please guide me to implement this functionality.

Thanks,

Saloni

Edited by: Saloni on Dec 20, 2011 2:14 PM

Edited by: Saloni on Dec 20, 2011 2:32 PM

Edited by: Saloni on Dec 20, 2011 2:41 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Can you explain what you mean by Active Clause? In E-Sourcing terms all clauses which are in Approved phase are the ones available for selection by the end user.

There are 3 OOB queries under clauses which can pull up those which are Approved or not.

Separately in Analysis section there is a report called Search all contract documents using a specific clause which can tell us which clauses have been used or not by the user.

Thanks,

Vikram

Former Member
0 Kudos

Hi Vikram,

Yes, active clause mean one that is in approved state. Can we get the list of approved clauses, and the date on which the clause was approved?

I need to check if current date has reached one year of approval date of clause.

Please suggest.

Thanks,

Saloni

Former Member
0 Kudos

I see.

Well, the phase changed date is not something that is captured on the UI. Meaning, there is no way to tell in the Change history section also as to when the clause was moved from any of the Draft or Review phases to Approved.

In the All clauses query, you should create a Duplicate and then in the result field add the phase change date by looking for that field in the database. I feel that would be a better approach rather than doing this via Scripting.

Hope this helps.

Vikram Shukla

Former Member
0 Kudos

Hi,

I need to schedule task/ cron job that runs everyday to check whether any clause has reached one year of approval and send notification based on that.

Can this be achieved by scripting?

If setup-->schedule task is required, plz guide me through steps involved in implementing it.

Thanks,

Saloni

Former Member
0 Kudos

I dont know if that is doable.

What can happen is if you create a duplicate version of the query that I mentioned in the previous post, then that query results can be sent in PDF or excel format based on a schedule task.

You can have a column called "Last Approved Date" and user can then determine if action needs to be taken on that clause since it is more than 1 year old.

Vikram

Former Member
0 Kudos

Hi Vikram,

Thanks for your inputs. Can you please guide me through steps involved in implementing this functionality? I havent worked on Schedule Task feature before.

Thanks,

Saloni

Former Member
0 Kudos

Hi,

I am assuming that you can create a Duplicate of the query (Step 1) and the Scheduled task creation is a follow on step after query duplicate activity is complete.

Then goto Setup --> Scheduled task and do the following:

Task Type:Report Execution Task

Display Name:"Key in whatever you like*

Description:Key in whatever you like

Run As User:Preferbale to use an Admin type user's name here

Frequency: You can say every month

Start Date:Choose the start date when ou want the task to initiate

Then goto the Advanced Configuration Properties section and in the Report field choose the report created in step 1.

In the Query Server Event Action: you can choose excel or PDF or an Alert or CSV.

In the Mail Recipients section, you can specify who all should receive an email.

Hope this helps,

Vikram

Former Member
0 Kudos

Hi Vikram,

Thanks for your help. I was able to generate report and receive mail based on schedule task. Here, the excel sheet was generated with all approved clauses and last changed date.

Is there any way that report is sent only if any clause has reached one year of approval?

I suppose, we can define new query in query definition that retrieves clauses that have crossed one year of approval. But what if there is no clause found with this condition, in that case there will be empty report. How can we make schedule task to send report only if there is any data in report? Also, the report sent for a particular clause should not be sent again the next day when schedule task runs.

Please guide me through this.

Thanks,

Saloni

Former Member
0 Kudos

Hi,

Unfortunately there is no easy way of doing this. The schedule task has no way of knowing if a particular clause was available in the previous day's report.

Others are welcome to pitch in with their ideas.

Vikram

Former Member
0 Kudos

Hi Vikram,

Is it possible to modify the mail notification content? Right now it just mentions that report is executed and attach the report in mail. What if, we want mail message to be more descriptive. Also, can the mail recepients be dynamic based on field values(created by) in report?

Please guide.

Thanks,

Saloni