public class WorkflowDTO extends Object
workflow
workflow.addApprovalStep("First Approval").withApprover("admin").setReason("Admin needs always approve")
Modifier and Type | Class and Description |
---|---|
static class |
WorkflowDTO.ApprovalStepDTO |
static class |
WorkflowDTO.StepDTO<T extends WorkflowDTO.StepDTO> |
static class |
WorkflowDTO.WatcherStepDTO |
Constructor and Description |
---|
WorkflowDTO(WorkflowType type,
String typedId) |
WorkflowDTO(WorkflowType type,
String typedId,
String submitReason,
boolean isMassUpdate) |
Modifier and Type | Method and Description |
---|---|
WorkflowDTO.ApprovalStepDTO |
addApprovalStep(String uniqueName)
Adds an approval step at the end of the workflow
|
void |
addItemReason(String itemTypedId,
String reason) |
WorkflowDTO.WatcherStepDTO |
addWatcherStep(String uniqueName)
Adds a watcher step to the end of the workflow.
|
Map<String,Object> |
getDataMap() |
String |
getDefaultPostApprovalStepLogicName() |
List<String> |
getDenialReasons() |
Map<String,String> |
getItemReasons() |
boolean |
getRunDefaultPostApprovalStepLogicOnEmptyWorkflow() |
WorkflowDTO.StepDTO |
getStep(String uniqueName)
Retrieves a named step (if existing)
|
LinkedHashSet<WorkflowDTO.StepDTO> |
getSteps() |
String |
getSubmitReason()
Gets reason entered by submitter
|
WorkflowType |
getType()
Returns the type of the workflow.
|
String |
getTypedId() |
boolean |
isAddStepRestrictedToWFAdmin() |
Boolean |
isAutoConvertToDeal() |
boolean |
isDenialReasonOptional() |
boolean |
isMassUpdate() |
boolean |
isSelectStepOnDeny() |
boolean |
removeStep(String uniqueName)
Removes a named step (if existing)
|
void |
setSubmitReason(String submitReason)
Overrides reason entered by submitter
|
WorkflowDTO |
withAddStepRestrictedToWFAdmin() |
WorkflowDTO |
withAddStepRestrictedToWFAdmin(boolean isAddStepRestrictedToWFAdmin) |
WorkflowDTO |
withAutoConvertToDeal(boolean autoConvertToDeal)
If
true then automatically converts quote to deal when quote is approved |
WorkflowDTO |
withDataMap(Map<String,Object> dataMap)
Sets dataMap map, which is available then in email templates
|
WorkflowDTO |
withDefaultPostApprovalStepLogic(String postApprovalStepLogicUniqueName)
Adds a logic that will be executed after every approval step.
|
WorkflowDTO |
withDenialReasons(List<String> denialReasons,
boolean isDenialReasonOptional) |
WorkflowDTO |
withRunDefaultPostApprovalStepLogicOnEmptyWorkflow(boolean runDefaultPostStepLogicOnEmptyWorkflow)
Decides if default post step logic should be executed also in case the wf is empty (has no steps).
|
WorkflowDTO |
withSelectStepOnDeny(boolean isSelectStepOnDeny) |
public WorkflowDTO(WorkflowType type, String typedId, String submitReason, boolean isMassUpdate)
public WorkflowDTO(WorkflowType type, String typedId)
public WorkflowDTO.ApprovalStepDTO addApprovalStep(String uniqueName)
uniqueName
- Name of the steppublic WorkflowDTO.WatcherStepDTO addWatcherStep(String uniqueName)
uniqueName
- Name of the steppublic WorkflowType getType()
public boolean removeStep(String uniqueName)
uniqueName
- The name of the steppublic WorkflowDTO.StepDTO getStep(String uniqueName)
uniqueName
- The name of the steppublic String getSubmitReason()
public void setSubmitReason(String submitReason)
submitReason
- public WorkflowDTO withDenialReasons(List<String> denialReasons, boolean isDenialReasonOptional)
public boolean isDenialReasonOptional()
public String getTypedId()
public LinkedHashSet<WorkflowDTO.StepDTO> getSteps()
public WorkflowDTO withAddStepRestrictedToWFAdmin()
public WorkflowDTO withAddStepRestrictedToWFAdmin(boolean isAddStepRestrictedToWFAdmin)
public boolean isAddStepRestrictedToWFAdmin()
public WorkflowDTO withSelectStepOnDeny(boolean isSelectStepOnDeny)
public boolean isSelectStepOnDeny()
public WorkflowDTO withDataMap(Map<String,Object> dataMap)
dataMap
- The map with additional data needed to render the template.public WorkflowDTO withDefaultPostApprovalStepLogic(String postApprovalStepLogicUniqueName)
postApprovalStepLogicUniqueName
- Unique name of wf post step logicpublic String getDefaultPostApprovalStepLogicName()
public WorkflowDTO withRunDefaultPostApprovalStepLogicOnEmptyWorkflow(boolean runDefaultPostStepLogicOnEmptyWorkflow)
runDefaultPostStepLogicOnEmptyWorkflow
- Default is false.public boolean getRunDefaultPostApprovalStepLogicOnEmptyWorkflow()
public WorkflowDTO withAutoConvertToDeal(boolean autoConvertToDeal)
true
then automatically converts quote to deal when quote is approvedautoConvertToDeal
- flag if should be automatically convertedpublic Boolean isAutoConvertToDeal()
public boolean isMassUpdate()
Copyright © 2019. All rights reserved.