ApprovalEventHandler Class Methods

The ApprovalEventHandler class is used to perform actions that are required at the specific points in the process. For instance, if a new Employee has been approved, then the required action would be to activate that user. The purpose of this class is to move the check for specific statuses or actions from the Component to Approval Framework. This sections lists the ApprovalEventHandler class methods.

Syntax

ApprovalEventHandler()

Description

This method is the constructor for the ApprovalEventHandler class. Its only purpose is to create an object that can be used to access the other methods.

Syntax

OnProcessLaunch(&appInst)

Description

This method is called with the newly-launched approval process instance, after the launch operation is successful.

Parameters

Parameter

Description

&appInst

As EOAW_CORE:ENGINE:AppInst.

Returns

None.

Example

method OnProcessLaunch

   /+ &appInst as EOAW_CORE:ENGINE:AppInst +/

   /+ Extends/implements EOAW_CORE:ApprovalEventHandler.OnProcessLaunch +/

   &appInst.thread.SetAppKeys(&vndrRecord);

   %This.updateProcessFlag(&PENDING);

end-method;

Syntax

OnStepActivate(&stepinst)

Description

Use this method when a step instance is activated, the approvers and reviewers associated with the step will receive a worklist entry, if they do not already have one). The activated step instance itself is passed in as the argument.

Parameters

Parameter

Description

&stepinst

The activated step instance, as EOAW_CORE:ENGINE:StepInst.

Returns

None.

Syntax

OnStepHold(&userinst)

Description

Use this method to put this step on hold when a user performs an action. On Hold means that the user plans to take action at a later time.

Parameters

Parameter

Description

&userinst

As EOAW_CORE:ENGINE:UserStepInst.

Returns

None.

Syntax

OnStepReassign(&userinst, &origApprover)

Description

Use this method to indicate the action when a step is reassigned.

Parameters

Parameter

Description

&userinst

As EOAW_CORE:ENGINE:UserStepInst.

&origApprover

As string.

Returns

None.

Syntax

OnStepComplete(&stepinst)

Description

Use this method to indicate the action to take place when the step is complete.

Parameters

Parameter

Description

&stepinst

The active step instance, as EOAW_CORE:ENGINE:StepInst.

Syntax

OnStepPushback(&userinst)

Parameters

Parameter

Description

&userinst

As EOAW_CORE:ENGINE:UserStepInst.

Syntax

OnStepReactivate(&stepins)

Description

Use this method when a step is reactivated.

Parameters

Parameter

Description

&stepinst

The current step instance, as EOAW_CORE:ENGINE:StepInst.

Syntax

OnFinalHeaderDeny(&appinst As EOAW_CORE:ENGINE:AppInst);

Description

Use this method for the final denial.

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

Returns

None.

Syntax

OnHeaderDeny(&userinst)

Description

Use this method for header denial.

Parameters

Parameter

Description

&userinst

As EOAW_CORE:ENGINE:UserStepInst.

Syntax

OnHeaderApprove(&appinst)

Description

Use this method to indicate the action to take when the header is approved.

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

Syntax

OnNoApprovalNecessary(&appinst)

Description

Use this method when no approval is necessary.

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

Syntax

OnLineDeny(&userstep)

Description

Use this method to indicate the action to take when a line is denied.

Parameters

Parameter

Description

&userstep

User step, as EOAW_CORE:ENGINE:UserStepInst.

Syntax

OnLineApprove(&appinst, &thread)

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

&thread

As EOAW_CORE:ENGINE:Thread.

Syntax

OnAllLinesProcessed(&appinst, &approved, &denied)

Description

Use this method when all lines are processed.

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

&approved

As array of EOAW_CORE:ENGINE:Thread.

&denied

As array of EOAW_CORE:ENGINE:Thread.

Syntax

OnTerminate(&appinst As EOAW_CORE:ENGINE:AppInst)

Description

Use this method when the application instance is terminated.

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

Syntax

OnError(&stepinst)

Description

Use this method when an error occurs in a step.

Parameters

Parameter

Description

&stepinst

Step instance, as EOAW_CORE:ENGINE:StepInst.

Syntax

OnStepReview(&stepinst, &reviewers)

Description

Use this method to indicate the action to take when the step instance is reviewed.

Parameters

Parameter

Description

&stepinst

Step instance, as EOAW_CORE:ENGINE:StepInst.

&reviewers

UserIds for the reviewers, as an array of string.

Syntax

OnTimeout(&userinst, &notify)

Parameters

Parameter

Description

&userinst

As EOAW_CORE:ENGINE:UserStepInst.

&notify

As string.

Syntax

OnAdHocInsert(&stepinst, &approver)

Description

Use this method when new adhoc reviewers are inserted.

Parameters

Parameter

Description

&stepinst

As EOAW_CORE:ENGINE:AdHocStepInst.

&approver

UserID for approvers, as an array of string.

Syntax

OnAdHocDelete(&stepinst)

Description

Use this method when an adhoc step is deleted.

Parameters

Parameter

Description

&stepinst

As EOAW_CORE:ENGINE:AdHocStepInst.

Syntax

OnUserLocked(&userinst)

Description

Use this method to indicate the action to be taken if a user is locked out. If a user is locked out, then the administrator should be notified. This acts more as a warning because the system will still route the approval to that person.

Parameters

Parameter

Description

&userinst

As EOAW_CORE:ENGINE:UserStepInst.

Syntax

OnStepRequestInformation(&userinst)

Description

Use this method when there is a request for information.

Parameters

Parameter

Description

&userinst

As EOAW_CORE:ENGINE:UserStepInst.

Syntax

OnRequestInformationAdded(&appinst As EOAW_CORE:ENGINE:AppInst, &level As number, &notifyList As array of string);

Description

Use this method when request information has been added.

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

&level

Approval level, as number.

&notifyList

UserIds to notify, as array of string.

Syntax

ProcessNotifications(&appinst)

Description

Use this method to process notifications.

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

Syntax

OnLineTerminate(&appinst, &thread)

Description

Use this method when a line is terminated.

Parameters

Parameter

Description

&appinst

Application instance, as EOAW_CORE:ENGINE:AppInst.

&thread

As EOAW_CORE:ENGINE:Thread.