Package net.pricefx.common.dto
package net.pricefx.common.dto
Defining approval workflows, and chaining background jobs.
A workflow logic adds approval steps and watcher steps to a document's approval workflow, with their approvers and reasons. An approval step can name a post-step logic, which runs after the step and can insert another step right after it. A calculation flow can start a job when another job finishes.
Entry point: the binding of the logic that runs. A workflow logic gets workflow. A
post-step logic that an approval step names gets currentWorkflow. A chained job is
created with new.
A post-step logic can also run on a document that has no workflow logic. The
postStepLogicsWhenNoWorkflowDefined advanced configuration option names that logic
for each document type.
// workflow logic
workflow.addApprovalStep("Margin Approval")
.withApprovers("admin")
.withReasons("Margin below target")
// calculation flow logic: calculate a Calculated Field Set after the price list
import net.pricefx.common.dto.ChainedJobInfo
def nextJob = new ChainedJobInfo()
nextJob.setTargetObject("38.CFS")
actionBuilder.addPricelistAction("Price List 1")
.setNextJobs([nextJob])
.setCalculate(true)
Reference
WorkflowDTOdefines the steps of an approval workflow. A workflow logic gets it as theworkflowbinding.InsertWorkflowStepsDTOinserts an approval step or a watcher step after the running post-step logic. The logic gets it as thecurrentWorkflowbinding.ChainedJobInfonames a job that runs after another job finishes.
- See Also:
-
ClassesClassDescriptionThis class is a DTO that holds information about jobs that should be executed next.Lets a Workflow Post Step logic add approval or watcher steps to the running Approval Workflow.This class is basically the type of object, which is exposed in the workflow logic by the binding variable
workflowAn approval step of the workflow: the document must be approved (or denied) by the step's approvers before the workflow continues with the next step.WorkflowDTO.StepDTO<T extends WorkflowDTO.StepDTO>Common base of the approval and watcher steps of a workflow.A watcher step of the workflow: its recipients are notified by email when the step becomes active, but they cannot approve or deny.