Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Generate username Assistance || Add Register User Rule

Manu269
All-Star
All-Star

Hello team,

We are trying to explore the Add Register User Rule.

As a part of it we have requirement to use FN_EIC_SEQGEN.

Assistance Required:

1. Under Dataset SEQUENCE_GEN_MAPPING we have created 2 entries

identifier : abc value:1100

identifier:def value:2200

Added below as Add Register User Rule.

case when (users.employeetype = 'External' ) then concat('EXT',FN_EIC_SEQGEN('abc'))
when (users.employeetype = 'Vendor' ) then CONCAT('VR-', FN_EIC_SEQGEN('def ')) end

this is failing and generating username as :

casewhenemployeetype=ExternalthenEXT-FN_EIC_SEQGENabc whenemployeetype=VendorthenCONCATVR-FN_EIC_SEQGENdef

Error :

"2024-02-16T10:07:47.090+00:00","ecm","services.WorkflowService","http-nio-8080-exec-3-5bnml","DEBUG","Advance Config Query : select (case when (users.employeetype ='External') then concat('EXT-',FN_EIC_SEQGEN ('abc'))"
"2024-02-16T10:07:47.455+00:00","ecm","","null-5bnml","","when (users.employeetype ='Vendor') then CONCAT('VR-', FN_EIC_SEQGEN ('def ')) end) as property from users users where users.USERKEY=null"
"2024-02-16T10:07:47.090+00:00","ecm","services.WorkflowService","http-nio-8080-exec-3-5bnml","DEBUG","Advanced Config Query Rule case when (users.employeetype ='External') then concat('EXT-',FN_EIC_SEQGEN ('abc'))"
"2024-02-16T10:07:47.455+00:00","ecm","","null-5bnml","","when (users.employeetype ='Vendor') then CONCAT('VR-', FN_EIC_SEQGEN ('def ')) end returned null"
"2024-02-16T10:07:47.091+00:00","ecm","services.WorkflowService","http-nio-8080-exec-3-5bnml","DEBUG","No append char is present in concate String"
"2024-02-16T10:07:47.091+00:00","ecm","services.WorkflowService","http-nio-8080-exec-3-5bnml","DEBUG","No append char is present in concate String"
"2024-02-16T10:07:47.092+00:00","ecm","services.WorkflowService","http-nio-8080-exec-3-5bnml","DEBUG","No append char is present in concate String"
"2024-02-16T10:07:47.092+00:00","ecm","services.WorkflowService","http-nio-8080-exec-3-5bnml","DEBUG","Generate Username as per Advanced Query : casewhenemployeetype=ExternalthenEXT-FN_EIC_SEQGENabc"
"2024-02-16T10:07:47.455+00:00","ecm","","null-5bnml","","whenemployeetype=VendorthenCONCATVR-FN_EIC_SEQGENdefend"
"2024-02-16T10:07:47.092+00:00","ecm","services.WorkflowService","http-nio-8080-exec-3-5bnml","DEBUG","Generated Advanced Config from Advanced Config : "
"2024-02-16T10:07:47.092+00:00","ecm","services.WorkflowService","http-nio-8080-exec-3-5bnml","DEBUG","Generate Username as per Advanced Query : casewhenemployeetype=ExternalthenEXT-FN_EIC_SEQGENabc"
"2024-02-16T10:07:47.455+00:00","ecm","","null-5bnml","","whenemployeetype=VendorthenCONCATVR-FN_EIC_SEQGENdefend"

 

2. We have added User Modification Workflow as 1 level manager approval.

We are allowing the requestor to select manager on user create screen but the request is not getting assigned to manager for approval but going to admin.

Assist please 

[This message has been edited by moderator to remove @ mention to another forum member or an employee you are not yet part of a conversation]

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.
4 REPLIES 4

armaanzahir
Valued Contributor
Valued Contributor

Hi @Manu269 

A similar issue was reported for register user rule. Works fine with systemuser generation rule but not with register user rule. Might work fine if the user modification workflow is set to auto approve, but not with another custom workflow.

Better to utilize the dynamic attribute for username generation in case this does not work. 

Solved: UserName Generation Rule - Saviynt Forums - 40822

 

Also, for the 2nd query, use a custom query inside the custom assignment.

select userkey from users where userkey= ${manager}  

where manager is the dyn attribute name.

armaanzahir_0-1708079828300.png

 

Workflow Components (saviyntcloud.com)

 

 

Regards,
Md Armaan Zahir

When I kept Workflow as Auto Approval then 

case when (users.employeetype ='Vendor') then concat('V9',FN_EIC_SEQGEN('abc')) when (users.employeetype ='External') then CONCAT('VSR', FN_EIC_SEQGEN('def')) end

works very perfect.

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Manu269
All-Star
All-Star

@armaanzahir many thanks for input.

Let me check point 2.

For point 1 :

Better to utilize the dynamic attribute for username generation in case this does not work. 

How can we call the FN_EIC_SEQGEN in dynamic attribute?

Also any reference how can i check for both type of users.

The thing is it always have to be next available number defined in  SEQUENCE_GEN_MAPPING

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Manu269
All-Star
All-Star

@armaanzahir validated the point2. It works perfectly.

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.