Hi,
I'm using MTF to transform a WBM (websphere business modeler) process model to
another process model we've defined. There is no problem regarding the nodes,
but I've a problem about the connections.
In WBM process model, the Connection class only records the name of source node
and target node, but in our model Link records the source object and target object,
so how should I write the rule for WBM Connection?
I've tried following rule which doesn't work (reports "Constraint connection2Link
violated when target model does not exist):
relate connection2Link(wbm:Connection conn, erm:ProcessLink link)
when equals (conn.source.node, link.sourceElement.label)
& equals (conn.target.node, link.targetElement.label){}
Can you shed some light on this, thanks in advance!
Regards,
Hao
======= Enclosed full rdl file for your information: =======
import ecore "http:///com/ibm/mtf/model/emf.ecore"
import util "http:///com/ibm/mtf/util.ecore"
import ws "http:///com/ibm/mtf/model/workspace.ecore"
import erm "http://erm"
import wbm "http://www.ibm.com/wbim/bomSchema1.0"
relate wbm2erm(ws:IFile source, ws:IFile target)
{
document2process(over source.resource.contents, over target.resource.contents)
}
relate document2process(wbm:DocumentRoot doc, erm:Process ermProc)
{
process2process[1](over doc.model.processModel.processes.process, ermProc)
}
relate process2process(wbm:Process wbmProc, erm:Process ermProc)
when equals (wbmProc.name, ermProc.label)
{
ordered process2process(over wbmProc.flowContent.process, over ermProc.subProcesses),
task2Activity(over wbmProc.flowContent.task, over ermProc.activities),
decision2Decision(over wbmProc.flowContent.decision, over ermProc.decisions),
connection2Link(over wbmProc.flowContent.connection, over ermProc.processLinks)
}
relate task2Activity(wbm:Task task, erm:Activity activity)
when equals (task.name, activity.label)
{
}
relate decision2Decision(wbm:Decision wbmDecision, erm:Decision ermDecision)
when equals (wbmDecision.name, ermDecision.label)
{
}
relate connection2Link(wbm:Connection conn, erm:ProcessLink link)
{
ref task2Activity(conn.source, link.sourceElement)
}
Message was edited by: bjzhanghao@21cn.com
Message was edited by: bjzhanghao@21cn.com