Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Haris Tasawar
workflow implementation problem
August 15, 2012 1:00 AM
Answer

Haris Tasawar

Rank: Junior Member

Posts: 35

Join Date: June 4, 2012

Recent Posts

hey all,
I am trying to implement workflow in my custom portlet and running into a problem. I am getting a error which is this:

No User exists with the primary key 0


I dunno what this message means. Could anyone please help me on this.

P.S:
Here is the code:

public meetingminutes addmeetingminutes(meetingminutes newmeetingminutes,long userId,ServiceContext serviceContext)throws SystemException, PortalException
{
System.out.println("I am in addmeetingminutes custom class");

meetingminutes mms = meetingminutesPersistence.create(counterLocalService.increment(meetingminutes.class.getName()));

mms.setCOMPANYID(newmeetingminutes.getCOMPANYID());
mms.setGROUPID(newmeetingminutes.getGROUPID());
mms.setUSERID(newmeetingminutes.getUSERID());
mms.setMEETING_DATE(newmeetingminutes.getMEETING_DATE());
mms.setMEETING_NO(newmeetingminutes.getMEETING_NO());
mms.setMINUTES(newmeetingminutes.getMINUTES());
mms.setSTATUS(WorkflowConstants.STATUS_DRAFT);
meetingminutesPersistence.update(mms, false);

resourceLocalService.addResources(
newmeetingminutes.getCOMPANYID(),
newmeetingminutes.getGROUPID(), userId,
meetingminutes.class.getName(),
mms.getPrimaryKey(), false,
true, true);

//alleged workflow implementation
WorkflowHandlerRegistryUtil.startWorkflowInstance(
newmeetingminutes.getCOMPANYID(), newmeetingminutes.getGROUPID(), userId,
meetingminutes.class.getName(), mms.getPrimaryKey(), mms,
serviceContext);
// sendMessage (mms, serviceContext);
return mms;
}
Vilmos Papp
RE: workflow implementation problem
August 15, 2012 2:31 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Liferay Master

Posts: 521

Join Date: October 21, 2010

Recent Posts

Hi Haris,

The problem could be at the call of the function public meetingminutes addmeetingminutes(meetingminutes newmeetingminutes,long userId,ServiceContext serviceContext) maybe you passes 0 as userId and not a valid userId.

Regards,
Vilmos
Haris Tasawar
RE: workflow implementation problem
August 15, 2012 3:53 AM
Answer

Haris Tasawar

Rank: Junior Member

Posts: 35

Join Date: June 4, 2012

Recent Posts

hmmm ok Vilmos i`ll check it and let you know as soon as possible...... Thanks bro.
Haris Tasawar
RE: workflow implementation problem
August 15, 2012 3:58 AM
Answer

Haris Tasawar

Rank: Junior Member

Posts: 35

Join Date: June 4, 2012

Recent Posts

how do i check which userid is valid?
Vilmos Papp
RE: workflow implementation problem
August 31, 2012 6:43 AM
Answer

Vilmos Papp

LIFERAY STAFF

Rank: Liferay Master

Posts: 521

Join Date: October 21, 2010

Recent Posts

Valid means existing in this case.