Click or drag to resize

ProcessServicesExecuteApprovalItemAction Method

Approves or Rejects an approval item on behalf of a particular user. This method may also be used to change the current status of the from under construction to pending approval, or vice versa.

Namespace:  FactoryLogix.xTend.ProcessDefinition
Assembly:  FactoryLogix.xTend.API (in FactoryLogix.xTend.API.dll) Version: 8.242.0.0 (8.242.0.0)
Syntax
public void ExecuteApprovalItemAction(
	Guid sessionId,
	Guid approvalItemId,
	string userGroupName,
	string userName,
	ApprovalStatus action,
	string comments
)

Parameters

sessionId
Type: SystemGuid
The session identifier that was returned by the Connect(String, String, String, String, String) method.
approvalItemId
Type: SystemGuid
The Id of the ApprovalItem to be acted upon.
userGroupName
Type: SystemString
The name of the user group associated with the step in the approval process to be acted upon.
userName
Type: SystemString
The user name of the user on whose behalf the action will be taken.
action
Type: FactoryLogix.xTend.DataObjectsApprovalStatus
An enumerated value indicating the type of action to be taken.
comments
Type: SystemString
An optional parameter for rejection type actions, this parameter represents free form notes that are to be recorded with the history record for this action.
Exceptions
ExceptionCondition
InvalidSessionExceptionThrown if the sessionId parameter is invalid.
NotFoundExceptionAn approval item with matching Id was not found, or the approval item does not contain a step associated with the specified userGroupName.
NotAuthorizedExceptionThe user specified by the userName parameter is not authorized to act upon the approval item. Typically, this is because the user is not a member of the specified user group.
ApprovalNotPendingExceptionThe approval is not pending and therefore is either under construction or already approved or rejected.
ApprovingOutofOrderExceptionThe approval must be approved by other groups first.
ApprovalNotUnderConstructionExceptionWhen updating the approval to pending and it is not under construction.
CheckedOutExceptionWhen updating the approval to pending and the related item is being edited.
UnitTransactionsExistExceptionWhen updating the approval and there are already unit transactions associated.
See Also