Issue with production diagram and properties used as the destination for SendRequestAsync() in Business process

36 views
Skip to first unread message

DanielK

unread,
Jun 23, 2014, 8:27:47 AM6/23/14
to Ensemble-in...@googlegroups.com
I've got a business process handling HL7 objects, and i'd like to set the destination using a property and the SETTING parameter, rather than hard-coding it into the code.

It works fine.. but it won't draw the line onto the production diagram

// Loop through comma seperated destinations and send
For i = 1:1:$LENGTH(..TargetConfigName, ",") {
Set tSc = ..SendRequestAsync($PIECE(..TargetConfigName, ",", i), NewMsg)
}

Does anyone know how to manually set the Ensemble production to have extra connections?

Thanks

Andrew Makinson

unread,
Jun 23, 2014, 8:43:52 AM6/23/14
to Ensemble-in...@googlegroups.com
Daniel,

yes , there is a bit of code that you can use that will draw the extra connections. I'm not in the office right now, but can get it this afternoon. 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

DanielK

unread,
Jun 23, 2014, 9:06:48 AM6/23/14
to Ensemble-in...@googlegroups.com
I thought there might be :) I've been digging around Ens.Config.Production which seems to have a few likely methods like scanmethod and findcall, and so does EnsPortal.Utils - i just can't find the right method

Ricardo Santos

unread,
Jun 23, 2014, 9:08:50 AM6/23/14
to Ensemble-in...@googlegroups.com
Hi Daniel,

The class method you need to overload is OnGetConnections. Have a look at one of the supplied hosts for a code template you can use on your own class.

HTH,
Ricardo

Kind regards,

Ricardo Santos
Managing Director
rsa...@memesoft.co.uk

 


Enterprise House,
5 Roundwood Lane
Harpenden
AL5 3BW

Phone: 
Fax:
Email:

07852 603 411
0870 471 6115
in...@memesoft.co.uk

Registered in England no. 6489012




Sent from my iPhone

On 23 Jun 2014, at 14:06, DanielK <kirwi...@gmail.com> wrote:

I thought there might be :) I've been digging around Ens.Config.Production which seems to have a few likely methods like scanmethod and findcall, and so does EnsPortal.Utils - i just can't find the right method

--

Graham, Ben

unread,
Jun 23, 2014, 9:12:26 AM6/23/14
to Ensemble-in...@googlegroups.com

Here is an example:

 

ClassMethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
{
            Do pItem.PopulateModifiedSettings()
            Set (tValue,tIndex)="" For {
                        Set tSetting = pItem.ModifiedSettings.GetNext(.tIndex) Quit:tIndex=""
                        If tSetting.Name="DemogTargetConfig" Set tValue=tSetting.Value  Quit
            }
            For i=1:1:$L(tValue,",") Set tOne=$ZStrip($P(tValue,",",i),"<>W") Continue:""=tOne  Set pArray(tOne)="" }
}

 

-Ben






This electronic transmission and any documents accompanying this electronic transmission may contain information that is confidential and/or legally privileged. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on or regarding the contents of this electronically transmitted information is strictly prohibited. If you have received this e-mail in error, please notify the sender and delete this message immediately.

DanielK

unread,
Jun 23, 2014, 10:04:33 AM6/23/14
to Ensemble-in...@googlegroups.com
Cheers guys, i've got it working now. I just needed to remember to change 'DemogTargetConfig' to the value of my property holding the destinations.

Thanks all

Ariela Zonderman

unread,
Jun 23, 2014, 12:02:53 PM6/23/14
to Ensemble-in...@googlegroups.com

Hi Daniel,

 

Assuming you are on Ensemble 2007.1 or greater , there is a shortcut you can use.  Just give your 'DemogTargetConfig' property a datatype of Ens.DataType.ConfigName . If you do this, then the line will be drawn automatically, without needing to override the OnGetConnections method.

 

Additionally, starting from Ensemble 2012.1, the GUI will automatically offer a drop-down selection list for settings of datatype Ens.DataType.ConfigName, populated by the potential-target config items in the production.  If you want a multi-selection list, please see http://docs.intersystems.com/ens20141/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_prog#EGDV_prog_settings_options which discusses how to control the type of UI control used for a setting.

 

regards,

                Ariela

 

From: Ensemble-in...@googlegroups.com [mailto:Ensemble-in...@googlegroups.com] On Behalf Of DanielK
Sent: Monday, June 23, 2014 10:05 AM
To: Ensemble-in...@googlegroups.com
Subject: Re: [InterSystems-EnsHlth] Issue with production diagram and properties used as the destination for SendRequestAsync() in Business process

 

Cheers guys, i've got it working now. I just needed to remember to change 'DemogTargetConfig' to the value of my property holding the destinations.

 

Thanks all

--

Reply all
Reply to author
Forward
0 new messages