...
Logic Type: Workflow
Logic Nature: Default
Workflow Type: Determines for which object this logic will be used. The value is one of WorkflowTypes.
Logic Name: If the logic is intended for Quotes you can change its name. For all other workflow types, the logic name must be the same as the Workflow TypeWorkflowType value.
Execution Types:
Standard - to calculate and build the approval or watcher steps for the approval workflow.
Information provided to the logic
Binding variables:
workflow: WorkflowDTO - on this object you will build the steps.
submitter: Username of the user, who submitted the document.
currentWorkflow: InsertWorkflowStepsDTO
workflowHistory: WorflowInfo as Map - previously processed workflow, before it was denied. This is available only when an approver denies and then a user submits again.
calculationgriditem | claim | compensation | compensationrecord | contract | customform | dcr | model | modelrecord | pricegriditem | pricelist | quote | rebateagreement | rebaterecord | rebaterecordgroup : Map - the content (fields and their values) of the document/object to be approved. Which of the variable will be available depends on object for which we execute this approval workflow logic.
approvable: Map - the content of the document to be approved. This is an alternative to the previous variable.
Expected logic execution outcome
The logic is supposed to build the Steps on the provided WorkflowDTO object. Each step should have:
Type: Approver / Watcher
Approvers: Either one or more Users, or one or more User Groups (i.e., you cannot mix Users and User Groups).
Number of approvers: How many approvers must approve the step, so that it treated as approved. By default, one user is enough to approve the step.
Reasons: Reasons why the Users/Groups are requested to approve the document.
If the logic throws an exception, the workflow steps will not be built and the exception message is displayed to the user. If approval workflow logic was executed during Submit operation, the operation will be canceled.
The elements results are not used by the system.
...