User bio
404 bio not found
Member since Nov 6, 2015
Replies:

Nice work!  The Docker version ran perfect. I then tried to install and run it on my local IRIS instance with ZPM and I get the execution error: 

ERROR <Ens>ErrException: <THROW>CreateFolder+9^dc.samba.SambaBusinessOperation.1 *%Exception.PythonException <PYTHON EXCEPTION> 246 <class 'ModuleNotFoundError'>: No module named 'smbclient' -- logged as '-' number - @'    Set sc = ##class(dc.samba.SambaService).CreateFolder(server, port, share, username, password, folder)'

I had run irispip to load smbprotocol, which seemed to run fine:

..\bin\irispip install --target \InterSystems\IRISHealth\python smbprotocol

but the smbclient module still seems to be missing.

What am I missing?

Thanks!!

Looking for a sample Ensemble BusinessService that uses the adapter to download data. Initially I'd like to just build a passthrough service, but I would also like to create an inbound HL7 service and a Record Mapper service. 

/// https://docs.intersystems.com/irisforhealth20231/csp/docbook/Doc.View.cls?KEY=EGIN_options_connectivity\
/// https://docs.intersystems.com/irisforhealth20231/csp/docbook/DocBook.UI.Page.cls?KEY=ECLOUD_inbound
/// https://docs.intersystems.com/irisforhealth20231/csp/documatic/%25CSP.Documatic.cls?LIBRARY=ENSLIB&CLASSNAME=EnsLib.CloudStorage.InboundAdapter
Class ARTIS.Adapter.CloudStorage.PassthroughService Extends Ens.BusinessService
{

Parameter ADAPTER = "EnsLib.CloudStorage.InboundAdapter";

/// Configuration item(s) to which to send file stream messages
Property TargetConfigNames As %String(MAXLEN = 1000);

Parameter SETTINGS = "TargetConfigNames:Basic:selector?multiSelect=1&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId}";

Parameter CONTAINERCLASS = "Ens.StreamContainer";

/// Wrap the input stream object in a StreamContainer message object and send it. <p>
/// https://docs.intersystems.com/irisforhealth20231/csp/docbook/DocBook.UI.Page.cls?KEY=ECLOUD_inbound#ECLOUD_inbound_bs
/// based on EnsLib.File.PassthroughService but [at least initially] without archive and work folders.<p>
/// We assume our InboundAdapter has the DeleteAfterDownload to prevent pulling the same over and over.
Method OnProcessInput(pInput As EnsLib.CloudStorage.InboundInput, Output pOutput As %RegisteredObject) As %Status
{
	// https://docs.intersystems.com/irisforhealth20231/csp/docbook/DocBook.UI.Page.cls?KEY=ECLOUD_inbound#ECLOUD_inbound_bs
	#dim tContent As %GlobalBinaryStream = pInput.Content	//a stream that contains the data from cloud storage
	#dim tMeta As %String = pInput.Meta	// metadata associated with the cloud storage blob
	#dim tName As %String = pInput.Name	// the name of cloud storage blob
	
	#dim tSC,tSC1 As %Status = $$$OK
	#dim tSource, iTarget, tOneTarget As %String
	#dim tSyncCommit As %Integer
	
	Set tSource=$G(tName) _ $C(10)_$G(tMeta)
	// Do I need to convert tContent from binary stream to character stream first?? https://docs.intersystems.com/irisforhealth20242/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fzconvert#RCOS_fzconvert_handle
	Set pInput=$classmethod(..#CONTAINERCLASS,"%New",tContent)
	
	$$$SyncCommitSet(tSyncCommit)
	For iTarget=1:1:$L(..TargetConfigNames, ",") { Set tOneTarget=$ZStrip($P(..TargetConfigNames,",",iTarget),"<>W")  Continue:""=tOneTarget
		$$$sysTRACE("Sending input Stream "_pInput.Stream_"("_pInput.Stream.Size_")"_" from '"_tSource_"' to '"_tOneTarget_"'")
		Set tSC1=..SendRequestAsync(tOneTarget,pInput)  Set:$$$ISERR(tSC1) tSC=$$$ADDSC(tSC,tSC1)
		}

	$$$SyncCommitClear(tSyncCommit)
	Quit tSC
}

/// Return an array of connections for drawing lines on the config diagram
ClassMethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
{
	Do ##super(.pArray,pItem)
	If pItem.GetModifiedSetting("TargetConfigNames",.tValue) {
		For i=1:1:$L(tValue,",") { Set tOne=$ZStrip($P(tValue,",",i),"<>W")  Continue:""=tOne  Set pArray(tOne)="" }
	}
}

}

To make it easy to get the SessionId from DTL, BPL, or rules, where the $$$JobCurrentHeaderId macro is not defined, add methods like these to your extended function class that Extends Ens.Rule.FunctionSet:

/// Return the current Ens.MessageHeader Id
ClassMethod XCurrentMessageHeaderId() As %String [ CodeMode = expression ]
{
$GET($$$JobCurrentHeaderId)
}

/// Return the current SessionId
ClassMethod XSessionId() As %String [ CodeMode = expression ]
{
$GET($$$JobSessionId)
}

/// Return the current SuperSession
ClassMethod XSuperSession() As %String [ CodeMode = expression ]
{
$GET($$$JobSuperSession)
}
 

Certifications & Credly badges:
Kevin has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Kevin has no followers yet.
Following: