Video Screencast Help

Global Variables

Created: 10 Aug 2012 | 4 comments

I've declared a global variable for attachments with the datatype FileData in workflow that I display on a form. Files are added/removed to this collection but sometimes the attachments do not display any attachments even though they were a step before. I also have a parallel split that occurs in the workflow and if I go into one form the attachments will be there but if I go into the other form it won't. They're both referencing the same global variable and it seems to be random so I don't understand what is happening here.

I'm running WF 7.1 SP1 with rollups and wondering if anyone has experienced this issue before? I know there were some issues before with global variables but I thought this was fixed in the 7.1 iterations.

Thanks,

Arya

Comments 4 CommentsJump to latest comment

b3tts32's picture

This is a bug of some sort, global data seems to work fine until you run it through parallel data streams. I ran in to this months back when I went through the Majority Approvals workflow from workflowswat. I'm not sure if it's been resolved or not as I haven't needed this particular option in what I've been doing lately.

 

http://www.screencast.com/t/tzClKVBC

Aryanos's picture

Yea it's really weird and now I have to pass variables back and forth into models which isn't a big deal but it sucks that you can't rely on the global variables.

I like my beats fast and my bass down low

AnaMan's picture

Did you notice this behaviour especially with FileDataType or with others too?

Is seems that global variables aren't really global (I reflected a bit a libraries). Thay don't need to be passed to others models (called by Linked Model) but when parallel split has happend theirs collection is copied like all others variables. So any parallel branch works on its own copy of data collection including "global". But there is one catch. FileDataType is by default defined as a external data type what means its variable values are stored not in memory but as a messages in exchange queues. I'm not sure if a global FileDataType variable is copied during parallel split than also its value stored in message is copied.

Aryanos's picture

I've only noticed this with the FileDataType but it's weird because I've now seen this numerous times when it splits and one split has the attachments and the other doesn't even though they are referencing the same global variable. I need to test this in the WF 7.5 beta to see if this issue still exists.

I like my beats fast and my bass down low