Filenet - GET Username from F_Originator

1.2k Views Asked by At

I am using filenet BPM for approval system and I want to extract the username from F_Originator so that I can send an email to originator about the status of approved Or rejected document. How can I extract the username from F_Originator in workflow (not using java code)?

3

There are 3 best solutions below

1
bajji On

I don't think there is a way to do it in workflow or at least I don't know.

I would suggest you have a component queue like ce_operations and pass the F_Originator and use vwSession.convertIdToUserName(userId)

**************updated answer************

you can use userid() method to get the user who has processed the workflow. but there is a catch here if there are more than one user involved in processing the workflow, userid() will always return the last user. In order to get the username of the user who launched the workflow try

  1. Define a data field in workflow and assign the value of userid() to it in the launch step
  2. If you are launching workflow from code, you can set the username value to the data field
4
tiktok On

I think I found a way to get the username although it's not making use of F_Originator. I created a string field called username & then at the launch step in Assignment tab I assigned username with userid() and it gives you the username. I think its not the best way to get the username but in my case it worked.

4
bajji On

Answer suiting to the exact requirement

  1. At launch step, assign output of userid() to a work flow data field
  2. Use OOTB option to send email (CE_Operations) and edit the OOTB templates or
  3. Have a component queue and establish a VWSession (or you can have custom login module to get VWSession)
  4. Call yourVWSession.convertIdtoUserName(int userId) to get the username
  5. then call yourVWSession.fetchUserInfo(username) it returns VWUserInfo
  6. from VWUserInfo you can use getEMailAddress() to get user email id.

Hope this helps