Question
· May 14, 2019

Can BPL context properties be available across multiple business processes?

Is there a way to have a context property be available across 2 or 3 different business processes? For example if I am setting a value in a context property within one business process and want to use the same context property in a second business process, is this possible? Is this something that can be done with the "Context Superclass"?

Discussion (5)1
Log in or sign up to continue

Hi Julie,

I haven't actually used that feature, but what you described does appear to be the intent of "Context Superclass". From the documentation https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EBPLR_process, and https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EBPL_editor 

Attribute or ElementDescriptionValue
contextsuperclassattributeOptional. Lets you specify the superclass for your business process context. This is useful if you have many different business processes that share the same context variables. The idea is that you subclass Ens.BP.Context yourself, adding your own properties, then use that class for the contextsuperclass. If not specified, Ens.BP.Context is the default.A class name.

I think you then would set the default values on the superclass's properties. Again, I haven't used this, so I might be steering you in the wrong direction! 

If I use the context superclass and I set a value in one of the context properties, will the value be retained from one business process to the other or will it get reset. In my case, I'm parsing an x12 file and have created 1 business process to loop thru the Groups(GS/GE) and another business process to loop thru the transaction sets within the group. The second process is creating a file record and getting a fileid. Once this value is set will it be retained in both business processes if I use the context superclass?