inputContext.isRestarted

Property Description

Indicates whether the current invocation of the getInputData(inputContext) function is the first.

Typically, the getInput function is invoked one time only. However, if the function is interrupted by an application server restart, the system restarts the getInputData function.

If the value of this property is true, the getInputData(inputContext) has been restarted.

You can use this property to help make your script more robust.

Type

boolean (read-only)

Since

2016.1

Syntax

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see Map/Reduce Script Samples.

          ...
function getInputData(context) 
{
  if (context.isRestarted)
  {
    log.debug('GET_INPUT isRestarted', 'YES');
  }
  else
  {
    log.debug('GET_INPUT isRestarted', 'NO');
  }

  var extractSearch = search.load({ id: 'customsearch35' });
  return extractSearch;
}
... 

        

Related Topics

inputContext
inputContext.ObjectRef

General Notices