De-Activate smart service issue

Hi ,

I am trying to de-activate based on DB data.

I have a list of unused users which I need to de-activate from Appian.

So , I have implemented MNI based on the below CDT list and passed the User information as touser(

GLOB_GISBusinessUserListToDelete.UserName) to the smart service.

But , I am getting an error as below

 

[‎11/‎24/‎2017 11:40 PM]  Soujanya Bijjala: 

There is a problem with task “Deactivate User” in the process “GLOB Fetch GISBusinessUsers”. Does not exist: User (Data Inputs)

Problem:  An invalid expression has been encountered in a task.  

Recommended Action:  Check the expression including any function requirements and resume.  

Priority of this problem: High Priority

 

I have verified the user display name in appian and its the same as below value (Ayoub Ateefa).

Can some one help us to find out the issue.

And also , do we have an option reactivate the users again in apian?

 

 

GLOB_GISBusinessUserListToDelete

GLOB_GISBusinessUser

[ID=107, AMUID=137, UserName=Ayoub Ateefa, UserRole=Production Engineers, IsActive=N, CreateDate=3/23/2016 12:59 PM, CreateUser=APP_APPIAN, UpdateDate=11/24/2017 4:02 AM, UpdateUser=BPMSDATA]

 .

 

 

Thanks

Soujanya

  Discussion posts and replies are publicly visible

Parents
  • Hi Soujanya,

    touser() function expects "username" of the user as input rather than display name. In this case I hope pv!GLOB_GISBusinessUserListToDelete.UserName is nothing but the userNames of the users.

    And moreover if we are using MNI we need to index values by passing tp!index.

    example: pv!GLOB_GISBusinessUserListToDelete.UserName[tp!index]
  • Hi,
    Yes ,CDT has the value of User DisplayName.
    Is there any way to get the UserName by passing this ? and pfb CDT and it has data
    PFB

    GLOB_GISBusinessUserListToDelete GLOB_GISBusinessUser [ID=107, AMUID=137, UserName=Ayoub Ateefa, UserRole=Production Engineers, IsActive=N, CreateDate=3/23/2016 12:59 PM, CreateUser=APP_APPIAN, UpdateDate=11/24/2017 4:02 AM, UpdateUser=BPMSDATA]


    =touser(index(pv!GLOB_GISBusinessUserListToDelete,"UserName",""))
  • 0
    Certified Lead Developer
    in reply to Soujanya B
    Hi Sowjanya, I don't think you can get the username by passing display name, because you can have multiple users with in an environment having similar display name, hence it's better if you can capture username instead of display name into db, which can make your job quite easy.

    Also when you want to execute Deactivate user smart service, you can use modify process model security smart service to provide Admin permission to the basic user within that process model context.

    Also why don't you define a swimlane where the Assignment option will be set to whoever designed the process, so that you can place this smart service under this lane, which by default provides you admin privileges for the nodes under this lane.

    Also while using MNI you can make the use of tp!instanceIndex to get the current iteration user from an array of users, however please do remember, MNI is not suggested in performance perspective, as this will be flagged in Appian Health Check

    Hope this will help you to identify the proper approach to achieve your requirement.
Reply
  • 0
    Certified Lead Developer
    in reply to Soujanya B
    Hi Sowjanya, I don't think you can get the username by passing display name, because you can have multiple users with in an environment having similar display name, hence it's better if you can capture username instead of display name into db, which can make your job quite easy.

    Also when you want to execute Deactivate user smart service, you can use modify process model security smart service to provide Admin permission to the basic user within that process model context.

    Also why don't you define a swimlane where the Assignment option will be set to whoever designed the process, so that you can place this smart service under this lane, which by default provides you admin privileges for the nodes under this lane.

    Also while using MNI you can make the use of tp!instanceIndex to get the current iteration user from an array of users, however please do remember, MNI is not suggested in performance perspective, as this will be flagged in Appian Health Check

    Hope this will help you to identify the proper approach to achieve your requirement.
Children