tutorial:adm:modules_extras_wf

Modules - Extras: Workflows for approval of role assignment

Provided approval workflows:

  • extras-approve-role-by-contract-manager
  • extras-approve-role-by-manager-and-guarantee
  • extras-approve-role-by-manager-script-guarantee

Configuration:

Example of setting workflow for role criticality:

  • idm.sec.core.wf.role.approval.X = extras-approve-role-by-manager-and-guarantee - X is role priority level (1-4)

Configuration properties for worflows:

  • idm.sec.extras.wf.approval.customScript - Code of custom script
  • idm.sec.extras.wf.approval.guaranteeTypeA - Code of codelist item for guarantee of A type in the code list guarantee-type (create this code list if it doesn't exist)
  • idm.sec.extras.wf.approval.guaranteeTypeB - Code of codelist item for guarantee of B type in the code list guarantee-type
  • idm.sec.extras.wf.approval.approver.states - List of valid identity states for approvers. By default tasks are assigned only to identities in states CREATED, VALID, FUTURE_CONTRACT.

Example of custom script:

  • Script category: System
  • Script authorities: Service - identityService, Class - eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto
  • Scrip code:
import eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto;

List<IdmIdentityDto> candidates = new ArrayList<IdmIdentityDto>();
candidates.add(identityService.getByUsername("user_for_approval"));
return candidates;

The script must return List of IdmIdentityDto.