Answered

WFUSER info not loaded (for case creator)

Hi, I've create a relationship between my master process entity and the WFUSER system entity because I want show some information about user that has created the process.

I've dragged the fullName attribute of the WFUSER inside a form to display it, but when I start the process the field is empty.

I've also a "null pointer exception" when I try to use the mail attribute to send a main inside a start activity in a task.

It seems that the system doesn't load the users information.

I've to perform some particular configuration or I've miss some key step?

Obviously users are already present in the system and also all their attributes.

Thanks for the support.

Best Answer
photo

Dear Apanazzolo,

In order to obtain (and show) information about the user who has created the case, in addition to that data model relation you have included in your design, you would also need to initially assign this relationship with the proper value.

For this, making use of the "Me.Case.Creator" code is required, in a Bizagi expression (as an activity action executed as soon as the process starts).

Notice you may use the Me.Case.Creator further properties, such as: .FullName, .Email, or .Id.

This .Id is the one you are looking for, so that you can set in an expression that the creator user is loaded into your mentioned attribute in your model (Me.Case.Creator.Id).

Summarizing this up, take into account that any attribute referencing the WFUser (as well as any other attribute in your model) will start up by default by being = NULL; mainly because this is an attribute you have modeled to contain information along the process, and it will not always be necessarily used for the case creator.

Best regards,

photo
0

Dear Apanazzolo,

In order to obtain (and show) information about the user who has created the case, in addition to that data model relation you have included in your design, you would also need to initially assign this relationship with the proper value.

For this, making use of the "Me.Case.Creator" code is required, in a Bizagi expression (as an activity action executed as soon as the process starts).

Notice you may use the Me.Case.Creator further properties, such as: .FullName, .Email, or .Id.

This .Id is the one you are looking for, so that you can set in an expression that the creator user is loaded into your mentioned attribute in your model (Me.Case.Creator.Id).

Summarizing this up, take into account that any attribute referencing the WFUser (as well as any other attribute in your model) will start up by default by being = NULL; mainly because this is an attribute you have modeled to contain information along the process, and it will not always be necessarily used for the case creator.

Best regards,

photo
0

Thanks! I've perform the assignation of case creator when the process entries on the first task and all is ok. Now WFUser attributes are populated!

Thanks for the support.

photo
0

Hello!

Can you help me please?

I have entity "users_on_service", who include system entity "WFUSER". I trying to find "users_on_service" for current user.

var me = CEntityManager.GetEntity("WFUSER").GetEntityList("idUser",Me.Case.WorkingCredential.UserId,"","");var Sotr = CEntityManager.GetEntity("users_on_service").GetEntityList("Polzovatel", me[0],"","");

But it is not work.

Error: "BizAgi.EntityManager.CEntityDBTable" to type "System.IConvertible".

photo
0

Dear Sofya,

According your script, the first part is not correct because Me.Case.WorkingCredential.UserId has already the idUser. The correct way is:

var Sotr = CEntityManager.GetEntity("users_on_service").GetEntityList("Polzovatel", Me.Case.WorkingCredential.UserId,"","");Regards