public static class WorkflowDTO.ApprovalStepDTO extends WorkflowDTO.StepDTO<WorkflowDTO.ApprovalStepDTO>
alreadySatisfiedComment, emailAttachment, emailAttachmentTemplateName, properties, uniqueName, workflow
Constructor and Description |
---|
ApprovalStepDTO(WorkflowDTO workflow,
String uniqueName) |
Modifier and Type | Method and Description |
---|---|
WorkflowDTO.ApprovalStepDTO |
addProperty(String name,
Object value) |
void |
fromMap(Map<String,Object> values) |
List<Object> |
getApprovalRequiredEmailAttachments() |
String |
getApprover()
Deprecated.
Return the current approver in case of single approver set (or null if none set or if group approval)
|
List<String> |
getApprovers()
Return the current approvers (or null if none set or if group approval)
|
List<String> |
getDenialReasons() |
Boolean |
getExcludeSubmitter()
Returns status if the submitter is excluded in case of group approval
|
List<String> |
getMandatoryComments() |
List<Integer> |
getMinApprovalsForGroups() |
Integer |
getMinApprovalsNeeded() |
List<String> |
getNotificationOnlyToUsers()
Returns the subset of approvers that should recieve email notification.
|
String |
getPostStepLogicName() |
String |
getReason()
Deprecated.
|
List<String> |
getReasons()
Returns the reasons text
|
String |
getUserGroupApprover()
Deprecated.
Gets user group name in case of single group approval (or null otherwise)
|
List<String> |
getUserGroupApprovers()
Gets user group names in case of group approval (or null otherwise)
|
boolean |
isDenialReasonOptional() |
Boolean |
isMultiApprovalAllowed() |
WorkflowDTO.ApprovalStepDTO |
setReason(String reason)
Deprecated.
|
Map<String,Object> |
toMap() |
WorkflowDTO.ApprovalStepDTO |
withApprovalRequiredEmailAttachment(Object attachment) |
WorkflowDTO.ApprovalStepDTO |
withApprovalRequiredEmailAttachments(Object attachments) |
WorkflowDTO.ApprovalStepDTO |
withApprover(String userLoginName)
Deprecated.
Last invoked of
#withApprover(String) , #withUserGroupApprover(String) wins |
WorkflowDTO.ApprovalStepDTO |
withApprovers(String... userLoginNames)
Last invoked of
#withApprovers(String...) , #withUserGroupApprovers(String...) wins |
WorkflowDTO.ApprovalStepDTO |
withDenialReasons(List<String> denialReasons,
boolean isDenialReasonOptional) |
WorkflowDTO.ApprovalStepDTO |
withExcludeSubmitter(boolean excludeSubmitter)
Set exclude submitter
|
WorkflowDTO.ApprovalStepDTO |
withMandatoryComments(String... actions)
Makes comment mandatory for certain actions.
|
WorkflowDTO.ApprovalStepDTO |
withMinApprovalsForGroups(Integer... minApprovalsForGroups)
A minimum number of approvals needed for each group, to consider this step as approved.
|
WorkflowDTO.ApprovalStepDTO |
withMinApprovalsNeeded(int minApprovalsNeeded)
A minimum number of approvals needed to consider this step as approved.
|
WorkflowDTO.ApprovalStepDTO |
withMultipleApprovalByGroupsAllowed(boolean multipleApprovalByGroupsAllowed)
Deprecated.
|
WorkflowDTO.ApprovalStepDTO |
withNotificationOnlyToUsers(String... userLoginNames)
Subset of approvers that should receive the email notification
|
WorkflowDTO.ApprovalStepDTO |
withPostStepLogic(String logicUniqueName)
Sets post step logic name that should be run after this step is executed (i.e.
|
WorkflowDTO.ApprovalStepDTO |
withReasons(String... reasons)
Sets explanations for the approval step.
|
WorkflowDTO.ApprovalStepDTO |
withSingleUserMultiApprovalAllowed(boolean multiApprovalAllowed) |
WorkflowDTO.ApprovalStepDTO |
withUserGroupApprover(String userGroupUniqueName)
Deprecated.
Last invoked of
#withApprover(String) , #withUserGroupApprover(LString) wins |
WorkflowDTO.ApprovalStepDTO |
withUserGroupApprover(String userGroupUniqueName,
boolean excludeSubmitter)
Deprecated.
Same as
#withUserGroupApprover(String) but the submitter is excluded in case he is memeber of the group
Last invoked of #withApprover(String) , #withUserGroupApprover(String) wins |
WorkflowDTO.ApprovalStepDTO |
withUserGroupApprovers(String... userGroupUniqueNames)
Last invoked of
#withApprovers(String...) , #withUserGroupApprovers(String...) wins |
equals, getAlreadySatisfiedComment, getEmailAttachment, getEmailAttachmentTemplateName, getProperties, getUniqueName, hashCode, readSingleValue, withAlreadySatisfied, withAlreadySatisfied, withEmailAttachment, withEmailAttachment, withEmailAttachmentTemplateName
public ApprovalStepDTO(WorkflowDTO workflow, String uniqueName)
@Deprecated public WorkflowDTO.ApprovalStepDTO withApprover(String userLoginName)
#withApprover(String)
, #withUserGroupApprover(String)
winspublic WorkflowDTO.ApprovalStepDTO withApprovers(String... userLoginNames)
#withApprovers(String...)
, #withUserGroupApprovers(String...)
winspublic WorkflowDTO.ApprovalStepDTO withNotificationOnlyToUsers(String... userLoginNames)
@Deprecated public WorkflowDTO.ApprovalStepDTO withUserGroupApprover(String userGroupUniqueName)
#withApprover(String)
, #withUserGroupApprover(LString)
winspublic WorkflowDTO.ApprovalStepDTO withUserGroupApprovers(String... userGroupUniqueNames)
#withApprovers(String...)
, #withUserGroupApprovers(String...)
wins@Deprecated public WorkflowDTO.ApprovalStepDTO withUserGroupApprover(String userGroupUniqueName, boolean excludeSubmitter)
#withUserGroupApprover(String)
but the submitter is excluded in case he is memeber of the group
Last invoked of #withApprover(String)
, #withUserGroupApprover(String)
winspublic WorkflowDTO.ApprovalStepDTO withExcludeSubmitter(boolean excludeSubmitter)
@Deprecated public WorkflowDTO.ApprovalStepDTO setReason(String reason)
reason
- The reasonpublic WorkflowDTO.ApprovalStepDTO withReasons(String... reasons)
reasons
- The reasons why each approver needs to approve.
The reasons match approvers. E.g. if you have 3 approvers (a1, a2, a3),
you can specify up to 3 reasons (r1, r2, r3) and then r1 corresponds
to a1, r2 to a2 etc. If you want to put multiple reasons to a single approver,
you need to join the strings and return a single combined reason in the code.public WorkflowDTO.ApprovalStepDTO addProperty(String name, Object value)
public WorkflowDTO.ApprovalStepDTO withApprovalRequiredEmailAttachment(Object attachment)
public WorkflowDTO.ApprovalStepDTO withApprovalRequiredEmailAttachments(Object attachments)
@Deprecated public String getApprover()
public List<String> getApprovers()
public List<String> getNotificationOnlyToUsers()
@Deprecated public String getReason()
public Boolean getExcludeSubmitter()
@Deprecated public String getUserGroupApprover()
public List<String> getUserGroupApprovers()
public WorkflowDTO.ApprovalStepDTO withMinApprovalsNeeded(int minApprovalsNeeded)
minApprovalsNeeded
- public WorkflowDTO.ApprovalStepDTO withMinApprovalsForGroups(Integer... minApprovalsForGroups)
minApprovalsForGroups
- Resets minApprovalsNeededpublic WorkflowDTO.ApprovalStepDTO withPostStepLogic(String logicUniqueName)
logicUniqueName
- Workflow Post Step Logic unique name. If null, WorkflowDTO#withDefaultPostApprovalStepLogic(String)
will be used,
if empty string, no logic will be used even if there is WorkflowDTO#withDefaultPostApprovalStepLogic(String)
setpublic String getPostStepLogicName()
public Map<String,Object> toMap()
toMap
in class WorkflowDTO.StepDTO<WorkflowDTO.ApprovalStepDTO>
public void fromMap(Map<String,Object> values)
fromMap
in class WorkflowDTO.StepDTO<WorkflowDTO.ApprovalStepDTO>
public WorkflowDTO.ApprovalStepDTO withDenialReasons(List<String> denialReasons, boolean isDenialReasonOptional)
public boolean isDenialReasonOptional()
public Integer getMinApprovalsNeeded()
public Boolean isMultiApprovalAllowed()
@Deprecated public WorkflowDTO.ApprovalStepDTO withMultipleApprovalByGroupsAllowed(boolean multipleApprovalByGroupsAllowed)
public WorkflowDTO.ApprovalStepDTO withSingleUserMultiApprovalAllowed(boolean multiApprovalAllowed)
multiApprovalAllowed
- When true, then an approver can approve not only once, but that many times
as he has number of groups that are allowed to approve.public WorkflowDTO.ApprovalStepDTO withMandatoryComments(String... actions)
Example:
workflow.addApprovalStep("ApproverWithDefault")
.withUserGroupApprovers("Group1", "Group2", "Group3")
.withMandatoryComments("DENY", "APPROVE")
.withMinApprovalsForGroups(1, 1, 2)
actions
- for which comment is mandatory. This method accepts only values "APPROVE" and "DENY". Other values will be ignored.Copyright © 2019. All rights reserved.