Java Reference
In-Depth Information
extends ExecutionObjectImpl
implements WfProcess {
...
NameValue[] processResult;
WfProcessImpl(WfProcessMgr mgr, WfProcessDefinition def,
WfRequester req) {
...
// create context
Collection data # def.getData();
NameValue[] ctxt # new NameValue[data.size()];
// for each data definition..
Iterator it # data.iterator();
for (i # 0; it.hasNext(); !! i){
WfDataDefinition dd # (WfDataDefinition)it.next();
// create an entry in the context..
ctxt[i] # new NameValue(dd.name, null );
// instantiate the object type..
Class cls;
try {
cls # Class.forName(dd.type);
} catch (Exception e){
String s # new String();
cls # s.getClass();
}
// and put it in the context
ctxt[i].the_value # cls.newInstance();
}
this .set_process_context(ctxt);
...
}
...
}
The constructor of the class WfActivityImpl builds a copy of the process
context that contains only the pieces of data that are accessible to the
activity. If there is no access restriction then the entire process context is
made available to the activity, otherwise for each restriction an entry is
added to the activity context. If the data are accessible in read only mode, a
copy of the process context entry is created, otherwise the original entry is
used. Two helper methods are used in this task: find() which returns the
process context entry corresponding to an access restriction name, and
doClone() which creates a duplicate of the value of a process context entry.
package WfEngine;
...
class WfActivityImpl
extends ExecutionObjectImpl
Search WWH ::




Custom Search