Requisiton Workflow

To err is to be human, to help each other is joy. Tell your Compiere needs in your own words. Let's figure out together.

Moderator: azaharizaman

Requisiton Workflow

Postby aalliana » Wed Jul 27, 2005 11:16 pm


I' studing the requisition workflow, I need requisitons to be automatically assinged for aproval to diferent people depending on the situation. I'm using Compiere 251f.

On my first attempt I created a workflow Role Responsable for client "Garden World", created a workflow for REQUISITONS in the same client and assigned a Supervisor for some roles. However when I tried to assign the new workflow to the requisition process I couln't do it because the only workflows available were those of client System.

So I'm stuck in a dilemma: If I create the new workflow in client Garden World I can not assing the new workflow to de requisition process. If I create the new Worfllow as System, I can not select the roles that belong to GardenWorld.

On my second attemp on the process requisition workflow of client System, in node Requisition Approval I set Workflow responsible "Organization".

I set the Organization Supervisor to the correct user and restart the application server.

When I complete the requisition, the workflow responsible is assigned to Organization but the contact/user is the invoker, not the supervisor.

My questions: Is workflow working in 2.5.1f ?
It yes, how can I make this work?

Thanks in advance.

Alejandro J Alliana Granada
Posts: 14
Joined: Thu Apr 21, 2005 8:53 pm

Workflow (node) responsible

Postby aalliana » Fri Jul 29, 2005 11:48 pm

I've modified the setResponsible method of MWFActivity to the following. It works for me, but I'm not sure that it does what is supposed to do. Can anybody give me a hint?


* Set Responsible and User from Process / Node
* @param process process
private void setResponsible (MWFProcess process)
// Responsible
int AD_WF_Responsible_ID = getNode().getAD_WF_Responsible_ID();
if (AD_WF_Responsible_ID == 0) // not defined on Node Level
AD_WF_Responsible_ID = process.getAD_WF_Responsible_ID();
setAD_WF_Responsible_ID (AD_WF_Responsible_ID);
MWFResponsible resp = MWFResponsible.get(getCtx(), AD_WF_Responsible_ID);
// User - Directly responsible
int AD_User_ID = 0;
if (resp.getResponsibleType().equals(MWFResponsible.RESPONSIBLETYPE_Organization)) {
MOrgInfo oi = MOrgInfo.get(getCtx(), this.getAD_Org_ID());
AD_User_ID = oi.getSupervisor_ID();
} else if (resp.getResponsibleType().equals(MWFResponsible.RESPONSIBLETYPE_Role)) {
int AD_Role_ID = Integer.parseInt(getCtx().getProperty("#AD_Role_ID"));
MRole role = MRole.get(getCtx(), AD_Role_ID);
AD_User_ID = role.getSupervisor_ID();
} else {
AD_User_ID = resp.getAD_User_ID();
// Invoker - get Sales Rep or last updater of document
if (AD_User_ID == 0 && resp.isInvoker())
AD_User_ID = process.getAD_User_ID();
} // setResponsible
Posts: 14
Joined: Thu Apr 21, 2005 8:53 pm

Return to Ask RED1 personally

Who is online

Users browsing this forum: No registered users and 3 guests