Hi All,
How to get values from workflow package to custom workflow method.
Thanks
Raju.P
If there are Accepted Answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.
Yes, but with some extra coding.
The following snippet of java code is only an example:
public IDfSysObject getPackageObject(IDfWorkitem workitem, IDfSession session) throws DfException { IDfSysObject packageDocument = null; if (workitem != null) { IDfCollection colPackages = workitem.getAllPackages("r_component_chron_id"); try { if (colPackages.next()) { IDfId id = colPackages.getRepeatingId("r_component_chron_id", 0); packageDocument = (IDfSysObject) session .getObjectByQualification("dm_sysobject where i_chronicle_id = '" + id.getId() + "'"); } } finally { if (colPackages != null) colPackages.close(); } } return packageDocument; }
Mind, in this example we assume that the package consists only of 1 document.
Feel free to modify this example to fit your needs
Via Process Data Mapping activity and workflow variables.
You map a value of the package property to a workflow variable.
Then you can read values of the workflow variables in your workflow method code:
IDfWorkitemEx wItemEx = (IDfWorkitemEx) workitem;Object variableValue = wItemEx.getPrimitiveObjectValue("your_custom_wf_variable_name");
Hi Vadim,
Thanks for your replay.but can't we get it from directly package without coping the value from package into process variables.
Thanks for your good answer. it is working fine.
Good to know.