Accessing the Parent SPListItem in a SharePoint integrated workflow and Async task access

  • 15 September 2010
  • 2 replies
  • 1 view

Badge +1

I'm running a workflow in SharePoint integrated mode against a SharePoint listitem.


As I'm using an Async server task to wait for an out of process event to feed some data in, I need to store the Serial number of the Async task in the parent SharePoint listitem, so that I can then re-start the Async task with a finalise action.


I can't find how to access the underlying SharePoint item that has triggered the workflow, so any pointers would be great.


In addition, the out of process workflow that re-starts the Async task is running within BlackPearl, so can I get a reference to the ServerItem without creating a new Server connection? It strikes me as a waste of resources to rebuild a connection when I'm already in a workflow context.


Cheers


Paul.


2 replies

Badge +8

Just a thought here: are the two process related? I'm assuming the out of process process is not the same, else it wouldn't be out of process. If they are, could you perhaps use a Synchronous IPC for the other process? You can then use preceding rules to sync them back up.

Badge +1

No the out of process trigger is a SharePoint event handler that can be kicked off by either Human intervention (editing the list item) or two different processes running on external systems.


In the end I decided to get the ProcessInstance XML data that represents the SharePoint item and strip out the Listname, url and ItemId from the xml, then retrieve the SPListItem using a standard CAML query.


I guess I was hoping that as we have the WWF sitting udnerneath it all, that the SPListItem was as easy to access as it is when you use a SharePoint sequential template in a VS workflow.


It's working this way which is what counts tho!


Cheers


Paul.

Reply