BF [ 2873271 ] PackIn is linking workflow start node wrongly
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2873271&group_id=176962
This commit is contained in:
parent
74e91fcb82
commit
e38bccd308
|
@ -13,6 +13,7 @@
|
|||
*
|
||||
* Copyright (C) 2005 Robert Klein. robeklein@hotmail.com
|
||||
* Contributor(s): Low Heng Sin hengsin@avantz.com
|
||||
* Teo Sarca, teo.sarca@gmail.com
|
||||
*****************************************************************************/
|
||||
package org.adempiere.pipo.handler;
|
||||
|
||||
|
@ -206,37 +207,6 @@ public class WorkflowElementHandler extends AbstractElementHandler {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!element.defer && !element.skip && element.recordId > 0) {
|
||||
Attributes atts = element.attributes;
|
||||
//set start node
|
||||
String name = atts.getValue("ADWorkflowNodeNameID");
|
||||
if (name != null && name.trim().length() > 0) {
|
||||
MWorkflow m_Workflow = new MWorkflow(ctx, element.recordId, getTrxName(ctx));
|
||||
int id = get_IDWithColumn(ctx, "AD_WF_Node", "Name", name);
|
||||
if (id <= 0) {
|
||||
element.deferEnd = true;
|
||||
element.unresolved = "AD_WF_Node=" + name;
|
||||
return;
|
||||
}
|
||||
m_Workflow.setAD_WF_Node_ID(id);
|
||||
if (m_Workflow.save(getTrxName(ctx)) == true) {
|
||||
log.info("m_Workflow update success");
|
||||
record_log(ctx, 1, m_Workflow.getName(), "Workflow", m_Workflow
|
||||
.get_ID(), 0, "Update", "AD_Workflow",
|
||||
get_IDWithColumn(ctx, "AD_Table", "TableName",
|
||||
"AD_Workflow"));
|
||||
workflows.add(m_Workflow.getAD_Workflow_ID());
|
||||
element.recordId = m_Workflow.getAD_Workflow_ID();
|
||||
} else {
|
||||
log.info("m_Workflow update fail");
|
||||
record_log(ctx, 0, m_Workflow.getName(), "Workflow", m_Workflow
|
||||
.get_ID(), 0, "Update", "AD_Workflow",
|
||||
get_IDWithColumn(ctx, "AD_Table", "TableName",
|
||||
"AD_Workflow"));
|
||||
throw new POSaveFailedException("MWorkflow");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void create(Properties ctx, TransformerHandler document)
|
||||
|
|
Loading…
Reference in New Issue