Trying to map people type with data model

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
dharamjeet
Active Member II

Trying to map people type with data model

I'm trying to map people type variable with data Entity Model, I have created CustomDataModelService to process the data based on assignee in people type field.my service is executing fine and returning all model attibutes value but the object or mapped variable that I have taken for assignee variable is empty.I tried same taking a text form field from form field to data model mapping property which is running fine but I'm facing challenge mapping assignee field (people) with data model. 

can any body help me with the situation?

3 Replies
thuynh
Established Member II

Re: Trying to map people type with data model

Hi Dharamjeet Singh ,

but the object or mapped variable that I have taken for assignee variable is empty

Please provide more details such as unit test.

Thanks,

Thong

dharamjeet
Active Member II

Re: Trying to map people type with data model

From the above three images you will find that I have taken a start form which has two fields in it , assignee and assignee id.

Now you see I have configured form field to data mapping , with 'assignee Id'  form field. but there is no way I can find to map my model with 'assignee' which i want to achieve.

Here you see I have defined a mapped variable name through which I can access my model attributes. I configured form field to data mapping , with 'assignee Id' and In this way I am able to access all model attributes values through 'custom' variable. but here problem is I have to manually insert the assignee or user Id in the text field which is not way it should work.

 

To map with assignee I tried  other way through process variable , so what I did is I created a process variable with the name 'assignee'.

so here I stepped to variables and created one like -

when configuring data model like this, execution reaches my customDatamodelService with  field value assignee Id and returns the data as in previous case, but custom attributes values I'm getting are empty.

I hope its clear to you now what I really want to achieve.I need help on this.

thuynh
Established Member II

Re: Trying to map people type with data model

Hi,

Thanks for a long answer but I'm afraid I'm still not getting your problem statement. Sorry.

Is this your main issue?

but there is no way I can find to map my model with 'assignee' which i want to achieve.

Do you mean you can't map non-primitive variable to your forms? I believe 'assignee' is a complex data model that you have defined?

when configuring data model like this, execution reaches my customDatamodelService with  field value assignee Id and returns the data as in previous case, but custom attributes values I'm getting are empty.

You gotta have some running code and stack trace right? Could you extract your problematic code to a unit test and share it so everybody can really see your problems?

Thanks,

Thong