#Ensemble

23 Followers · 2.4K Posts

InterSystems Ensemble is a complete and easy-to-use integration platform that enables users to connect people, processes, and applications in record

time.

Learn more

Documentation

Edit
Question Carey Grant · Feb 10, 2017

Hopefully a quick question regarding the SendFormDataURL() class method.   I have the following:

Set tSC = ..Adapter.SendFormDataURL(..Adapter.URL,.restResponse,"POST",,,pRequest)

I get the  following error response.

ERROR #5001: ERROR <Ens>ErrHTTPStatus: Received non-OK status 500 from remote HTTP server: 'HTTP/1.1 500 Internal Server Error' : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <exc:exception xmlns:exc="http://mywebsite.com/ri/exception"> <message>The request content type must be application/xml</message> </exc:exception>

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EREST_operation

0
0 10
Edit
Question Thembelani Mlalazi · Jun 22, 2018

I have a service that takes a file and pass it through to the production .While I am passing the file through I get the file stream and set it to a variable within my message and the variable is of type %Ens.StreamContainer. But after all processing and I need to write out my file to a pdf format The file gets written but is a corrupt file since I can not read it I have tried this with asimple pass through everything is fine .But here I do not know what I am doing wrong here is the operation code

 set pInput=pRequest.FileStream
     ;the variable to hold the status for the method
 #dim status as %Status=$$$OK
 ;clear the pResponse
  kill pResponse
     set pResponse=$$$NULLOREF
 ;set the file name to the sequence number
  set ..Filename=pRequest.NewFileName
 
  ;the filepath set on the settings of this OPERATION
   set origDirectory = ..Adapter.FilePath
  ;the file directory to drop the file
  set ..Adapter.FilePath = ..Adapter.FilePath_"\"_..StubDirectory
  
 ;start writing out file data to the file in filename
;this bit works fine
    set:$$$ISOK(status) status= ..Adapter.PutLine(..Filename_"."_..stubExtension,
  $CHAR(34)_ pRequest.ClientID_$CHAR(34)_$CHAR(44)_$CHAR(34)_pRequest.UserId_$CHAR(34)_$CHAR(44)_$CHAR(34)_
  pRequest.DocumentType _$CHAR(34)_$CHAR(44)_$CHAR(34)_pRequest.Title_$CHAR(34)_$CHAR(44)_$CHAR(34)_pRequest.Description_$CHAR(34)_$CHAR(44)_$CHAR(34)_pRequest.Author _$CHAR(34)_$CHAR(44)_$CHAR(34)_pRequest.DocumentDate_$CHAR(34)_$CHAR(44)_$CHAR(34)_pRequest.FinalRevision_$CHAR(34))
 
 if ($$$ISOK(status))
 {
  ;set back to the operation settings
  set ..Adapter.FilePath = origDirectory
    ;set the file name  to write out to
  set ..Filename=pRequest.NewFileName_"."_..DocExtension
  ;set the filepath on the production settings to this variable
  set origDirectory = ..Adapter.FilePath
  ;set the new filepath
  set ..Adapter.FilePath = ..Adapter.FilePath_"\"_..DocumentDirectory
     
 
  //here I turn to write out but file is corrupt
  
  set:$$$ISOK(status) status=  ..Adapter.PutStream(..Filename, pRequest.FileStream) //error here to file
   Quit:'$IsObject(pInput.Stream) $$$ERROR($$$EnsErrGeneral,"No Stream contained in StreamContainer Request")
 Set tFilename=..Adapter.CreateTimestamp(##class(%File).GetFilename(pInput.OriginalFilename),..Filename)
 Set status=..Adapter.PutStream(..Filename, pInput.Stream)
 Do pInput.%Save() ; re-save in case PutStream() optimization changed the Stream filename
 
 
 
 
   set ..Adapter.FilePath = origDirectory
  
   if ($$$ISOK(status))
 {
  set pResponse=##class(BSMHFT.DocumentUpload.GenericRESP).%New()
  set pResponse.Process="RiOFileOPRN_files Written to their respective directories"
  set pResponse.Status=status
  set status=pResponse.%Save()
 }
  
 }
 
 return status
}
0
0 0
Edit
Article Steve Pisani · Oct 27, 2016 1m read

Hi - If you want to embed Ensemble's Workflow Inbox, (that offers workflow task items to workflow users) inside of your application - you can access the URL directly without necessarily giving users access to the Management Portal - but more importantly, you can strip away the Titlebar, Worklists borders etc.

You do this by using the same URL parameters you would use, if embedding a regular DeepSee dashboard into your application.

For example, using &EMBED=1

removes all titles, borders and worklists.

0
0 0
Edit
Article Gevorg Arutiunian · Jul 26, 2018 2m read

(Originally posted on InterSystems CODE by blaise Zarka, 10/27/14) The following code snippet includes methods for Ensemble that migrate the item settings for the given production to default. The class method "test" runs the process, and it takes the name of a production class as a string:


Class blaisezarka.MigrateSettingsToDefault [ Abstract ]
{

/// Migrate all items settings from production productionClassName

While ((key '= "") && $$$ISOK(tSC)) {
    set item = items.GetAt(key)
    set tSC = ##class(blaisezarka.MigrateSettingsToDefault).CreateDefaultSettings(productionClassName, item)
    set key = items.Next(key)
}
 
Quit tSC
0
0 0
Edit
Article Steve Pisani · Oct 27, 2016 1m read

Hi - If you want to embed Ensemble's Workflow Inbox, (that offers workflow task items to workflow users) inside of your application - you can access the URL directly without necessarily giving users access to the Management Portal - but more importantly, you can strip away the Titlebar, Worklists borders etc.

You do this by using the same URL parameters you would use, if embedding a regular DeepSee dashboard into your application.

For example, using &EMBED=1

removes all titles, borders and worklists.

0
0 0
Edit
Question Mitch Anderson · May 16, 2017

Hey guys,

I'm working with an EnsLib.XML.X12.Document object which consists of a parent object along with multiple children.

When using the following code, my sent object is losing all references to its children.  I've played with the deep parameter and nothing is working to automatically clone the objects children(group docs ref)along with itself.  (Even though the documentation states that it should..)

objectClone = object.%ConstructClone()

d ..sendRequestAsync("Destination",objectClone)

Any insight would be really helpful.

Thanks!

Mitch

0
0 1