Hi Team,
I am working on an application using Bonita 6.3 Performance edition and loads external application pages in Bonita work flow. I am new to Bonita work flow development. It is found that the loggedUser variable (Bonita provided variable), is missing in Bonita 6.3 version while it is available in Bonita 5.8.
Could you please help me to understand this difference and a way to obtain the logged user details as well as locale information so that I can pass this information/variables to the external application.
1 Like
Hello,
the difference between version 5 and version 6 is that the user was identified by its username in v5 (string) and it is identified by its id in v6 (long). So, you will no longer find loggedUser variable, but you will have a loggedUserId variable available in forms of the version 6. With that id, you can always retrieve user details using API call, for example:
apiAccessor.identityAPI.getUser(loggedUserId)
will get you an object of type User that will contain all user details or:
apiAccessor.identityAPI.getUserWithProfessionalDetails(loggedUserId).getContactData()
will get you all contact data of the given user.
You will also find a variable named locale in the forms script, that would contain a two-letter code of the language currently used by your user (such as en, de, fr…)
Hope this helps and clarifies,
Haris
Thanks haris.subasic for the clarification. Let me try this once.
Hi Haris,
I couldn’t see any variable named loggedUserId in the list of select Provided Variable in Bonita Studio.
Hello,
these two variable are available in the script editor within a form only.