You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by ARays <ar...@kenfuse.com> on 2009/10/05 20:22:50 UTC

partytypeid = person how?

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
-- 
View this message in context: http://www.nabble.com/partytypeid-%3D-person-how--tp25755584p25755584.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: partytypeid = person how?

Posted by Adrian Crum <ad...@hlmksw.com>.
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
>>
> 

Re: partytypeid = person how?

Posted by Chirag Manocha <ch...@hotwaxmedia.com>.
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
>>>       
>>     
>
>   

Re: partytypeid = person how?

Posted by ARays <ar...@kenfuse.com>.
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
> 
> 

-- 
View this message in context: http://www.nabble.com/partytypeid-%3D-person-how--tp25755584p25763268.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: partytypeid = person how?

Posted by Adrian Crum <ad...@hlmksw.com>.
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

Re: partytypeid = person how?

Posted by ARays <ar...@kenfuse.com>.
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
> 

-- 
View this message in context: http://www.nabble.com/partytypeid-%3D-person-how--tp25755584p25755921.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: partytypeid = person how?

Posted by ARays <ar...@kenfuse.com>.
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
> 

-- 
View this message in context: http://www.nabble.com/partytypeid-%3D-person-how--tp25755584p25755922.html
Sent from the OFBiz - User mailing list archive at Nabble.com.