Now reading the values sent from Workflow in ASPX form. Basically, the infopath form reads all the Workflow values by looking @ metadat.xml. But in our case we need to get it from workflow task's extended properties. More clear: Once the task created by workflow, that task is viewable in workflow task. All those values sending from Workflow to task forms are passed thru extended properties of the task item. If we capture the workflow task item we can get the Extended properties of Workflow value.
If you look @ task form url-querystring, 2 values will be passed
ID - Task List item Id
List-List ID [GUID]
using the above values you can locate the correct task item.
Response.Write("Item ID:" + item.ID);
Response.Write("Item Name:" + item.Name);
Hashtable spTaskProperties = SPWorkflowTask.GetExtendedPropertiesAsHashtable((SPListItem)item);
foreach (DictionaryEntry entry in spTaskProperties) { Response.Write("Key :" + entry.Key.ToString() + ", Value: " + entry.Value.ToString()); }
Next: Sending value back to Workflow...
Monday, July 13, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment