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.
  • Thanks Alok!
    Actually we are getting the display name from different application so no option to write username to DB.
    And , this is a scheduler (poller) runs daily which picks the deleted user list and the requirement is to delete/de-activate those users from Appian.
  • 0
    Certified Lead Developer
    in reply to Soujanya B
    I believe the system/application which returns user display name is also an Appian system, so you can request service provider to send username instead of display name.

    Like they can expose a GET service and can provide list of users as JSON response.

    This can make your job easy and you can achieve your requirement
  • No, Its not an apian system. Appian is integrated with HEIGIS via a webservice callto get the required info.
  • 0
    Certified Lead Developer
    in reply to Soujanya B
    I don't understand, If it's a non Appian system, how can you Deactivate their user?

    Or how come a third party system have Appian users information?
  • 0
    Certified Lead Developer
    in reply to Soujanya B
    And if Appian is the one who provides their user's display name related information to third party system, then why can't we send username instead?

    I believe it should be possible.
  • sorry for the confusion.
    GIS is the system where it has AMU,Districts , Users info as part of one application we are retrieving users based on the AMU from GIs and creating users in Appian.
    Later , some of the AMu's might de-activate in GIS and users associated to it will no longer available in GIS , but those were still in APPIAN due to that , unrequired notifications are going to those users.

    In order to sync both GIS and APPIAN , designed a poller to get the latest User info from GIS .So wenever a user is deleted fro GIS , the same user should no longer available in Appian.

    Hope u got it.
    As u said earlier , I can ask GIS to send the user instead of Display name (i.e. users First name and last name ).

    Thanks Alok
Reply
  • sorry for the confusion.
    GIS is the system where it has AMU,Districts , Users info as part of one application we are retrieving users based on the AMU from GIs and creating users in Appian.
    Later , some of the AMu's might de-activate in GIS and users associated to it will no longer available in GIS , but those were still in APPIAN due to that , unrequired notifications are going to those users.

    In order to sync both GIS and APPIAN , designed a poller to get the latest User info from GIS .So wenever a user is deleted fro GIS , the same user should no longer available in Appian.

    Hope u got it.
    As u said earlier , I can ask GIS to send the user instead of Display name (i.e. users First name and last name ).

    Thanks Alok
Children
No Data