Hi Ryan,

The message that you pass to your SOAP-based business operation should (as you indicated in your 3rd bullet point), contain both the extracted HL7 data, and the authorization key you retrieved from the previous step.

I'm assuming your SOAP Business operation you are using in the last step has been automatically generated by the Studio wizards, so, you will have a Class Method for each web method of your SOAP service.

You need to edit the default generated versions of these methods the wizard gives you, in order to add your SOAP Header.

You can access   ..Adapter.%Client in this business operation to get access to the private instance of the web service client class, so, using

   Do ..Adapter.%Client.HeadersOut.SetAt(...)

You can set the headers for that particular message invocation.

Sincerely - Steve

Hi Mike. 

Have you already tried setting up  a Credentials record (with username and password paid via Ensemble > Configure > Credentials), and then specifying the credentials record which will be a setting in the Ensemble business operation ?

This has worked form me before with Web services that require basic authentication.

Regards

Steve

Hi Mike. 

Have you already tried setting up  a Credentials record (with username and password paid via Ensemble > Configure > Credentials), and then specifying the credentials record which will be a setting in the Ensemble business operation ?

This has worked form me before with Web services that require basic authentication.

Regards

Steve

Hi David

Defining the SQL Gateway connection is only one part of the problem solved.

Once you have ano SQL gateway defined, you can then create 'proxy' classes in Cache that  know something about, and represent the tables in the remote database system.

With these proxy classes on hand, you can then use them to query and update data as you would with any other persistant Cache vlass yout have.

Thanks Bernd,

I see that onkeypress works- just as I expected it to firing onevent(). you're right.-

But - I was trying to capture onkeyup - which does not get fired into the onevent().

For onkeyup, and probably other events, we need to implement this manually. We would need to resolve the element id of the layout object, then, register an event listener for the event occurring on that element  - which when fired, would invoke onevent() in the template class.    (as per Steve Whitemen's next post)

thanks - 

Thanks Bernd.

My issue is actually managing to get the onevent() method in the template class to be fired at all.  

I'm currently trying to determine what code is required to register onKeyUp() events to be captured for specific layout objects -  that would result in the onevent() in my template class gets invoked (with the evt, key, value and docViewId arguments passed).

Have you use the onevent method callback in the template class ?

Steve

Hi Stefan,

I guess that's not how it is described under 'Event Handling' here:  http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=...  which incorrectly implies that that Zen Mojo will call onevent for anything other than onselect or onchange.  

So: in my ZENPage, I've overridden onkeydownhandler(evt), and I intend to call the onevent() method in my template class, which will have all the logic for all the events other than onsearch and onclick.

The zenPage onkeyuphandler gives me evt, which I can use to get the HTML DOM id of the component that raised the event.  (id=evt.srcElement .id).

How do I go about finding the layout object's  key attribute, given the DOM id ?

Steve

Hi.

I have made a correction to the post, and associated sample code, to indicate the correct way that long-handed versions of custom commands, functions and variables need to developed.  Code that is implemented as a function with arguments needs to explicitly invoke the short-hand logic, or the functionality will not get invoked when using the long-handed command.

Thanks

Steve

excellent - thanks !...

But what about collections, say, a property 'b' that is a collection (with b1, and b2 keys)

>set objFromJSON = {}.$fromJSON("{""a"":""1"",""b"":[{""b1"":""x""},{""b2"":""y""}]}")
>write objFromJSON.a
1
>write objFromJSON.b
24@%Library.Array

>set arr=objFromJSON.b

 

I can only get to each item in 'b' by instantiating an iterator (using arr.$getIterator()), and looping through the list with the $getNext() method of the resulting iterator.   I can remove, get the last, add to the end and set an item in the collection.

I'm assuming there is no concept of getting the item #1 from the collection - using '1' as the key, indicating the first in the collection, or getting #2, indicating the second item - something like

set bObject=arr[1] or  set bObject=arr.GetAt(1) or bObject=arr.Get(1) ?

Steve

Hi,

just starting to look at it.  From a UI perspective - if you do not select an Instance, or Namespace filter in the display, the Name column fully qualifies the component by adding Instance:Namespace - which is great.  This make the column wider, pushing "Avg Que Time" and "Queue Trend" columns outside of the display are and invisible.  

There is no horizontal scroll bar to bring them back in.

Steve

Hi 

Thanks Eduard for trying and for John's comments.

Brendan - Actually... - I tried using the SaveToClass() method as you described before I posted my question to the community, but, it my initial tests showed it deleting the entire contents of my XDATA block.  I was not confident that was the way to go - hence the question, thinking there might have been another API.

However - spurred on again today by yourself coming to the same idea I already had, I decided to give it another look - and - I have solved the problem.

For all - I want to re-iterate - this is how to set the Enabled configuration status of a business host by modifying the XML in the production class's XDATA block.  For run-time enabling/disabling, use EnableConfigItem method of Ens.Director.

If the enabled status changes you want to make are to the production's configuration, then - here is the solution:

 

/// productionName = Package.Classname
/// 
Items(ConfigItem)=startupStatus 
///

/// ConfigItem = must contain the fully qualified reference of: ConfigName|ClassNameOfComponent
///                            due to config items, that can be defined as the same name multiple times in a production
/// startupStatus = 1 or 0 (true or false respectively)
/// 
ClassMethod UpdateClassEnabledStatuses(productionName As %String, ByRef Items As %String) As %Status
{
set tSC=$$$OK 

Try {
set statProdRunning=##class(Ens.Director).IsProductionRunning(productionName)
if statProdRunning=1 {
  // Stop Production
  set tSC=##class(Ens.Director).StopProduction()
  if $$$ISERR(tSC) {
    write !,"Unable to stop production. Exiting without changes."
    quit 
   }
}

// take out an exclusive lock on the class to avoid being edited remotely.
lock +^oddDEF(productionName)#"E":5
if '$t {
 write !,"Unable to lock production class. Exiting without changes."
 quit 
}

// iterate through items.
set objProd=##class(Ens.Config.Production).%OpenId(productionName)
if '$IsObject(objProd) {
  write !,"Production configuration for production: "_productionName_". couldn't be found. Existing without changes."
  quit
}
set ci=""
for  {
  set ci=$order(Items(ci)) quit:ci=""
  set fqConfigItem=productionName_"||"_ci

  // change the status in the class.
  set objConfigItem=objProd.FindItemByConfigName(fqConfigItem)

  set objConfigItem.Enabled=Items(ci)
  write !,"Updating item: "_$piece(ci,"|")_" ("_$piece(ci,"|",2)_")"_" to: "_$select(Items(ci):"True",1:"False")
 
  set err=objProd.SaveToClass(objConfigItem) if $$$ISERR(err) write " - Failed" continue
  set err=objProd.%Save() if $$$ISERR(err) write " - Failed" continue

}

// release exclusive lock the class
lock -^oddDEF(productionName)#"E"

// Reset the running status of the production
if statProdRunning=1 {
  do ##class(Ens.Director).StartProduction(productionName)
}

catch exceptionvar {
  lock -^oddDEF(productionName)#"E"
  set tSC=exceptionvar.AsStatus()
}
  quit tSC
}
 

 

 

Steve.