My Oracle Support Banner

Create Scheduled Custom Process To Kick Off Groovy/Function (Doc ID 2523344.1)

Last updated on DECEMBER 22, 2020

Applies to:

Oracle Fusion Sales Cloud Service - Version 11.13.18.10.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.13.18.10.0 version, Opportunities

When attempting to create a function that triggered by a scheduled process, which in turn is supposed to update Opportunity status (DealStatus_c) based on conditions as shown in the groovy code
the following error occurs.

ERROR
-----------------------
The process 762955 is showing status Error


STEPS
-----------------------
The issue can be reproduced at will with the following steps:

1. The schedule process Schedule Custom Groovy Object functions - Error is invoked to run an object function.

2. The function defined is as follows:

def date_diff = 0
def vo1 = newView('OpportunityVO')
vo1.appendViewCriteria("MaximumStageStatus_c = 1000")
vo1 .executeQuery()
while(vo1.hasNext()) {
  def row = vo1.next()
  date_diff = today() - row.OpportunityStatusDate_c
  if(date_diff > 300) {
  row.setAttribute('DealStatus_c','INACTIVE')
  }
}

3. The object function above is created to update the status based on certain condition

4. The Scheduled process is showing the output 'Error' without any further details


Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.