partytypeid = person how?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

partytypeid = person how?

aray
Hi,

I am following the createEmployee flow of partymgr and trying to establish where the partyTypeId is set to 'PERSON'. I am looking to change that to a sub type called 'EMPLOYEE' that I have created. I could figure out how alternative flow for 'PARTY_GROUP' is set , but unclear on how 'PERSON' is set. Would really appreciate pointers.

- Arays
Reply | Threaded
Open this post in threaded view
|

Re: partytypeid = person how?

aray
Alight! Was able to dig it up in the line below
Map<String, Object> newPartyMap = UtilMisc.toMap("partyId", partyId, "partyTypeId", "PERSON", "description", description, "createdDate", now, "lastModifiedDate", now, "statusId", statusId);

From what it looks like this is hardwired to "PERSON". I am guessing there must be a reason behind it and perhaps it is best left that way. So for my requirement thinking the simplest way is perhaps to just use roles for now. Still have to worry about broken workflows if someone where to change the roles downstream . Any suggestions?

- Arays
ARays wrote
Hi,

I am following the createEmployee flow of partymgr and trying to establish where the partyTypeId is set to 'PERSON'. I am looking to change that to a sub type called 'EMPLOYEE' that I have created. I could figure out how alternative flow for 'PARTY_GROUP' is set , but unclear on how 'PERSON' is set. Would really appreciate pointers.

- Arays
Reply | Threaded
Open this post in threaded view
|

Re: partytypeid = person how?

aray
In reply to this post by aray
Alight! Was able to dig it up in the line below
Map<String, Object> newPartyMap = UtilMisc.toMap("partyId", partyId, "partyTypeId", "PERSON", "description", description, "createdDate", now, "lastModifiedDate", now, "statusId", statusId);

From what it looks like this is hardwired to "PERSON". I am guessing there must be a reason behind it and perhaps it is best left that way. So for my requirement thinking the simplest way is perhaps to just use roles for now. Still have to worry about broken workflows if someone where to change the roles downstream . Any suggestions?

- Arays
ARays wrote
Hi,

I am following the createEmployee flow of partymgr and trying to establish where the partyTypeId is set to 'PERSON'. I am looking to change that to a sub type called 'EMPLOYEE' that I have created. I could figure out how alternative flow for 'PARTY_GROUP' is set , but unclear on how 'PERSON' is set. Would really appreciate pointers.

- Arays
Reply | Threaded
Open this post in threaded view
|

Re: partytypeid = person how?

Adrian Crum
In reply to this post by aray
Employee is a party role, not a party type.

It would be less work for you to use the existing functionality.

-Adrian

ARays wrote:
> Hi,
>
> I am following the createEmployee flow of partymgr and trying to establish
> where the partyTypeId is set to 'PERSON'. I am looking to change that to a
> sub type called 'EMPLOYEE' that I have created. I could figure out how
> alternative flow for 'PARTY_GROUP' is set , but unclear on how 'PERSON' is
> set. Would really appreciate pointers.
>
> - Arays
Reply | Threaded
Open this post in threaded view
|

Re: partytypeid = person how?

aray
Thanks Adrian. I figured it would be easier to stick to using 'Role' than PartyType to limit the number of changes and be reasonably close to the trunk codebase. I would have liked a way to fix a role that can't be changed or dropped (essentially achieving the same effect as my original intent of picking a partyType) and my next steps would be to try and fix that sort of thing.

- Arays

Adrian Crum wrote
Employee is a party role, not a party type.

It would be less work for you to use the existing functionality.

-Adrian

ARays wrote:
> Hi,
>
> I am following the createEmployee flow of partymgr and trying to establish
> where the partyTypeId is set to 'PERSON'. I am looking to change that to a
> sub type called 'EMPLOYEE' that I have created. I could figure out how
> alternative flow for 'PARTY_GROUP' is set , but unclear on how 'PERSON' is
> set. Would really appreciate pointers.
>
> - Arays
Reply | Threaded
Open this post in threaded view
|

Re: partytypeid = person how?

Chirag Manocha-2
Hi Arays,
Following Book will help you. 'Chapter 2 - People and Organization' is
specially for Party.
The Data Model Resource Book, Vol. 1: A Library of Universal Data Models
for All Enterprises (Paperback) by Len Silverston
<http://www.amazon.com/exec/obidos/search-handle-url/ref=ntt_athr_dp_sr_1?%5Fencoding=UTF8&sort=relevancerank&search-type=ss&index=books&field-author=Len%20Silverston>

Regards
--
Chirag Manocha
HotWax Media Pvt. Ltd.
Website :- www.hotwaxmedia.com
Contact :- +91-98263-19099



ARays wrote:

> Thanks Adrian. I figured it would be easier to stick to using 'Role' than
> PartyType to limit the number of changes and be reasonably close to the
> trunk codebase. I would have liked a way to fix a role that can't be changed
> or dropped (essentially achieving the same effect as my original intent of
> picking a partyType) and my next steps would be to try and fix that sort of
> thing.
>
> - Arays
>
>
> Adrian Crum wrote:
>  
>> Employee is a party role, not a party type.
>>
>> It would be less work for you to use the existing functionality.
>>
>> -Adrian
>>
>> ARays wrote:
>>    
>>> Hi,
>>>
>>> I am following the createEmployee flow of partymgr and trying to
>>> establish
>>> where the partyTypeId is set to 'PERSON'. I am looking to change that to
>>> a
>>> sub type called 'EMPLOYEE' that I have created. I could figure out how
>>> alternative flow for 'PARTY_GROUP' is set , but unclear on how 'PERSON'
>>> is
>>> set. Would really appreciate pointers.
>>>
>>> - Arays
>>>      
>>    
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: partytypeid = person how?

Adrian Crum
In reply to this post by aray
What you might want to do is create a SECA that is triggered on
PartyRole update. If the change isn't allowed, then return an error or
failure.

-Adrian

ARays wrote:

> Thanks Adrian. I figured it would be easier to stick to using 'Role' than
> PartyType to limit the number of changes and be reasonably close to the
> trunk codebase. I would have liked a way to fix a role that can't be changed
> or dropped (essentially achieving the same effect as my original intent of
> picking a partyType) and my next steps would be to try and fix that sort of
> thing.
>
> - Arays
>
>
> Adrian Crum wrote:
>> Employee is a party role, not a party type.
>>
>> It would be less work for you to use the existing functionality.
>>
>> -Adrian
>>
>> ARays wrote:
>>> Hi,
>>>
>>> I am following the createEmployee flow of partymgr and trying to
>>> establish
>>> where the partyTypeId is set to 'PERSON'. I am looking to change that to
>>> a
>>> sub type called 'EMPLOYEE' that I have created. I could figure out how
>>> alternative flow for 'PARTY_GROUP' is set , but unclear on how 'PERSON'
>>> is
>>> set. Would really appreciate pointers.
>>>
>>> - Arays
>>
>